Agoric / agoric-sdk

monorepo for the Agoric Javascript smart contract platform
Apache License 2.0
327 stars 207 forks source link

full-stack RUN protocol transaction diagram #4813

Open dckc opened 2 years ago

dckc commented 2 years ago

What is the Problem Being Solved?

Understanding the full path that a transaction takes through our system is a considerable challenge.

This issue is on behalf of @danwt , inspired by a comment from @rowgraus in the architecture scratchpad:

I would love to see a diagram of the life cycle of a transaction from the moment a user approves it in his/her wallet including delivery to validators, inclusion in mempool and consensus, entering the swingset runqueue and being processed [and accordingly leading to some meaningful action in the RUN protocol].

Description of the Design

Create an oboarding material to understand the lifecycle of a transaction from beginning to end.

Specifically: a sequence diagram(s) of a transaction that makes a swap using the AMM, starting with approval and ending some sensible time later.

@warner @michaelfig we will be interested in your help filling in the details.

I think we have a couple of somewhat relevant diagrams, FWIW:

Security Considerations

A full picture should provide awareness of risks in various parts of the system.

Test Plan

Constructing the diagram should let us reflect on the level of test coverage in the various parts.

dckc commented 2 years ago

@danwt , @warner , and I had a good discussion today, but I'm not sure what expectations to set going forward. I'm somewhat inclined to close this and let @informalsystems track any further work, but I'll leave this open for a bit.

cc @jessysaurusrex @arirubinstein

p.s. recording available internally.

danwt commented 2 years ago

I think that's fine @dckc, we mostly accomplished the goal. I will post the resulting diagram(s) here and that will be sufficient.