NethermindEth / juno

Starknet client implementation.
https://juno.nethermind.io
Apache License 2.0
402 stars 170 forks source link

Add db revert cmd #2216

Closed kirugan closed 1 month ago

kirugan commented 1 month ago

This PR adding new subcmd db revert that allows one to revert database to desired block using required flag --to-block. It's useful in cases you want to debug db starting from specific block (for instance p2p follower node)

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 64.58333% with 17 lines in your changes missing coverage. Please review.

Project coverage is 78.57%. Comparing base (a1be2eb) to head (a4db415). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/juno/dbcmd.go 64.58% 9 Missing and 8 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2216 +/- ## ========================================== + Coverage 78.50% 78.57% +0.06% ========================================== Files 102 102 Lines 9194 9232 +38 ========================================== + Hits 7218 7254 +36 Misses 1342 1342 - Partials 634 636 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

kirugan commented 1 month ago

I'll update docs, but logic won't be changed

rianhughes commented 1 month ago

Very nice 🔥