eqlabs / pathfinder

A Starknet full node written in Rust
https://eqlabs.github.io/pathfinder/
Other
622 stars 231 forks source link

Upgrade blockifier to v0.8.0-dev.0 #2081

Closed kkovaacs closed 2 months ago

kkovaacs commented 3 months ago

Note: this change must not be merged until blockifier is stabilized.

Blockifier v0.8.0-dev.0 depends on 2.7.0-dev.0 of the compiler, v1.0.0-rc3 of the VM and introduces a dependency on the felt implementation from starknet-types-core.

Because of the felt changes (and potential blockifier API changes) we're expecting this to be a non-trivial update so it's worth trying to do the upgrade to such an early pre-release just to see potential issues.

For more info see https://community.starknet.io/t/starknet-v0-13-2-pre-release-notes/114223#blockifier-10

kkovaacs commented 3 months ago

Some changes have been pushed to the krisztian/blockifier-0.8.0-upgrade branch. However, this is not functional yet (does not compile).

Looks like there's no way in 0.8.0-dev.0 to get state diff details from a CachedState object after executing a transaction.

CachedState::to_state_diff() returns a StateMap object but all members are private and there are no getter methods implemented.

kkovaacs commented 3 months ago

We now have a workaround for the StateMap attributes being private. I've also updated versioned constants and added one for 0.13.1.1. Most tests pass now -- except for some error conversion tests.

kkovaacs commented 3 months ago

OK, tests are now passing. I've also run re_execute for the last few thousand mainnet blocks: re_execute_mainnet_650000.txt.gz

kkovaacs commented 2 months ago

There are some more API changes in the rc.0 version compared to dev.0, so we'll have to catch up with those too.

kkovaacs commented 2 months ago

Tests now do pass (but we'll need to add some more tests with the new pricing for 0.13.2).

There seems to be an issue with fee estimation for reverted transactions (we under-estimate these, potentially causing issues in block traces).