You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From my understanding of rfc9171, there isn't really a limit on the number of canonical blocks you can have. However, ION imposes a soft limit of around 255. This is because the block number is stored as a unsigned char in the ExtensionBlock struct, and selectBlkNumber similarly returns an unsigned char.
selectBlkNumber in particular could pose trouble if someone were to send a bundle containing a block number set to a multiple of 255. In that case, selectBlkNumber would return 0 due to rolling over after adding 1.
It's probably best to either impose a hard limit on the maximum block number, or store it as a uvast. According to the spec, the block number is simply for uniquely identifying blocks, so there is nothing stopping an implementation from starting their canonical block numbering from 2^64-1 instead of starting from 2 like ION does (0 and 1 are reserved for primary and payload blocks).
The text was updated successfully, but these errors were encountered:
From my understanding of rfc9171, there isn't really a limit on the number of canonical blocks you can have. However, ION imposes a soft limit of around 255. This is because the block number is stored as a unsigned char in the ExtensionBlock struct, and selectBlkNumber similarly returns an unsigned char.
selectBlkNumber in particular could pose trouble if someone were to send a bundle containing a block number set to a multiple of 255. In that case, selectBlkNumber would return 0 due to rolling over after adding 1.
It's probably best to either impose a hard limit on the maximum block number, or store it as a uvast. According to the spec, the block number is simply for uniquely identifying blocks, so there is nothing stopping an implementation from starting their canonical block numbering from 2^64-1 instead of starting from 2 like ION does (0 and 1 are reserved for primary and payload blocks).
The text was updated successfully, but these errors were encountered: