reth icon indicating copy to clipboard operation
reth copied to clipboard

`reth db get` is missing changeset tables

Open benharbit opened this issue 2 years ago • 1 comments

Describe the bug

https://github.com/paradigmxyz/reth/blob/3bba41a209e308abdbe8e88f601f365566befa7d/bin/reth/src/db/get.rs#L49-L70)

https://github.com/paradigmxyz/reth/blob/3bba41a209e308abdbe8e88f601f365566befa7d/bin/reth/src/db/mod.rs#L195-L221

Steps to reproduce

run "reth db get AccountChangeSet 0"

Node logs

No response

Platform(s)

No response

What version/commit are you on?

No response

Code of Conduct

  • [X] I agree to follow the Code of Conduct

benharbit avatar Jun 14 '23 18:06 benharbit

The reason for this is that the changeset tables have keys that are tough to communicate over CLI. The keys are a concat of block number + address

onbjerg avatar Jun 15 '23 05:06 onbjerg

This issue is stale because it has been open for 14 days with no activity.

github-actions[bot] avatar Jul 04 '23 02:07 github-actions[bot]

@onbjerg are we planning to support this?

DaniPopes avatar Dec 28 '23 14:12 DaniPopes

works, although a bit ugly:

./target/maxperf/reth db --datadir holesky get mdbx StorageChangeSets "[0,\"0x4242424242424242424242424242424242424242\"]" 0x0000000000000000000000000000000000000000000000000000000000000024
(...)
2024-07-12T10:32:37.347357Z  INFO Verifying storage consistency.
{
  "key": "0x0000000000000000000000000000000000000000000000000000000000000024",
  "value": "0x0"
}
./target/maxperf/reth db --datadir holesky get mdbx AccountChangeSets 100000 "0xd6ac1955d2364cffc41ce5c00bc590f76fb7e533"
(...)
2024-07-12T10:39:42.218085Z  INFO Verifying storage consistency.
{
  "address": "0xd6ac1955d2364cffc41ce5c00bc590f76fb7e533",
  "info": {
    "nonce": 8,
    "balance": "0x1cc6bced57352375bd",
    "bytecode_hash": null
  }
}

joshieDo avatar Jul 12 '24 10:07 joshieDo