Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert(release): update changelog and bump version to 1.1.0 #853

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ updates:
directory: "/"
schedule:
interval: weekly
target-branch: "master"
open-pull-requests-limit: 10
reviewers:
- shumkov
- lklimek
labels:
- dependencies
2 changes: 1 addition & 1 deletion .github/workflows/proto-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.35.0
- uses: bufbuild/buf-setup-action@v1.33.0
- uses: bufbuild/buf-lint-action@v1
with:
input: "proto"
28 changes: 1 addition & 27 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
## [1.1.0] - 2024-07-29

### Bug Fixes

- Address already in use (#845)
- Active validators not always connected to each other (#844)
- Validators form islands on genesis (#850)

### Features

- [**breaking**] Replace dash core quorum sign with quorum platformsign (#828)
- Allow overriding genesis time in InitChain (#847)

### Miscellaneous Tasks

- Update changelog and version to 1.1.0-dev.1 (#842)
- Update changelog and version to 1.1.0-dev.2 (#846)
- Update changelog and version to 1.1.0-dev.3 (#848)

### Build

- Bump bufbuild/buf-setup-action from 1.33.0 to 1.35.0 (#841)
- Run dependabot on default branch, not master (#843)

## [1.0.0] - 2024-07-01
## [1.0.0] - 2024-06-26

### Bug Fixes

Expand Down Expand Up @@ -67,7 +43,6 @@
- Detect quorum hash mismatch when verifying commit (#791)
- Update changelog and version to 0.14.0-dev.8 (#792)
- Update changelog and version to 1.0.0-dev.2 (#806)
- Update changelog and version to 1.0.0

### Refactor

Expand Down Expand Up @@ -119,7 +94,6 @@
- Bump docker/build-push-action from 5.4.0 to 6.0.0 (#801)
- Bump bufbuild/buf-setup-action from 1.32.2 to 1.33.0 (#800)
- Bump goreleaser/goreleaser-action from 5 to 6 (#798)
- Bump github.com/stretchr/testify from 1.8.2 to 1.9.0 (#817)

## [0.13.4] - 2023-12-11

Expand Down
2 changes: 1 addition & 1 deletion DOCKER/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ LABEL maintainer="[email protected]"
# private validator file into /tenderdash/config.
#
# The /tenderdash/data dir is used by tenderdash to store state.
ENV TMHOME=/tenderdash
ENV TMHOME /tenderdash

# OS environment setup
# Set user right away for determinism, create directory for persistence and give our user ownership
Expand Down
40 changes: 2 additions & 38 deletions DOCKER/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,30 +1,5 @@
#!/bin/bash


# TODO: Workaround for busy port problem happening with docker restart policy
# we are trying to start a new container but previous process still not release
# the port.

# As a workaround we are sleeping for 10 seconds after the tenderdash process
# exits with non-zero exit code.
#
# Must be fix with graceful shutdown of tenderdash process.

got_signal=false

# Function to handle signals and forward them to the tenderdash process
# shellcheck disable=SC2317
_forward_signal() {
echo "Caught signal! Forwarding to tenderdash process."
got_signal=true
kill -s "$1" "$child"
}

# Trap signals and forward them to the tenderdash process
trap '_forward_signal TERM' SIGTERM
trap '_forward_signal INT' SIGINT
trap '_forward_signal HUP' SIGHUP
trap '_forward_signal QUIT' SIGQUIT
set -e

if [ ! -d "$TMHOME/config" ]; then
echo "Running tenderdash init to create a single node (default) configuration for docker run."
Expand All @@ -51,15 +26,4 @@ if [ ! -d "$TMHOME/config" ]; then
mv "$TMHOME/config/genesis.json.new" "$TMHOME/config/genesis.json"
fi

# Start tenderdash in the background
tenderdash "$@" &
child=$!
wait "$child"
exit_code=$?

if [ $got_signal == false ] && [ $exit_code -ne 0 ] && [ "$1" == "start" ]; then
echo "Sleeping for 10 seconds as workaround for the busy port problem. See entrypoint code for details."
sleep 10
fi

exit $exit_code
exec tenderdash "$@"
582 changes: 233 additions & 349 deletions abci/types/types.pb.go

Large diffs are not rendered by default.

12 changes: 2 additions & 10 deletions dash/core/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@ func (rpcClient *RPCClient) QuorumSign(
if err := quorumType.Validate(); err != nil {
return nil, err
}
quorumSignResultWithBool, err := rpcClient.endpoint.QuorumPlatformSign(
quorumSignResultWithBool, err := rpcClient.endpoint.QuorumSign(
quorumType,
requestID.String(),
messageHash.String(),
quorumHash.String(),
false,
)

rpcClient.logger.Trace("core rpc call QuorumSign",
"quorumType", quorumType,
"requestID", requestID.String(),
Expand All @@ -192,15 +192,7 @@ func (rpcClient *RPCClient) QuorumSign(
if quorumSignResultWithBool == nil {
return nil, err
}

// as QuorumPlatformSign does not provide the quorum type, we need to check it manually
// to ensure we deliver what was requested by the caller
quorumSignResult := quorumSignResultWithBool.QuorumSignResult
if quorumType != btcjson.LLMQType(quorumSignResult.LLMQType) {
return nil, fmt.Errorf("possible misconfiguration: quorum platform sign uses unexpected quorum type %d, expected %d",
quorumSignResultWithBool.LLMQType, quorumType)
}

return &quorumSignResult, err
}

Expand Down
53 changes: 12 additions & 41 deletions dash/quorum/validator_conn_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"github.com/dashpay/tenderdash/internal/eventbus"
"github.com/dashpay/tenderdash/internal/p2p"
tmpubsub "github.com/dashpay/tenderdash/internal/pubsub"
"github.com/dashpay/tenderdash/internal/state"
tmbytes "github.com/dashpay/tenderdash/libs/bytes"
"github.com/dashpay/tenderdash/libs/log"
"github.com/dashpay/tenderdash/libs/service"
Expand Down Expand Up @@ -63,9 +62,6 @@ type ValidatorConnExecutor struct {
// mux is a mutex to ensure only one goroutine is processing connections
mux sync.Mutex

// state store used on start to setup initial validators
stateStore state.Store

// *** configuration *** //

// EventBusCapacity sets event bus buffer capacity, defaults to 10
Expand Down Expand Up @@ -124,15 +120,6 @@ func WithValidatorsSet(valSet *types.ValidatorSet) func(vc *ValidatorConnExecuto
}
}

// WithStateStore sets state store to be used when setting up initial validators
// Can be nil, in which case no initial validators will be set up.
func WithStateStore(store state.Store) func(vc *ValidatorConnExecutor) error {
return func(vc *ValidatorConnExecutor) error {
vc.stateStore = store
return nil
}
}

// WithLogger sets a logger
func WithLogger(logger log.Logger) func(vc *ValidatorConnExecutor) error {
return func(vc *ValidatorConnExecutor) error {
Expand All @@ -143,22 +130,6 @@ func WithLogger(logger log.Logger) func(vc *ValidatorConnExecutor) error {

// OnStart implements Service to subscribe to Validator Update events
func (vc *ValidatorConnExecutor) OnStart(ctx context.Context) error {
// initial setup of validators, if state store is provided
if vc.stateStore != nil {
valset, err := vc.stateStore.Load()
if err != nil {
return fmt.Errorf("cannot load initial state from state store: %w", err)
}
if err = vc.handleValidatorUpdateEvent(types.EventDataValidatorSetUpdate{
ValidatorSetUpdates: valset.Validators.Validators,
ThresholdPublicKey: valset.Validators.ThresholdPublicKey,
QuorumHash: valset.Validators.QuorumHash,
}); err != nil {
// not fatal, but we should log it
vc.logger.Warn("cannot handle initial validator set, skipping", "err", err)
}
}

if err := vc.subscribe(); err != nil {
return err
}
Expand Down Expand Up @@ -213,7 +184,7 @@ func (vc *ValidatorConnExecutor) subscribe() error {
// receiveEvents processes received events and executes all the logic.
// Returns non-nil error only if fatal error occurred and the main goroutine should be terminated.
func (vc *ValidatorConnExecutor) receiveEvents(ctx context.Context) error {
vc.logger.Trace("ValidatorConnExecutor: waiting for an event")
vc.logger.Debug("ValidatorConnExecutor: waiting for an event")
sCtx, cancel := context.WithCancel(ctx) // TODO check value for correctness
defer cancel()
msg, err := vc.subscription.Next(sCtx)
Expand All @@ -231,7 +202,7 @@ func (vc *ValidatorConnExecutor) receiveEvents(ctx context.Context) error {
vc.logger.Error("cannot handle validator update", "error", err)
return nil // non-fatal, so no error returned to continue the loop
}
vc.logger.Trace("validator updates processed successfully", "event", event)
vc.logger.Debug("validator updates processed successfully", "event", event)
return nil
}

Expand Down Expand Up @@ -293,7 +264,7 @@ func (vc *ValidatorConnExecutor) resolveNodeID(va *types.ValidatorAddress) error
va.NodeID = address.NodeID
return nil // success
}
vc.logger.Trace(
vc.logger.Debug(
"warning: validator node id lookup method failed",
"url", va.String(),
"method", method,
Expand Down Expand Up @@ -334,7 +305,7 @@ func (vc *ValidatorConnExecutor) ensureValidatorsHaveNodeIDs(validators []*types
for _, validator := range validators {
err := vc.resolveNodeID(&validator.NodeAddress)
if err != nil {
vc.logger.Warn("cannot determine node id for validator, skipping", "url", validator.String(), "error", err)
vc.logger.Error("cannot determine node id for validator, skipping", "url", validator.String(), "error", err)
continue
}
results = append(results, validator)
Expand All @@ -347,7 +318,7 @@ func (vc *ValidatorConnExecutor) disconnectValidator(validator types.Validator)
return err
}
id := validator.NodeAddress.NodeID
vc.logger.Trace("disconnecting Validator", "validator", validator, "id", id, "address", validator.NodeAddress.String())
vc.logger.Debug("disconnecting Validator", "validator", validator, "id", id, "address", validator.NodeAddress.String())
if err := vc.dialer.DisconnectAsync(id); err != nil {
return err
}
Expand All @@ -366,7 +337,7 @@ func (vc *ValidatorConnExecutor) disconnectValidators(exceptions validatorMap) e
vc.logger.Error("cannot disconnect Validator", "error", err)
continue
}
vc.logger.Trace("Validator already disconnected", "error", err)
vc.logger.Debug("Validator already disconnected", "error", err)
// We still delete the validator from vc.connectedValidators
}
delete(vc.connectedValidators, currentKey)
Expand Down Expand Up @@ -402,11 +373,11 @@ func (vc *ValidatorConnExecutor) updateConnections() error {
if err := vc.disconnectValidators(newValidators); err != nil {
return fmt.Errorf("cannot disconnect unused validators: %w", err)
}
vc.logger.Trace("filtering validators", "validators", newValidators.String())
vc.logger.Debug("filtering validators", "validators", newValidators.String())
// ensure that we can connect to all validators
newValidators = vc.filterAddresses(newValidators)
// Connect to new validators
vc.logger.Trace("dialing validators", "validators", newValidators.String())
vc.logger.Debug("dialing validators", "validators", newValidators.String())
if err := vc.dial(newValidators); err != nil {
return fmt.Errorf("cannot dial validators: %w", err)
}
Expand All @@ -419,20 +390,20 @@ func (vc *ValidatorConnExecutor) filterAddresses(validators validatorMap) valida
filtered := make(validatorMap, len(validators))
for id, validator := range validators {
if vc.proTxHash != nil && string(id) == vc.proTxHash.String() {
vc.logger.Trace("validator is ourself", "id", id, "address", validator.NodeAddress.String())
vc.logger.Debug("validator is ourself", "id", id, "address", validator.NodeAddress.String())
continue
}

if err := validator.ValidateBasic(); err != nil {
vc.logger.Warn("validator address is invalid", "id", id, "address", validator.NodeAddress.String())
vc.logger.Debug("validator address is invalid", "id", id, "address", validator.NodeAddress.String())
continue
}
if vc.connectedValidators.contains(validator) {
vc.logger.Trace("validator already connected", "id", id)
vc.logger.Debug("validator already connected", "id", id)
continue
}
if vc.dialer.IsDialingOrConnected(validator.NodeAddress.NodeID) {
vc.logger.Trace("already dialing this validator", "id", id, "address", validator.NodeAddress.String())
vc.logger.Debug("already dialing this validator", "id", id, "address", validator.NodeAddress.String())
continue
}

Expand Down
Loading
Loading