Find current chain on faucet restart.#3863
Merged
afck merged 2 commits intolinera-io:testnet_babbagefrom Apr 30, 2025
Merged
Conversation
396325a to
87eb8c3
Compare
ma2bd
approved these changes
Apr 30, 2025
CLI.md
Outdated
| * `--max-chain-length <MAX_CHAIN_LENGTH>` — The maximum number of blocks in the faucet chain, before a new one is created | ||
|
|
||
| Default value: `100` | ||
| Default value: `1000` |
Contributor
There was a problem hiding this comment.
Hard to say what the best value could be. Maybe 500 ?
87eb8c3 to
3c779b4
Compare
This was referenced Apr 30, 2025
afck
added a commit
to afck/linera-protocol
that referenced
this pull request
Apr 30, 2025
This reverts commit 956961e.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
As of #3852, the faucet switches chains every 100 blocks. That means it cannot be restarted with the same command line, because the original chain may be closed (and broke).
Proposal
On restart, while the current chain is closed, keep switching to the last chain that it opened until we find the most recent one.
Also, change the default maximum length to 500 blocks to reduce the overhead and the number of chains that end up in the faucet wallet.
Test Plan
test_end_to_end_faucet_with_long_chainsrestarts the faucet now.Release Plan
mainbranch.Links