-
Notifications
You must be signed in to change notification settings - Fork 802
Added /api/v1/blocks-extras endpoint #1235
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
Conversation
I've rebased the branch on master because there was a conflict. Please |
Quick benchmark regarding the block indexing process. It took 22961 seconds (~6 hours 22 minutes) to index all blocks and their coinbase transaction on my machine at an average of 31 blocks per seconds. Benchmark hardware specs:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested ACK @ v2.4.0-dev [ba36ab3]
This PR adds two news endpoints
/api/v1/blocks-extras
and/api/v1/blocks-extras/:height
. This endpoint is not yet used anywhere in the front end, and it does not replace any existing node backend endpoint.This PR adds two new optional field to the
ExtendedBlock
interface.pool
andcoinbaseHex
. Those fields are only available in the response if the network isbitcoin
,testnet
orsignet
ANDconfig.database.enabled
flag is set totrue
.Before testing each scenarios make sure to set your
schema_version
to 4 in the database, delete your blocks db table content, and wipe thecache/
folder. Then restart the node backend.Feel free to test other scenarios as well as I'm limited locally.
Therefore, three scenarios must be tested (
curl localhost:4200/api/v1/blocks-extras | jq
)config.database.enabled
set to falseextras
sub object, with possible zeroed values:medianFee
,feeRange
,reward
,coinbaseTx
,matchRate
config.database.enabled
set to trueextras
sub object, with possible zeroed values:medianFee
,feeRange
,reward
,coinbaseTx
,matchRate
,pool.name
pool.id
andcoinbaseHex
Since new fields are added to the block data stucture, the cached blocks in the node backend are also impacted, therefore it is still possible that the front end may be impacted (it should not of course).
Things to double check are: