Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop updating the wallet during linera benchmark #3367

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

ndr-ds
Copy link
Contributor

@ndr-ds ndr-ds commented Feb 18, 2025

Motivation

For the chains we're using during the benchmark, we were currently adding them to our wallet. However, that is not necessary.

Proposal

Create chains for the benchmark, and don't add them to any wallet, just use them for the benchmark then close them.

Test Plan

Ran locally, saw that things worked correctly

Release Plan

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

Copy link
Contributor Author

ndr-ds commented Feb 18, 2025

@ndr-ds ndr-ds force-pushed the 02-18-stop_updating_the_wallet_during_linera_benchmark branch 2 times, most recently from 6ce896d to d1250d4 Compare February 18, 2025 21:48
@ndr-ds ndr-ds marked this pull request as draft February 18, 2025 22:35
@ndr-ds ndr-ds force-pushed the 02-18-stop_updating_the_wallet_during_linera_benchmark branch from d1250d4 to 94c5bf2 Compare February 18, 2025 22:55
@ndr-ds ndr-ds force-pushed the 02-18-stop_updating_the_wallet_during_linera_benchmark branch 4 times, most recently from ebd651b to 10e8da9 Compare February 19, 2025 18:20
@ndr-ds ndr-ds marked this pull request as ready for review February 19, 2025 18:21
Comment on lines 821 to 823
chain_info.block_hash,
chain_info.timestamp,
chain_info.next_block_height,
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 always be

                None,
                timestamp_of_certificate_in_line_767,
                BlockHeight::ZERO,

won't it? I think the timestamp doesn't even matter as long as the local clock isn't reset to an earlier time, so we could set that to zero or now().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point!

// Below all block proposals are supposed to succeed without retries, we
// must make sure that all incoming payments have been accepted on-chain
// and that no validator is missing user certificates.
context.process_inboxes_and_force_validator_updates().await;
context
.process_inbox_without_updating_wallet(&chain_client)
Copy link
Contributor

Choose a reason for hiding this comment

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

But for the default chain we do want to update the wallet?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, I guess if something else changes it (if it's used for something other than the benchmark). Good point

Copy link
Contributor

Choose a reason for hiding this comment

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

Also because of the blocks we created on the default chain to open the benchmark chains. The default chain has a greater block height after the benchmark than before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True 😅

Comment on lines 670 to 677
let info = self
.client
.local_node()
.clone()
.handle_certificate(certificate.clone(), &())
.await?
.info;
chain_client.update_from_info(&info);
Copy link
Contributor

Choose a reason for hiding this comment

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

Alternatively, we could make process_certificate public?

Suggested change
let info = self
.client
.local_node()
.clone()
.handle_certificate(certificate.clone(), &())
.await?
.info;
chain_client.update_from_info(&info);
chain_client.process_certificate(certificate.clone()).await?;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, nice! Good idea

@ndr-ds ndr-ds force-pushed the 02-18-stop_updating_the_wallet_during_linera_benchmark branch 2 times, most recently from e4b2dac to 220ab76 Compare February 20, 2025 13:57
@ndr-ds ndr-ds force-pushed the 02-18-stop_updating_the_wallet_during_linera_benchmark branch from 220ab76 to 56771fa Compare February 20, 2025 14:31
Copy link
Contributor Author

ndr-ds commented Feb 20, 2025

Merge activity

  • Feb 20, 10:15 AM EST: A user started a stack merge that includes this pull request via Graphite.
  • Feb 20, 10:16 AM EST: A user merged this pull request with Graphite.

@ndr-ds ndr-ds merged commit 108dccb into main Feb 20, 2025
22 checks passed
@ndr-ds ndr-ds deleted the 02-18-stop_updating_the_wallet_during_linera_benchmark branch February 20, 2025 15:16
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