Skip to content

Find current chain on faucet restart.#3863

Merged
afck merged 2 commits intolinera-io:testnet_babbagefrom
afck:testnet_babbage-faucet-restart
Apr 30, 2025
Merged

Find current chain on faucet restart.#3863
afck merged 2 commits intolinera-io:testnet_babbagefrom
afck:testnet_babbage-faucet-restart

Conversation

@afck
Copy link
Contributor

@afck afck commented 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

@afck afck requested review from Twey, christos-h, ma2bd and ndr-ds April 30, 2025 09:17
@afck afck force-pushed the testnet_babbage-faucet-restart branch from 396325a to 87eb8c3 Compare April 30, 2025 09:26
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`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard to say what the best value could be. Maybe 500 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 3c779b4.

@afck afck force-pushed the testnet_babbage-faucet-restart branch from 87eb8c3 to 3c779b4 Compare April 30, 2025 09:56
@afck afck merged commit 956961e into linera-io:testnet_babbage Apr 30, 2025
24 checks passed
@afck afck deleted the testnet_babbage-faucet-restart branch April 30, 2025 10:21
afck added a commit to afck/linera-protocol that referenced this pull request Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants