Trinity Biweekly Report — — Late May
The focus of the second half of this month is to construct Revocable Sequence Maturity Contract shortened as RSMC. As we all know, RSMC solves the problem of one-way flow of tokens in the channel, and aims to address the following issues: 1) two-way payment, that is, both parties can transfer assets to each other instead of one-way transaction; 2) If both sides of the channel intend to end the channel transaction, either party of the channel initiates the channel removal request, the two parties can quickly obtain the channel balance; 3) Guarantee the honesty of both parties, neither of whom can cheat.
In the process of implementing RSMC, the embedded contracts are as follows:
Funding Transaction — When building a channel, both parties need to pay a deposit to a multi-signature address.
Refund Transaction — Both parties exchange signatures by sending transactions to each other in preventing repudiation.
Commitment Transaction — Performing signed transactions between the two parties in the channel.
Revocable Delivery Transaction — Setting nLockTime (1000 blocks for Trinity) period by the system when either party initiates the settlement in advance.
Breach Remedy Transaction — Punish the evil party when cheating exist and confirming the correct transaction into the block.
Settlement Transaction — Final settlement contract is the final version of Commit Transaction. At this point a channel is closed.
In its C# version, Trinity builds message processing and message interaction module into the backend system mainly for signing transactions with private key signatures. When Trinity Gui (the front end) accepts user transaction information, the system automatically calls the background module to perform RSMC transactions.