Architecture of TimestampVM
After examining several of the data structures and functionalities that TimestampVM relies on, it is time that we examine the architecture of the TimestampVM itself. In addition, we will look at some data structures that TimestampVM utilizes.
Aside: SnowmanVM
In addition to blocks having to adhere to the Snowman.Block
interface, VMs which interact with the Snowman Consensus Engine must also implement the SnowmanVM
interface. In the context of a Rust-based VM, this means that we must satisfy the ChainVM
trait in avalanche-types
:
Defining TimestampVM
Below is definition of VM struct which represents TimestampVM:
We see following three fields:
state
: represents state of VM. Note different than earlier seen State structure.app_sender
: channel for receiving and sending requests by our VMmempool
: where proposed blocks are kept before being processed.
We now examine the state
data structure mentioned earlier:
Relationship between State and state - contains alongside other fields relevant to Snowman consensus algorithm.