Skip to content

Extend reconfig test; sync on wallet init; fix blob fetching.#4437

Merged
afck merged 4 commits intolinera-io:mainfrom
afck:wallet-init-and-fetch-blocks
Aug 29, 2025
Merged

Extend reconfig test; sync on wallet init; fix blob fetching.#4437
afck merged 4 commits intolinera-io:mainfrom
afck:wallet-init-and-fetch-blocks

Conversation

@afck
Copy link
Contributor

@afck afck commented Aug 28, 2025

Motivation

We want to make sure the network works fine even after many reconfigurations, and even if none of the genesis validators are left.

Proposal

At the end of the reconfiguration end-to-end test, initialize a new client, request a chain and publish a blob. This test actually failed! The following two changes make it pass:

Test Plan

The reconfiguration test was extended.

Release Plan

  • These changes should be backported to the latest testnet branch, then
    • be released in a new SDK.

Links

@afck afck requested review from Twey, bart-linera, deuszx and ma2bd August 28, 2025 14:35
.await?;
Result::<(), ChainClientError>::Ok(())
let blobs = future::join_all(blob_ids.iter().map(|blob_id| async move {
remote_node.try_download_blob(*blob_id).await.unwrap()
Copy link
Contributor

Choose a reason for hiding this comment

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

Right, b/c the blobs in blob_ids can only come from the certificate (otherwise it would have been the "unexpected blob" error)?

Comment on lines +1645 to +1647
chain_client
.synchronize_chain_state_from_committee(committee)
.await?;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is for the CLI only, what about other clients? Are they all supposed to do that manually?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, also on initialization.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(But this is still a hack; needs a proper solution, but I hope this can already unblock us.)

@afck afck added this pull request to the merge queue Aug 29, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 29, 2025
@afck afck enabled auto-merge August 29, 2025 10:08
@afck afck disabled auto-merge August 29, 2025 10:08
@afck afck added this pull request to the merge queue Aug 29, 2025
Merged via the queue into linera-io:main with commit 552e63d Aug 29, 2025
28 checks passed
@afck afck deleted the wallet-init-and-fetch-blocks branch August 29, 2025 10:46
eldios pushed a commit that referenced this pull request Aug 29, 2025
## Motivation

We want to make sure the network works fine even after many
reconfigurations, and even if none of the genesis validators are left.

## Proposal

At the end of the reconfiguration end-to-end test, initialize a new
client, request a chain and publish a blob. This test actually failed!
The following two changes make it pass:

* In `wallet init`, synchronize the admin chain, trusting the validators
provided by the faucet (part of
#4434).
* Fix a bug in `process_certificates`: Since we are handling a
_certificate_, not a block proposal, we don't need additional proof for
the missing blobs: The certificate itself is proof for them. So we
should only download the blobs themselves, and not try to get another
certificate for them.

## Test Plan

The reconfiguration test was extended.

## Release Plan

- These changes should be backported to the latest `testnet` branch,
then
    - be released in a new SDK.

## Links

- _Partly_ addresses
#4434.
- [reviewer
checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
github-merge-queue bot pushed a commit that referenced this pull request Sep 1, 2025
## Motivation

In #4437 I used the
existing `currentValidators` faucet query in `wallet init` and then made
the client synchronize the initial admin chain from a committee where
all these validators have the same weight.

## Proposal

Add a `currentCommittee` query that returns the actual current
committee, and use that to synchronize.

## Test Plan

The reconfiguration test exercises this.

## Release Plan

- These changes should be backported to devnet and testnet, published in
an SDK and deployed in the faucet.

## Links

- Closes #4434.
- [reviewer
checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
eldios pushed a commit that referenced this pull request Sep 3, 2025
## Motivation

We want to make sure the network works fine even after many
reconfigurations, and even if none of the genesis validators are left.

## Proposal

At the end of the reconfiguration end-to-end test, initialize a new
client, request a chain and publish a blob. This test actually failed!
The following two changes make it pass:

* In `wallet init`, synchronize the admin chain, trusting the validators
provided by the faucet (part of
#4434).
* Fix a bug in `process_certificates`: Since we are handling a
_certificate_, not a block proposal, we don't need additional proof for
the missing blobs: The certificate itself is proof for them. So we
should only download the blobs themselves, and not try to get another
certificate for them.

## Test Plan

The reconfiguration test was extended.

## Release Plan

- These changes should be backported to the latest `testnet` branch,
then
    - be released in a new SDK.

## Links

- _Partly_ addresses
#4434.
- [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 Sep 4, 2025
…a-io#4457)

## Motivation

In linera-io#4437 I used the
existing `currentValidators` faucet query in `wallet init` and then made
the client synchronize the initial admin chain from a committee where
all these validators have the same weight.

## Proposal

Add a `currentCommittee` query that returns the actual current
committee, and use that to synchronize.

## Test Plan

The reconfiguration test exercises this.

## Release Plan

- These changes should be backported to devnet and testnet, published in
an SDK and deployed in the faucet.

## Links

- Closes linera-io#4434.
- [reviewer
checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
ma2bd pushed a commit that referenced this pull request Sep 5, 2025
## Motivation

In #4437 I used the
existing `currentValidators` faucet query in `wallet init` and then made
the client synchronize the initial admin chain from a committee where
all these validators have the same weight.

## Proposal

Add a `currentCommittee` query that returns the actual current
committee, and use that to synchronize.

## Test Plan

The reconfiguration test exercises this.

## Release Plan

- These changes should be backported to devnet and testnet, published in
an SDK and deployed in the faucet.

## Links

- Closes #4434.
- [reviewer
checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
ma2bd pushed a commit that referenced this pull request Sep 5, 2025
## Motivation

In #4437 I used the
existing `currentValidators` faucet query in `wallet init` and then made
the client synchronize the initial admin chain from a committee where
all these validators have the same weight.

## Proposal

Add a `currentCommittee` query that returns the actual current
committee, and use that to synchronize.

## Test Plan

The reconfiguration test exercises this.

## Release Plan

- These changes should be backported to devnet and testnet, published in
an SDK and deployed in the faucet.

## Links

- Closes #4434.
- [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.

2 participants