As part of the Spacemesh transaction selection and processing workflow (#50, #37), the Spacemesh protocol specifies that all of the proposals (submitted by eligible Smeshers in a given layer) be assembled into a single, unified content block (hereinafter referred to simply as the "block") for that layer. This proposal describes the deterministic algorithm by which this happens.
Goals and motivation
Specify a simple, deterministic algorithm that takes as input a set of valid proposals, each containing zero or more transactions, and outputs a single block of ordered transactions. Drop (i.e., do not include in output) transactions that are invalid or won't be effective (i.e., won't pay any gas) if possible.
High-level design
Take the union of all input transactions
Drop invalid transactions
Sort deterministically by principal, using a pseudorandom seed
Cluster transactions by principal and subsort by nonce
Drop duplicate transactions
Simulate execution of transactions, in order, against most recent known state (when/if known) and drop transactions that are ineffective
Assemble the filtered, sorted transactions into an output block
Overview
As part of the Spacemesh transaction selection and processing workflow (#50, #37), the Spacemesh protocol specifies that all of the proposals (submitted by eligible Smeshers in a given layer) be assembled into a single, unified content block (hereinafter referred to simply as the "block") for that layer. This proposal describes the deterministic algorithm by which this happens.
Goals and motivation
Specify a simple, deterministic algorithm that takes as input a set of valid proposals, each containing zero or more transactions, and outputs a single block of ordered transactions. Drop (i.e., do not include in output) transactions that are invalid or won't be effective (i.e., won't pay any gas) if possible.
High-level design
Prior art
Proposed implementation
Implementation plan
Questions
Dependencies and interactions
37
50
Stakeholders and reviewers
Testing and performance