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
What differentiates Peercoin from Bitcoin is also its block structure. Peercoin adds a few new elements to the block structure such as transaction time and block signature. The signature is found at the end of each block after the transaction elements, and has a variable length:
v_chBlockSigSize; // Variable length integer block signature - signed by coin base txout[0]'s owner
m_chBlockSig; // Raw byte code data for the block signature
These two elements have a big impact on the block parsing processing optimization, especially if someone wants to dump the Blockchain without processing transactions (only the block header and signature). In Bitcoin the block size is described in the block header, and since the transaction elements (of variable size) are found at the end of each block, it allows the parser to calculate where the transaction fields end and jump to the next block without processing transactions. Regarding Peercoin, there is both: transaction elements and block signature. These two are of variable size, and it is thus not possible to know at which position the transaction description ends. By consequence, if someone wants to dump blocks without processing transactions he can't because transactions have to be processed in order to know where the v_chBlockSigSize is located...
An appropriate solution would either be to add an element to the block header to provide the transaction elements size or signature size. Or to move the signature elements above the transaction elements, just after the header (because v_chBlockSigSize would be directly accessible from the header).
The text was updated successfully, but these errors were encountered:
What differentiates Peercoin from Bitcoin is also its block structure. Peercoin adds a few new elements to the block structure such as transaction time and block signature. The signature is found at the end of each block after the transaction elements, and has a variable length:
These two elements have a big impact on the block parsing processing optimization, especially if someone wants to dump the Blockchain without processing transactions (only the block header and signature). In Bitcoin the block size is described in the block header, and since the transaction elements (of variable size) are found at the end of each block, it allows the parser to calculate where the transaction fields end and jump to the next block without processing transactions. Regarding Peercoin, there is both: transaction elements and block signature. These two are of variable size, and it is thus not possible to know at which position the transaction description ends. By consequence, if someone wants to dump blocks without processing transactions he can't because transactions have to be processed in order to know where the v_chBlockSigSize is located...
An appropriate solution would either be to add an element to the block header to provide the transaction elements size or signature size. Or to move the signature elements above the transaction elements, just after the header (because v_chBlockSigSize would be directly accessible from the header).
The text was updated successfully, but these errors were encountered: