Skip to content

One time AddressableEntity migration at protocol upgrade - #5433

Open
darthsiroftardis wants to merge 17 commits into
casper-network:feat-evmfrom
darthsiroftardis:one-time-ae-conversion
Open

One time AddressableEntity migration at protocol upgrade#5433
darthsiroftardis wants to merge 17 commits into
casper-network:feat-evmfrom
darthsiroftardis:one-time-ae-conversion

Conversation

@darthsiroftardis

Copy link
Copy Markdown
Contributor

CHANGELOG:

  • Changed protocol upgrade logic to perform a one time migration of accounts and contracts to AE
  • Changed protocol upgrade logic to write the enable_addressable_entity_flag to global state during the upgrade

Comment thread execution_engine/src/runtime_context/mod.rs Outdated
Comment thread execution_engine_testing/tests/src/test/contract_api/get_call_stack.rs Outdated
Comment thread node/src/components/contract_runtime/tests.rs Outdated
for account_key in hash_keys.iter() {
if let Ok(Some(StoredValue::ContractPackage(_))) = self.tracking_copy.read(account_key)
{
println!("migrating {account_key}");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

print

debug!("successfully migrated package")
}
Err(tc_error) => {
error!("unable to migrate package {}", tc_error)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we should fail the whole upgrade procedure at this point

debug!("successfully migrated account {}", account_hash)
}
Err(tc_error) => {
error!("failed to migrate userland account {}", tc_error)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we should fail the upgrade procedure at this point?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Failing the entire upgrade for either a singular userland account and/or contract felt a little too extreme. So i figured it made sense to log the error and continue with the upgrade

@zajko zajko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PTAl at the comments

@darthsiroftardis

Copy link
Copy Markdown
Contributor Author

Yep, addressing comments

…version

# Conflicts:
#	execution_engine_testing/tests/src/test/explorer/faucet.rs
#	executor/evm/tests/executor.rs
#	node/src/components/contract_runtime/tests.rs
#	storage/src/eip4788.rs
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.

3 participants