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

feat: incorporate child #537

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

feat: incorporate child #537

wants to merge 5 commits into from

Conversation

enitrat
Copy link
Collaborator

@enitrat enitrat commented Jan 24, 2025

Closes #531

@enitrat enitrat requested a review from Eikix January 24, 2025 14:32
@enitrat enitrat requested review from obatirou and Eikix January 24, 2025 15:14
@enitrat enitrat force-pushed the feat/incorporate-child branch 3 times, most recently from 637ba30 to 5db356d Compare January 24, 2025 16:13
@enitrat enitrat force-pushed the feat/incorporate-child branch from 5db356d to 6b29052 Compare January 24, 2025 17:01
@enitrat
Copy link
Collaborator Author

enitrat commented Jan 24, 2025

@Eikix ready khap

new TupleLogStruct(data=evm.value.logs.value.data, len=evm.value.logs.value.len + len)
);

let new_refund_counter = evm.value.refund_counter + child_evm.value.refund_counter;
Copy link
Contributor

@obatirou obatirou Jan 26, 2025

Choose a reason for hiding this comment

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

This could overflow. Add a comment why this cannot or add a check to ensure it does not.
Same for gas left.

// they were moved into the Evm, which we just squashed.

// No need to squash the env's `state` and `transient_storage` because it was handled in `rollback_transaction`,
// when we squashed and appended the prev keys to the parent's state and transient storage segments.
Copy link
Contributor

@obatirou obatirou Jan 26, 2025

Choose a reason for hiding this comment

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

why rollback_transaction is mentioned even though it is the success case? Shouldn't this be commit_transaction?

Comment on lines +336 to +337
// No need to squash the message's `accessed_addresses` and `accessed_storage_keys` because
// they were moved into the Evm, which we just squashed.
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure about this formulation. It should explicitly say that the those dict are shared between the message and the Evm for more context?

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.

incorporate_child_on_error incorporate_child_on_success
3 participants