Do blocks responses change from version to version?

I was looking at a freshly synced node and comparing contents synce I was adding indexation and testing new ways to keep data indexed and i realized that blocks that were recently sync’d have fields that old blocks do not have. Specifically I was looking at block 11373 in a new and one old node, and i see a new “info” field that has a string in the form of “cb_” string that appears to be base’d (either 58 or 64). I assume cb_Xfbg4g== is the empty string and those are the checksum of empty.

But it caught my eye that the field is not in all the nodes I checked.

It seems to me as if there is new code that returns this field, and if it is empty it returns the field with an empty strimg, checksumed, base64. Instead of not returning that field at all.

Is this normal and expected?

I think the field was introduced with the last hard-fork, but is currently unused, so it can be used as activation signaling for future hard-forks by miners, i.e. when less than X% of blocks until time Y show the updated field, the fork is not activated.

Correct me if I am wrong @hanssv.chain.

1 Like

Interesting. I see it shows up in the response from the node, so when i got the block the first time and stored it into the database the response didn’t have it, but if I check directly the nodes now the response does have it.

Indeed we did upgrade the keyblock headers around 16 months ago. As Pivo said, we activated it on lima release. None of the headers before that had it. Once you fetch a pre-lima hardfork block - it wouldn’t have it. If you ask a node for that block - it would provide you with a default value of an empty string.

Hopefully that helps.

2 Likes

Yes correct.

It is Base64(Check) encoded. cb_Xfbg4g== is indeed the empty field. It was added for Fortuna I think. The API will return an info field also for older blocks, with the info being “empty”.

The miner can set it to whatever they like, it will (potentially) be used to signal upgrades.

3 Likes

thanks hans!
I should just invite you a drink and ask you all the questions I have regarding the node it seems

Thanks dimitar!
yes, that indeed does help

1 Like

No beer for me?

1 Like

There is beer in my most recent post! :smiley:

1 Like