ergoplatform / ergo

Ergo protocol description & reference client implementation
https://ergoplatform.org/
Creative Commons Zero v1.0 Universal
504 stars 170 forks source link

[API Request] /block/ **endpoints** #2108

Open mgpai22 opened 10 months ago

mgpai22 commented 10 months ago

When headers information only is returned it would be useful to also return transaction count.

This is needed because currently, if I want transaction count I must load the full block which returns all transaction information. This may not be an issue for one block, however, when requesting several full blocks in one request, the data really adds up. It becomes unmanageable for web clients.

mgpai22 commented 10 months ago

Miner contract address being returned for header information would be useful as well. You can either determine it by getting full block information and parsing the coinbase transaction, or it can be compiled using the pk found in the header response.

mgpai22 commented 10 months ago

size on explorer vs node does not seem to match

kushti commented 9 months ago

Size on the explorer looks weird , max short value just.

I guess, you are requesting a new method which will return transactions count (miner address) by header id ? Not sure this information is needed for all the header endpoint users.

mgpai22 commented 9 months ago

I was hoping it would be returned with all current header info endpoint rather than a new dedicated endpoint for my request

kushti commented 9 months ago

I was hoping it would be returned with all current header info endpoint rather than a new dedicated endpoint for my request

Why "/header" request should suddenly start providing auxiliary information in addition to header? I think introducing new request is more clear

mgpai22 commented 9 months ago

@kushti the problem with a new request is that it is only one specific endpoint. I ask that the auxiliary information is added to the BlockHeader schema itself as it allows all header related endpoint to have the info such as /blocks, /blocks/at, /blocks/chainSlice, etc.

It is difficult to use the node as a replacement to the explorer otherwise.