snarkOS icon indicating copy to clipboard operation
snarkOS copied to clipboard

[Feature] getblockminer-rpc

Open hairtail opened this issue 3 years ago • 3 comments

🚀 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.

hairtail avatar Dec 16 '21 16:12 hairtail

should I open a PR related with this issue now or later

hairtail avatar Dec 16 '21 16:12 hairtail

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.

ljedrz avatar Dec 16 '21 16:12 ljedrz

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" }

hairtail avatar Dec 21 '21 07:12 hairtail

Not applicable to testnet3.

ljedrz avatar Sep 02 '22 13:09 ljedrz