Pioneer Node

The Pioneer Node client, similar to Geth, processes each transaction in a sequential manner. Let's assume there are $t$ transactions in a block, denoted as ${tx_1, tx_2, ..., tx_t}$. We use $mpt_i$ to represent the changes in the world state Merkle Patricia Tree (MPT), and $r_i$ represents its root.

We can record the process of Pioneer Node handling transactions as follows:

{mpt0,tx1,mpt1,tx2,mpt2,...,mptt1,txt,mptt}\{mpt_0, tx_1, mpt_1, tx_2, mpt_2, ..., mpt_{t-1}, tx_t, mpt_t\}

This means that the world state $mpt_{i-1}$, after processing transaction $tx_i$, becomes $mpt_i$. Correspondingly, we know that $r_0$ is the state root included in the previous block header, and $r_t$ will be the state root included in the current block header.

As for the input and output of each transaction, they consist of address information and the corresponding key-value information associated with the address. We denote the accounts and key-value information involved in transaction $tx_i$ before and after processing as $al\text{-}in_i$ and $al\text{-}out_i$, respectively. In reality, $al\text{-}in_i$ and $al\text{-}out_i$ have the same node positions in the MPT, but with different values. Therefore, they can share the same Merkle proof $mf_i$.

Thus, we can record the Pioneer Node's processing steps using the following information:

{r0,mf1,al-in1,tx1,al-out1,r1,...,rt1,mft,al-int,txt,al-outt,rt}\{r_0, mf_1, al\text{-}in_1, tx_1, al\text{-}out_1, r_1, ..., r_{t-1}, mf_t, al\text{-}in_t, tx_t, al\text{-}out_t, r_t\}

Simplified notation:

{{ri1,mfi,al-ini,txi,al-outi,ri},i=1,...,t}\{\{r_{i-1}, mf_i, al\text{-}in_i, tx_i, al\text{-}out_i, r_i\}, i=1,...,t\}

If we transmit this data as additional information to the Guard Node, the Guard Node will be able to perform parallel processing and verification of the transactions.

In particular, $tx_t$ represents the coinbase transaction, which also handles the gas used earlier and is mainly used to reward the block producer.

Last updated