Automatically rotate the faucet chain once it has a maximum length. (#3848)#3852
Merged
afck merged 1 commit intolinera-io:testnet_babbagefrom Apr 29, 2025
Merged
Conversation
…inera-io#3848) ## Motivation If the faucet chain gets very long, requesting a new chain becomes very slow for new wallets. ## Proposal Make the faucet switch chains every 100 blocks. ## Test Plan I extended `test_end_to_end_faucet_with_long_chains`. ## Release Plan - Nothing to do / These changes follow the usual release cycle. - These changes should be backported to the latest `testnet` branch, then - be deployed as the faucet. ## Links - Closes linera-io#3846. - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
ndr-ds
approved these changes
Apr 29, 2025
afck
added a commit
that referenced
this pull request
Apr 30, 2025
## 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_chains` restarts the faucet now. ## Release Plan - These changes should be ported to the `main` branch. - The faucet should be restarted with this. ## Links - See #3852. - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
afck
added a commit
to afck/linera-protocol
that referenced
this pull request
Apr 30, 2025
…ength. (linera-io#3848) (linera-io#3852)" This reverts commit 026f601.
afck
added a commit
that referenced
this pull request
May 6, 2025
## Motivation If the faucet chain gets very long, requesting a new chain becomes very slow for new wallets. ## Proposal Make the faucet switch chains every 100 blocks. The previous attempt was reverted: #3852 This new approach makes it less problematic to restart the faucet: The faucet now only uses the main chain (which in practice will usually be one of our root chains in the testnet) to create temporary child chains. It only provides each child with enough funds to serve 100 user requests. (That number is a config option.) Once the child's funds are exhausted, it is closed and removed from the wallet, and a new child is created from the main chain. In particular, the main chain is never drained of all funds at once, it never gets closed, and it is never used to directly serve user requests. All chains requested by users are _grandchildren_ of the main chain, because they are created by one of the temporary chains. Since these are never longer than 100 blocks, synchronization for new users should be much faster. ## Test Plan `test_end_to_end_faucet_chain_limit` ## Release Plan - These changes should be deployed on Testnet Babbage. - They _could_ be ported to `main`. ## Links - Closes #3846. - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
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.
Backport of #3848.
Motivation
If the faucet chain gets very long, requesting a new chain becomes very slow for new wallets.
Proposal
Make the faucet switch chains every 100 blocks.
Test Plan
I extended
test_end_to_end_faucet_with_long_chains.Release Plan
Links