-
Notifications
You must be signed in to change notification settings - Fork 166
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
[Consensus] fix startup time #1402
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,29 +143,28 @@ func main() { | |
"additional fraction of replica timeout that the primary will wait for votes") | ||
flags.DurationVar(&blockRateDelay, "block-rate-delay", 250*time.Millisecond, | ||
"the delay to broadcast block proposal in order to control block production rate") | ||
flags.StringVar(&startupTimeString, "hotstuff-startup-time", cmd.NotSet, "specifies date and time (in ISO 8601 format) after which the consensus participant may enter the first view (e.g 2006-01-02T15:04:05Z07:00)") | ||
flags.StringVar(&startupTimeString, "hotstuff-startup-time", cmd.NotSet, "specifies date and time (in ISO 8601 format) after which the consensus participant may enter the first view (e.g (e.g 1996-04-24T15:04:05-07:00))") | ||
|
||
// epoch qc contract flags | ||
flags.StringVar(&accessAddress, "access-address", "", "the address of an access node") | ||
flags.StringVar(&secureAccessNodeID, "secure-access-node-id", "", "the node ID of the secure access GRPC server") | ||
flags.BoolVar(&insecureAccessAPI, "insecure-access-api", true, "required if insecure GRPC connection should be used") | ||
}).ValidateFlags(func() error { | ||
if startupTimeString != cmd.NotSet { | ||
t, err := time.Parse(time.RFC3339, startupTimeString) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. log the startup time here as well? |
||
if err != nil { | ||
return fmt.Errorf("invalid start-time value: %w", err) | ||
} | ||
startupTime = t | ||
} | ||
return nil | ||
}) | ||
|
||
if err = nodeBuilder.Initialize(); err != nil { | ||
nodeBuilder.Logger.Fatal().Err(err).Send() | ||
} | ||
|
||
nodeBuilder. | ||
ValidateFlags(func() error { | ||
if startupTimeString != cmd.NotSet { | ||
t, err := time.Parse(time.RFC3339, startupTimeString) | ||
if err != nil { | ||
return fmt.Errorf("invalid start-time value: %w", err) | ||
} | ||
startupTime = t | ||
} | ||
return nil | ||
}). | ||
Module("mutable follower state", func(builder cmd.NodeBuilder, node *cmd.NodeConfig) error { | ||
// For now, we only support state implementations from package badger. | ||
// If we ever support different implementations, the following can be replaced by a type-aware factory | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,8 +47,8 @@ init-short-epochs: | |
|
||
.PHONY: start | ||
start: | ||
docker-compose -f docker-compose.metrics.yml up -d | ||
DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker-compose -f docker-compose.nodes.yml up --build -d | ||
docker-compose -f docker-compose.metrics.yml up -d --remove-orphans | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤩 |
||
DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker-compose -f docker-compose.nodes.yml up --remove-orphans --build -d | ||
|
||
.PHONY: logs | ||
logs: | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.