-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Stop updating the wallet during linera benchmark #3367
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
6ce896d
to
d1250d4
Compare
d1250d4
to
94c5bf2
Compare
ebd651b
to
10e8da9
Compare
linera-client/src/client_context.rs
Outdated
chain_info.block_hash, | ||
chain_info.timestamp, | ||
chain_info.next_block_height, |
There was a problem hiding this comment.
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()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
linera-service/src/linera/main.rs
Outdated
// 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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True 😅
linera-client/src/client_context.rs
Outdated
let info = self | ||
.client | ||
.local_node() | ||
.clone() | ||
.handle_certificate(certificate.clone(), &()) | ||
.await? | ||
.info; | ||
chain_client.update_from_info(&info); |
There was a problem hiding this comment.
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?
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?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, nice! Good idea
e4b2dac
to
220ab76
Compare
220ab76
to
56771fa
Compare
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