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

Add user operation results in execution outcome #3494

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

usagi32
Copy link
Contributor

@usagi32 usagi32 commented Mar 6, 2025

Motivation

resolves #3378

Test Plan

CI

Release Plan

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

.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)
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

@ma2bd ma2bd Mar 7, 2025

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.


impl<'de> BcsHashable<'de> for OperationResult {}

doc_scalar!(OperationResult, "The outcome of a single operation.");
Copy link
Contributor

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?

@ma2bd
Copy link
Contributor

ma2bd commented Mar 6, 2025

To update the formats, you may have to run something INSTA_UPDATE=always cargo insta test -p linera-rpc

@usagi32
Copy link
Contributor Author

usagi32 commented Mar 6, 2025

To update the formats, you may have to run something INSTA_UPDATE=always cargo insta test -p linera-rpc

They are already updated

Copy link
Contributor

@afck afck left a comment

Choose a reason for hiding this comment

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

Looks great! 👍

usagi32 and others added 2 commits March 7, 2025 16:13
Co-authored-by: Andreas Fackler <[email protected]>
Signed-off-by: usagi32 <[email protected]>
Copy link
Contributor

@afck afck left a 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.)

@usagi32 usagi32 requested a review from ma2bd March 7, 2025 11:10
@usagi32
Copy link
Contributor Author

usagi32 commented Mar 7, 2025

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 bcs_scalar! was the one failing the CI (source of failure was the indexer test from storage service tests and the other test that failed was probably just a random failure)
I reverted it back to doc_scalar

@usagi32 usagi32 requested a review from afck March 7, 2025 14:17
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.

Put operation results in executed block
3 participants