You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let changes = generate_mpt_root_changes(adapter,IMAGE_CELL_CONTRACT_ADDRESS);
❓ Can anyone guess the fact this function call also generate changes for the ckb light client contract too, even just an address IMAGE_CELL_CONTRACT_ADDRESS is passed.
❓ Can anyone guess that the above two function calls are a pair: one is getter, and one is setter, even they use different addresses as arguments.
Expected Behavior
.
Axon version
main branch
The text was updated successfully, but these errors were encountered:
Current Behavior
Initialize system contracts when Axon starts.
axon/core/run/src/lib.rs
Line 480 in 8e5d567
Generate MPT changes.
axon/core/executor/src/system_contract/mod.rs
Lines 133 to 136 in 8e5d567
Two changes are created.
axon/core/executor/src/system_contract/utils.rs
Lines 73 to 88 in 8e5d567
Two changes are applied one by one.
axon/core/executor/src/adapter/backend/apply.rs
Lines 235 to 248 in 8e5d567
Since there two changes have different addresses.
Each time a new
old_account
is initialized.axon/core/executor/src/adapter/backend/apply.rs
Lines 155 to 163 in 8e5d567
Then, each time a new
storage_trie
is initialized.axon/core/executor/src/adapter/backend/apply.rs
Lines 165 to 169 in 8e5d567
axon/core/executor/src/adapter/backend/apply.rs
Lines 171 to 175 in 8e5d567
So, these two system contracts are insert into two different MPT trie.
Let's go back to the system contracts initialization.
When try to get the
current_cell_root
, only addressCKB_LIGHT_CLIENT_CONTRACT_ADDRESS
is used.axon/core/executor/src/system_contract/mod.rs
Lines 130 to 131 in 8e5d567
❓ So, its
storage_root
won't contains the image cell contract. I'm not sure. Is this correct?When try to generate MPT changes, only address
IMAGE_CELL_CONTRACT_ADDRESS
is used.axon/core/executor/src/system_contract/mod.rs
Line 134 in 8e5d567
❓ Can anyone guess the fact this function call also generate changes for the ckb light client contract too, even just an address
IMAGE_CELL_CONTRACT_ADDRESS
is passed.❓ Can anyone guess that the above two function calls are a pair: one is getter, and one is setter, even they use different addresses as arguments.
Expected Behavior
.
Axon version
main branch
The text was updated successfully, but these errors were encountered: