stacks-core icon indicating copy to clipboard operation
stacks-core copied to clipboard

Streamline burnchain block height types

Open lgalabru opened this issue 5 years ago • 2 comments

I've noticed some type discrepancy between this 2 structs:

pub struct BurnchainBlockHeader {
    pub block_height: u64,
    ...
} 

and

pub struct StacksHeaderInfo {
    ...
    pub burn_header_height: u32,
    ...
}

Per Jude

we are constrained by the block-commit wire format to use 32 bits for block height, but the vast majority of the codebase uses 64 bits for a block height. the reason for this is that the block-commit wire format is specific to Bitcoin, and we only have 80 bytes to work with. If we ported the system to, e.g., Stacks itself, then we could comfortably support 64-bit block heights I'm in favor of making the whole system 64-bit, except for the block-commit wire format (since we're not married to Bitcoin)

lgalabru avatar Oct 01 '20 14:10 lgalabru

There's an engineering difficulty: the MARF uses 32-bit block heights. This needs more investigation on how invasive of a change it would be to convert the MARF to using 64-bit block heights.

jcnelson avatar Oct 05 '20 15:10 jcnelson

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 10 '22 04:07 stale[bot]

This issue has been automatically closed. Please reopen if needed.

stale[bot] avatar Aug 12 '22 04:08 stale[bot]