Skip to content
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

multi: merge staging branch into main #542

Merged
merged 40 commits into from
Oct 3, 2023
Merged

multi: merge staging branch into main #542

merged 40 commits into from
Oct 3, 2023

Conversation

Roasbeef
Copy link
Member

@Roasbeef Roasbeef commented Oct 3, 2023

Fixes #466
Fixes #511
Fixes #91
Fixes #231

guggero and others added 30 commits October 2, 2023 17:46
In this commit, we update the DB logic to use the new WitnessStack field
for queries related to asset groups. We add helpers to convert between a
typed TxWitness and a byte array, and restict the witness handling logic
to only allow a single signature to maintain the same functionality.
In this commit, we switch the group tapscript root to a slice to better
represent an empty tapscript root (BIP-86 tweaking). We also fix some
areas where a non-nil root on disk was not returned from DB queries.
In this commit, we define valid genesis assets when members of a group.
We also define virtual TxIns and TxOuts for such assets.
We combine these changes to support making VirtualTxs for
genesis grouped assets with existing virtualTx constructors.
In this commit, we define a new interface for constructing virtual
transactions used to represent minting of grouped assets,
GenesisTxBuilder. We also redefine GenesisSigner to match
VirtualTxSigner, as they both use the same underlying signing API.
In this commit, we modify the early VM sanity checks to prevent an
early exit for genesis grouped assets. We also add support for the
GenesisPrevOutFetcher, which is needed for virtual TX construction
in the VM to match the TX used to produce the group witness.
In this commit, we update DeriveGroupKey to construct a virtualTx
representing the mint and produce a witness using the new group key
definition that supports script-path spends.
In this commit, we extend the config used to initialize the planter to
include the new interfaces needed for group asset minting. We also
reorder some operations in the caretaker to simplify the usage of
DeriveGroupKey.
In this commit, we update the minter the ensure that valid group
witnesses are preesent in genesis grouped assets. Group witnesses are
now copied into the asset PrevWitness on asset creation, and then
validated by the VM before the minter continues sprouting seedlings.
In this commit, we introduce two new verifier callbacks, which are
needed to check that group keys attached to assets have already been
imported and verified. This is relevant during proof verification,
minting, and universe sync, amongst other areas.
In this commit, we update proof verification to verify group keys for
reissued assets and grouped asset transfers. We also update callers
of proof.Verify() to passthrough group verifier callbacks.
jharveyb and others added 10 commits October 3, 2023 02:28
In this commit, we address the issue of asset insertion ordering during
minting. Group anchors must be inserted before reissued assets in the
same batch for group info to be stored correctly and asset verification
to succeed. We also update configs for other minting subsystems to
propogate group verifier callbacks.
In this commit, we ensure that issuances for grouped assets are
handled correctly during universe sync. This requires inserting group
anchors before reissuances. We also update the group key insertion on
universe sync to handle both group anchors and reissuances.
In this commit, we remove vestigial verification of group witnesses when
constructing an asset commitment or upserting a leaf that was a grouped
asset. This verification is now done on asset minting, proof export and
import, and when syncing bootstrap information for an asset group.
@Roasbeef Roasbeef merged commit 1c50eba into main Oct 3, 2023
14 checks passed
@guggero guggero deleted the v0-3-0-staging branch October 4, 2023 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment