Skip to content

RPC methods to scan notarisations DB#848

Merged
jl777 merged 1 commit intojl777:devfrom
ssadler:rpcScanNotarisationsDB
Aug 26, 2018
Merged

RPC methods to scan notarisations DB#848
jl777 merged 1 commit intojl777:devfrom
ssadler:rpcScanNotarisationsDB

Conversation

@ssadler
Copy link
Copy Markdown

@ssadler ssadler commented Aug 26, 2018

Add new RPC methods for accessing the notarisations DB in KMD:
scanNotarisationsDB blockHeight symbol [blocksLimit=1440]
getNotarisationsForBlock blockHash

The first one is most useful, now you can find a notarisation opreturn, for example:

$ src/komodo-cli scanNotarisationsDB 981464 BOTS
{
  "height": 981464,
  "hash": "57d333cc73fe5c144053c95bd84b35925d2af6c6cee637a45903dc5b702a1dde",
  "opreturn": "2fac299362e4e2cf0426fc96b17499971ddf4eeb50f9322cd8317c319b85050048410400424f5453008092c029843dea1799cbef5791da13a30ac8a9a40470f75a5b8c342429f79911080000000000000000000000000000000000000000000000000000000000000000000000"
}
$ komodo-cli scanNotarisationsDB 981463 BOTS
{
  "height": 981455,
  "hash": "3b7900dc61cfcc8a5b35941a1ccfdb57edb12e54d3dcdc9c4191f5c182b949fe",
  "opreturn": "98a38e91cfdf6c16ca4e89b141343909e582326dc1d08b2e877022ed9940040040410400424f545300df5eda2705615edd8a639a363ea86bd9f4a0deded6e66c55b6529c3162769a57100000000000000000000000000000000000000000000000000000000000000000000000"
}

This can allow making a binary search on the notarisations DB, which can enable making proofs from the outside.

@jl777 jl777 merged commit 144c599 into jl777:dev Aug 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants