Skip to content

Automatically rotate the faucet chain once it has a maximum length.#3848

Merged
afck merged 2 commits intolinera-io:mainfrom
afck:faucet-rotation
Apr 29, 2025
Merged

Automatically rotate the faucet chain once it has a maximum length.#3848
afck merged 2 commits intolinera-io:mainfrom
afck:faucet-rotation

Conversation

@afck
Copy link
Contributor

@afck afck commented Apr 29, 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.

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

@afck afck requested review from Twey, christos-h, ma2bd and ndr-ds April 29, 2025 10:50
.await
.update_wallet_for_new_chain(
chain_id,
Some(key_pair),
Copy link
Contributor

Choose a reason for hiding this comment

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

We use the same keypair on child chains?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was easiest to do it that way, and maybe it's also better: That way you don't have to keep backing up new key pairs.

Copy link
Contributor

Choose a reason for hiding this comment

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

This will change in a moment with the new Signer abstraction anyway.

Copy link
Contributor

@christos-h christos-h left a comment

Choose a reason for hiding this comment

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

LGTM :) Nice!

@afck afck merged commit 3263682 into linera-io:main Apr 29, 2025
24 checks passed
@afck afck deleted the faucet-rotation branch April 29, 2025 14:58
afck added a commit to afck/linera-protocol that referenced this pull request Apr 29, 2025
…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)
afck added a commit that referenced this pull request Apr 29, 2025
…3848) (#3852)

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

- These changes should be deployed as the faucet.

## Links

- Backport of #3848.
- [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
afck added a commit to afck/linera-protocol that referenced this pull request May 5, 2025
afck added a commit that referenced this pull request May 5, 2025
## Motivation

The current approach to automatic faucet chain rotation doesn't work
well. In particular, it closes the original chain, so restarts don't
work with the same command line arguments.

## Proposal

Revert #3848.

## Test Plan

CI

## Release Plan

- Nothing to do / These changes follow the usual release cycle.

## Links

- Reverted PR: #3848
- [reviewer
checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
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.

Rotate faucet chain.

3 participants