Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bin): db get for snapshots #6465

Merged
merged 7 commits into from
Feb 12, 2024
Merged

Conversation

shekhirin
Copy link
Collaborator

@shekhirin shekhirin commented Feb 7, 2024

reth (alexey/db-get-snapshots) ./target/debug/reth db --chain holesky get snapshot headers 1     
{
  "parent_hash": "0xb5f7f912443c940f21fd611f12828d75b534364ed9e95ca4e307729a4661bde4",
  "ommers_hash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
  "beneficiary": "0x0000000000000000000000000000000000000000",
  "state_root": "0x69d8c9d72f6fa4ad42d4702b433707212f90db395eb54dc20bc85de253788783",
  "transactions_root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
  "receipts_root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
  "withdrawals_root": null,
  "logs_bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  "difficulty": "0x0",
  "number": 1,
  "gas_limit": 25024413,
  "gas_used": 0,
  "timestamp": 1695902424,
  "mix_hash": "0xb5f7f912443c940f21fd611f12828d75b534364ed9e95ca4e307729a4661bde4",
  "nonce": 0,
  "base_fee_per_gas": 875000000,
  "blob_gas_used": null,
  "excess_blob_gas": null,
  "parent_beacon_block_root": null,
  "extra_data": "0xd883010d02846765746888676f312e32312e31856c696e7578"
}
"0xe9011e6d15a0d0c16f65a38f84375bf1a6b88201b0ad75a2660df0bb8d1ac381"reth (alexey/db-get-snapshots) ./target/debug/reth db --chain holesky get snapshot transactions 1
{
  "signature": {
    "r": "0x760ba636268539d03439bbb970909ed08c1b432d04d7aa70708e5ba5eef74a2",
    "s": "0x1c264f555c8ceadd7761e703415647b7cbd676647a60c168602797e294dc936c",
    "odd_y_parity": true
  },
  "transaction": {
    "Eip1559": {
      "chain_id": 17000,
      "nonce": 0,
      "gas_limit": 21000,
      "max_fee_per_gas": 300000000000,
      "max_priority_fee_per_gas": 4000000000,
      "to": {
        "Call": "0x143ca2fc6187b86106f305f415c9471d80228775"
      },
      "value": "0x51e410c0f93fe543000000",
      "access_list": [],
      "input": "0x"
    }
  }
}reth (alexey/db-get-snapshots) ./target/debug/reth db --chain holesky get snapshot receipts 1    
{
  "tx_type": "EIP1559",
  "success": true,
  "cumulative_gas_used": 42992,
  "logs": []
}

@shekhirin shekhirin force-pushed the feat/static-files branch 5 times, most recently from dd6aa63 to 613f319 Compare February 8, 2024 17:03
@gakonst
Copy link
Member

gakonst commented Feb 8, 2024

Should this say get snapshot or just get?

@shekhirin
Copy link
Collaborator Author

Should this say get snapshot or just get?

IMO we want to be explicit about the source of data for debugging purposes

@shekhirin shekhirin marked this pull request as ready for review February 9, 2024 15:47
@shekhirin shekhirin added A-cli Related to the reth CLI A-static-files Related to static files C-enhancement New feature or request labels Feb 9, 2024
Copy link
Member

@onbjerg onbjerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, agree wrt being explicit about the data source

@shekhirin shekhirin merged commit 123fc2f into feat/static-files Feb 12, 2024
23 of 25 checks passed
@shekhirin shekhirin deleted the alexey/db-get-snapshots branch February 12, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Related to the reth CLI A-static-files Related to static files C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants