rust-lightning/lightning
Duncan Dean c56198ade5
Implement interactive tx construction protocol via InteractiveTxConstructor
This implements the interactive construction protocol described at
78e5a6b066/02-peer-protocol.md (L92).

Our implementation includes a state machine with typed states and transitions
to ensure consumers have compile-time assurances that the protocol is upheld.

States are tracked as in the `StateMachine` enum and can take on all
possible states during the negotiation.

The states are further divided into two categories, namely by the two traits
they implement, either `ReceivedMsgState` or `SentMsgState`.

The defined `StateTransitions` enforce the transitions that `ReceivedMsgState`,
`SentMsgState`, and the `_TxComplete`s can go through.

Co-authored-by: Wilmer Paulino <9447167+wpaulino@users.noreply.github.com>
Co-authored-by: Duncan Dean <git@dunxen.dev>
Co-authored-by: Jurvis Tan <5944973+jurvis@users.noreply.github.com>
2024-03-14 16:10:46 +02:00
..
src Implement interactive tx construction protocol via InteractiveTxConstructor 2024-03-14 16:10:46 +02:00
Cargo.toml Drop ahash dependency in favor of core's SipHasher 2024-02-16 20:34:41 +00:00