"Signature" is now computed over the tuple: (2u8, Signer, Nonce, Commands, Gas Limit, Max Base Fee per Gas, Priority Fee Per Gas) instead of an “intermediate transaction” (in the tuple, 2u8 corresponds to the fact that TransactionV2 is the second version of transaction)
BlockHeaderV2
The position of the "Hash" and "Height" fields are reversed.
"Transactions Hash" is now the root of the binary merkle tree over the block's transactions' hashes, instead of full transactions.
Base Fee Formula
Block Base Fee Per Gas is now allowed to fall to 7 by removing $B{minbasefee}$. The Base Fee formula is now simply $B{basefee}(pbf,pgu) = pbf + B{basefeedelta}(pbf,pgu)$. $B{basefeedelta}$ is unchanged.
BlockV2
"Header" is now of type BlockHeaderV2.
"Transactions" is now of type Vec<TransactionV2>.
BlockDataV2
BlockDataV2 refers to the fields of protocol block that are “packed” into hotstuff_rs::Data.
The order of fields is now: "Chain ID", "Proposer", "Timestamp", "Base Fee Per Gas", "Gas Used", "Transactions Hash", "Receipts Hash", "State Hash", "Logs Bloom", and then transactions and receipts. The bolded fields have been re-ordered to match the order of fields in protocol blocks.
The order of fields in the Data Hash pre-image is also changed to match the new order of fields.
ReceiptV2
Receipt is now a struct type with fields:
Field
Type
Additional info.
Gas Used
u64
The transaction's inclusion cost + the sum of the "Gas Used"s of each of the command's Command Receipts.
Exit Code
ExitCodeV2
The exit code of the last command in the transaction that was executed.
Command Receipts
Vec<CommandReceiptV2>
Describes the execution of each command in the transaction. receipt.command_receipts.len() is always equal to transaction.commands.len(). If execution exits before a command begins executing (e.g., because of gas exhaustion), the command receipts of the non-executed commands have exit code NotExecuted.
CommandReceiptV2
Command Receipt is now an enum type. Its variants come in the same order as Command (which is unchanged), and are all structs with a common set of two fields, as well as additional fields for call, withdraw deposit, stake deposit, and unstake deposit that come after the common fields.
“Operation Successful” is now called “Ok”, and “Operation Failed” is now called “Error”. There is also a new “Not Executed” variant:
Variant
Additional info.
Ok
Rename of Operation Successful in v0.4.
Error
Rename of Operation Failed in v0.4.
Gas Exhausted
Unchanged.
Not Executed
Transaction execution exited before the command was executed, for example due to gas exhaustion.
Timing
validate_block_for_sync
HotStuff-rs v0.3 adds a special variant of validate_block that is exclusively used in sync mode that is called validate_block_for_sync. Unlike validate_block, this function has no timing requirements and can exit as soon as possible, speeding up block sync.
Blockchain v0.5 changelog
Types
TransactionV2
"Signature" is now computed over the tuple: (
2u8
, Signer, Nonce, Commands, Gas Limit, Max Base Fee per Gas, Priority Fee Per Gas) instead of an “intermediate transaction” (in the tuple,2u8
corresponds to the fact thatTransactionV2
is the second version of transaction)BlockHeaderV2
Base Fee Formula
Block Base Fee Per Gas is now allowed to fall to 7 by removing $B{minbasefee}$. The Base Fee formula is now simply $B{basefee}(pbf,pgu) = pbf + B{basefeedelta}(pbf,pgu)$. $B{basefeedelta}$ is unchanged.
BlockV2
BlockHeaderV2
.Vec<TransactionV2>
.BlockDataV2
BlockDataV2
refers to the fields of protocol block that are “packed” intohotstuff_rs::Data
.ReceiptV2
Receipt is now a struct type with fields:
u64
ExitCodeV2
Vec<CommandReceiptV2>
receipt.command_receipts.len()
is always equal totransaction.commands.len()
. If execution exits before a command begins executing (e.g., because of gas exhaustion), the command receipts of the non-executed commands have exit codeNotExecuted
.CommandReceiptV2
Command Receipt is now an enum type. Its variants come in the same order as Command (which is unchanged), and are all structs with a common set of two fields, as well as additional fields for call, withdraw deposit, stake deposit, and unstake deposit that come after the common fields.
Common fields
ExitCodeV2
u64
Call: additional fields
Vec<u8>
Vec<Log>
Withdraw Deposit: additional fields
u64
Stake Deposit: additional fields
u64
Unstake Deposit: additional fields
u64
ExitCodeV2
“Operation Successful” is now called “Ok”, and “Operation Failed” is now called “Error”. There is also a new “Not Executed” variant:
Timing
validate_block_for_sync
HotStuff-rs v0.3 adds a special variant of
validate_block
that is exclusively used in sync mode that is calledvalidate_block_for_sync
. Unlikevalidate_block
, this function has no timing requirements and can exit as soon as possible, speeding up block sync.Gas