AcalaNetwork / chopsticks

Create parallel reality of your Substrate network.
Apache License 2.0
138 stars 84 forks source link

review usage of wasm / registry / metadata #494

Closed xlc closed 7 months ago

xlc commented 1 year ago

When execute a block, it should be using the parent wasm for execution.

This includes runtime calls etc. https://github.com/AcalaNetwork/chopsticks/blob/6191b00a1533d54655e62f271261e0ce7e7e3b80/packages/core/src/blockchain/block.ts#L312

setWasm on a block shouldn't impact its execution result. but the next block.

Similarly, the registry should of current block should be using the metadata from parent block.

Needs to review all the usage of wasm/metadata/registry to ensure we are using the right one.

I think we need to rename wasm/metadata/registry to avoid ambiguity. Or make then internal and expose some better named methods.

ermalkaleci commented 11 months ago

I don't think this is an issue. It's already using parent wasm

xlc commented 11 months ago

This is mainly about review and make sure everything is good and if that's the case, we can close it