Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Use virtual size instead of raw size #43
Since segwit was activated at block 494,784, the limiting resource on block space is 'weight', which is defined in BIP 141 as:
For fee market analysis, the relevant metric is transaction weight (Base transaction size * 3 + Total transaction size), which can be normalized to virtual size (Transaction weight / 4). This is because miners will order transactions by fee/virtual byte to maximize the fee yield from a block.
For transactions without any segwit inputs, virtual size is the same as size.
BlockSci should therefore store the tx virtual size instead of tx size. Virtual size is exposed in the
Good catch, this is definitely a segwit support issue. I think the answer is to record both the real size and the virtual size since they are both useful quantities. Both should be able to fit in the current data format without any major changes. I'll slot this for the next major release.