snarkOS
snarkOS copied to clipboard
[Feature] getblockminer-rpc
🚀 Feature
Block producer should be displayed in explorer, so miner can know whether themselves have mined a block in testnet2.
Motivation
getblockminer rpc. with this rpc, anybody can get information (address) of block producer.
Implementation
Are you willing to open a pull request? (See CONTRIBUTING) Add getblockminer rpc method, which I have finished. I will open a pull request after this issue.
should I open a PR related with this issue now or later
Please outline how it is intended to be called (the parameters etc.) and what the response would contain.
I introduced a tentative
label for features that first need to be accepted; it would be best not to post a PR until then. It's not my call to make, I'll defer it to @howardwu.
Request:params indicate the height to query curl --data-binary '{"jsonrpc": "2.0", "id":"documentation", "method": "getblockminer", "params": [66666] }' -H 'content-type: application/json' http://127.0.0.1:3032/ Response: { "jsonrpc": "2.0", "result": "aleo1gqa7nht8lv93ksgmfy8hnz028r776evnv5kllkcsx2ycek5ryq9suprafw", "id": "documentation" }
Not applicable to testnet3.