Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Makoto Takemiya 武宮誠 (Sora.org - Soramitsu), [20.04.20 14:47]
Either approach seems acceptable I think.


Right now in our implementation Transaction has four states: Requested, Accepted, Signed and Valid.
In code we have:
1. When torii receives transaction from client its state is `Requested`.
2. Then the transaction is added to the queue of `pending_tx` and its state becomes `Accepted`

In what state should transactions be forwarded to other peers?

Nikita Puzankov suggested: Periodically all the transactions from the queue are forwarded to other peers, and when forwarding their state turns again to `Requested`. And they are added to the queue by receiving peers making state again `Accepted`.

Egor Ivkov suggested: Peer should sign it's transactions before forwarding them, otherwise we will not be able to gather signatures and proceed to Signed state.

Based on current implementation there can be a situation when peer receives pending_tx that it already built a block from, so it will build another block from the same tx. How should this situation be handled?