-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tapgarden: add FundBatch and SealBatch requests #827
Conversation
f1e8f4d
to
4760ae4
Compare
5753433
to
a116bf4
Compare
Will be pulled out of draft and merged this sprint |
3cdbe5c
to
1ab4428
Compare
Feature work is done IMO, follow-on work can happen in a separate PR as this one has already ballooned quite a bit. Remaining tasks are just unit test coverage AFAICT, should add some usage in an itest as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! This gets us quite far in terms of re-arranging the state machine. Some commits need some love/cleanup, but apart from that the code looks pretty good.
Will need to do a second pass once we have the follow-up PR building on top of this that exposes the RPC methods to interact with the new states.
4c02fc5
to
3064415
Compare
One DB change is actually missing from this PR, related to group key handling. We need to also associate a |
0a6065a
to
e3a322f
Compare
b341ded
to
973ac8b
Compare
Updated to address some feedback and update tests to exercise query changes. Also fixed some issues with not accepting externally-set seedling script keys and group internal keys. Hitting some issues with minting DB tests around using the seedling group tapscript root. From discussion offline, I think the simplest behavior for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, pending existing comments and successful CI run.
409b9c8
to
d234399
Compare
c2e1cfd
to
42b7bde
Compare
Rebased. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🦚
Needs another rebase to apply new linter rules, then a couple of fixes for the new rules. |
In this commit, we introduce two new functions that allow batch funding before finalization, and supplying custom group witnesses for asset groups being created in a batch.
In this commit, we export a query from the MintingStore that allows a TX to be bound to a batch before finalization. We also write the TX of a batch, if present, when we are first writing a batch.
In this commit, we move batch funding from the caretaker to the planter, where it can occur before batch finalization. We optionally create a new batch during funding, and we fund batches during finalization before starting a caretaker.
In this commit, we stop using the batch ticker in any minter unit tests. This changed some test behavior, as finalizing via the ticker is non-blocking. We update some assertions to read the DB directly instead of querying the planter to maintain similar guarantees as before. Finally, we remove a test section checking for batch cancellation after finalize, which is not possible as finalize is blocking. This only worked before because it used the batch ticker.
In this commit, we add logic to the planter to produce asset group witnesses for all seedlings in a batch associated with an asset group. We also store the asset groups so they can be fetched by the caretaker during batch finalization.
In this commit, we add a unit test that funds a batch before finalize. This test also provides external keys for some seedlings to ensure that these are handled correctly during minting. We also update the planter to reject fund and finalize calls if a batch is already funded.
42b7bde
to
132a2d0
Compare
Closes #820
Update the minting state machines to move batch funding into a separate command that can execute before batch finalization. Add a new command to supply group anchor witnesses before batch finalization.
Remaining TODOs:
prepAssetSeedling
prepAssetSeedling
tapdb/asset_minting
tests to cover new query paramstapdb/asset_minting/CommitBatchTx
FinalizeParams
handling wrt.fundBatch
tapgarden/planter_test
test to coverFundBatch
SealBatch
tapgarden
tests