erigon-pulse/cmd/restapi
ledgerwatch 137daa6c67
Fixes in generated changeSet and checkChangeSets (#698)
* Debugging changesets

* Kinda works

* Fix compile error

* Fix formatting

* Fix lint

* Duplicate entries kludge

* Fix compile error

* Cleanup
2020-07-01 15:56:56 +01:00
..
apis Fixes in generated changeSet and checkChangeSets (#698) 2020-07-01 15:56:56 +01:00
commands non-concurrent ETL, debug_traceTransaction in rcpdaemon (#692) 2020-06-28 07:10:27 +01:00
rest Prepare codebase for future default DB change (#670) 2020-06-16 14:36:16 +01:00
Dockerfile Add support of geth on hostmachine (#437) 2020-04-11 08:22:23 +01:00
main.go Debug Web UI prototype (#362) 2020-02-09 13:31:52 +03:00
README.md Tx retrace extension for Rest API (#436) 2020-04-10 19:47:45 +01:00

Turbo-Geth Rest API

Build

make restapi

Running

  • Running node with --remote-db-listen-addr (e.g ./build/bin/geth --remote-db-listen-addr localhost:9999).
  • Running Restapi: ./build/bin/restapi (Default Port: 8080)

API

  • /api/v1/remote-db/: gives remote-db url
  • /api/v1/accounts/:accountID: gives account data
    • accountID is account address
    • Reponse:
{

    "balance":"BALANCE",
    "code_hash":"HASH",
    "implementation":
        {
            "incarnation":NUMBER
        },
        "nonce":NUMBER,
        "root_hash":"HASH"      
}
  • /api/v1/storage/
    • gives the storage
    • Response:
[
    {"prefix": "Storage Prefix","value": "Value"},
    ...
]
  • /api/v1/retrace/:chain/:number
    • chain is the name of the chain(mainnet, testnet, goerli and rinkeby)
    • number is block number (e.g 98345)
    • extract changeSets and readSets for each block
    • Response:
[
    {
        "storage": {
            "reads": [READ, ...],
            "writes": [WRITE, ...]
        },
        "accounts": {
            "reads": [READ, ...],
            "writes": [WRITE, ...]
        }
    }
]
  • /api/v1/intermediate-hash/
    • extract intermediate hashes
    • Response:
[
    {"prefix": "Prefix","value": "Value"},
    ...
]