[CODE] Which file and function used for building a proposal from a payment transaction

I’ve looked at agreement/proposal.go (and related test file), and see where it makeProposal() and validate() it. I don’t see any transactions. I know the Block has a transaction payset associated, but I’m not understanding where it adds a transaction to the block. Where does a participant take payment transactions and “roll them” into a block to propose? Which file and function?

Also, where are participants voting on the proposed block (e.g. verifying signatures, verifying role, etc)?

Thanks. Wanting to understand the flow of this before diving into contributing and helping.

Hi zach,

I don’t have the access to the code base from this machine, so I’ll try to give you some pointers -

  • The makeProposal is called when node has a participation keys for the current round. At that point, there is a chance that this node would need to generate a proposal ( or vote ). In that case, the node attempts to generate a block ( I think it’s call evaluate ) which is composed out of the transactions that are pending in the transaction pool.
  • The signature verification is bit more complicated - incoming node transactions as validated before they are placed on the transaction pool. They are also re-validated before sending the cert votes. The voting signatures are checked right when they are being received, using an execution pool ( so that certain signatures could be prioritize over others ).

The flow might not be the easiest to understand, but it’s quite well optimized ( from a computer standpoint, that is… )