-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add user operation results in execution outcome #3494
base: main
Are you sure you want to change the base?
Conversation
.track_block_size_of(&(&txn_outcome.operation_result)) | ||
.with_execution_context(chain_execution_context)?; | ||
resource_controller | ||
.track_executed_block_size_sequence_extension(operation_results.len(), 1) |
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.
@afck Should we simplify this away? I believe this function was meant for a single vector but now we have many.
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.
Right, we currently have multiple sequences of the same length, so we could just add a multiplier to track_executed_block_size_sequence_extension
. Probably something for a separate PR, though. Also, the new sequence doesn't have the same length, because it's only as long as the operations, not all transactions.
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.
@afck We should over-approximate this (basically remove it entirely). IIRC it will never go over 5 bytes per vector.
linera-chain/src/data_types.rs
Outdated
|
||
impl<'de> BcsHashable<'de> for OperationResult {} | ||
|
||
doc_scalar!(OperationResult, "The outcome of a single operation."); |
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.
@afck Should this be bcs_scalar
?
To update the formats, you may have to run something |
They are already updated |
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.
Looks great! 👍
Co-authored-by: Andreas Fackler <[email protected]> Signed-off-by: usagi32 <[email protected]>
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.
Looks good to me! 👍
(I'll let @ma2bd take another look, but from my side it's good to merge, once the remaining tests are fixed.)
Ok so |
Motivation
resolves #3378
Test Plan
CI
Release Plan