I'm wondering what the exact chain of events looks like once a transaction is submitted.
1 Answer
When a transaction is submitted, it is loaded into the node's mempool. This is like a waiting room for transactions that haven't yet made it on the blockchain. Whether the node is daedalus, or a stakepool, the nodes communicate with each other using the TxSubmission mini-protocol. New transactions are sent to all other nodes in the network.
Once a stakepool has been elected to make a block, it drains its mempool while validating all the transactions. It will fill up the block with all the transactions or until 65536 bytes (the current max block size which could be increased in the future).
That block is published on the blockchain. The BlockSync mini-protocol transmits the block until it propagates to all nodes. All nodes process the transactions in the block and remove any transactions from their mempool that have made it into the block.
-
1