[Core] Productionize End-to-end tx from iteration 3 demo#370
[Core] Productionize End-to-end tx from iteration 3 demo#370
Conversation
|
I've added 3 reviewers to this PR. @jessicadaugherty - Please only focus on the documentation and instructions in @deblasis - Please provide feedback on overall code structure, health, cross-module interaction, etc. In particular, the changes in the scoping of some of the methods will be important for rolling back contexts in the future. @oten91 - No need to do a deep review, but I'd appreciate your opinion on |
|
Thanks @Olshansk! Lgtm.
So the idea is to have a demo folder with txt guides on how to run those demos, each labeled with the demo goal (e.g. "Sending tx without fees", "Sending tx with fees", "Sending tx with errors", etc.)? Or do you imagine this same demo doc just being updated to indicate different paths/steps? |
There was a problem hiding this comment.
Solid work. Nice comments etc.
Minor things out of scope is probably gonna be around consolidating the way we access to stuff like txIndexer not here and now :)
Also, you reminded me to add a couple of test cases to tests I introduced LOL in my in-flight PRs! 🙏
For sure
:)
Yea, this is what I envisioned. We will likely be able to copy/paste some of the commands from one demo to another, but this way each of them can stand its own. It'll be a cool way to track progress and keep the demos separate, reproducible and show progress over time. |
|
@jessicadaugherty Please approve the PR if it looks good to you. @deblasis I think the build keeps failing because of #380, so PTAL at that as well. @oten91 Once the build passes, I'll merge in even if you don't have time to take a look apriori, but would still really appreciate your feedback that we can follow up on in later PRs. |
05eb284 to
689f271
Compare
|
@deblasis Just a heads up that I pushed one more commit to fix an outstanding unit test: I'm going to go ahead and merge since we've reviewed the rest of the code but let me know if you see a need for any follow-ups. |
Description
Productionze the changes made to iteration 3 demo.
Issue
Fixes #364
Type of change
Please mark the relevant option(s):
List of changes
In addition to make the CLI broadcast a transaction, two major breaking changes were made
TransactionExistsfrom thePostgresContextto thePersistenceModuleCheckTransactionfrom theUtilityContextto theUtilityModuleThe reason for this change is because the codebase was creating unnecessary contexts when the module directly could be used. In particular, access to the
mempooland thetxIndexeris not scope to acontextbut exists in the lifecycle of the entire node. Making these changes simplified the code, end-to-end flow and is also beginning to set us up for cleaner rollbacks where contexts can be just cleared & released.Shared Changes
TransactionExistsfrom thePostgresContextto thePersistenceModuleCheckTransactionfrom theUtilityContextto theUtilityModulebusto be a pointer receiver rather than a value receiver in all the functions it implementsRPC Changes
PostV1ClientBroadcastTxSyncto broadcast the transaction it receivesUtility Module Changes
HandleMessagemethod at the utility levelCheckTransactionfrom the context to the module levelIsEmptyfunction to theMempoolDeleteTransactiontoRemoveTransactionin the mempoolLatestHeighttoHeightin theutilityContextCheckTransactionso its functionality is clearermempool.goConsensus Changes
consensus.UtilityMessagePersistence Changes
TransactionExistsfrom thePostgresContextto thePersistenceModuleTesting
make develop_testREADMEdocs/demos/iteration_3_end_to_end_tx.mdRequired Checklist
If Applicable Checklist
shared/docs/*if I updatedshared/*README(s)