@@ -776,11 +776,16 @@ func (b *MultiverseStore) UpsertProofLeaf(ctx context.Context,
776776
777777 execTxFunc := func (dbTx BaseMultiverseStore ) error {
778778 // Register issuance in the asset (group) specific universe
779- // tree.
780- var err error
779+ // tree. We don't need to decode the whole proof, we just
780+ // need the block height.
781+ blockHeight , err := SparseDecodeBlockHeight (leaf .RawProof )
782+ if err != nil {
783+ return err
784+ }
785+
781786 uniProof , err = universeUpsertProofLeaf (
782787 ctx , dbTx , id .String (), id .ProofType .String (),
783- id .GroupKey , key , leaf , metaReveal ,
788+ id .GroupKey , key , leaf , metaReveal , blockHeight ,
784789 )
785790 if err != nil {
786791 return fmt .Errorf ("failed universe upsert: %w" , err )
@@ -847,13 +852,22 @@ func (b *MultiverseStore) UpsertProofLeafBatch(ctx context.Context,
847852 for idx := range items {
848853 item := items [idx ]
849854
855+ // We don't need to decode the whole proof, we
856+ // just need the block height.
857+ blockHeight , err := SparseDecodeBlockHeight (
858+ item .Leaf .RawProof ,
859+ )
860+ if err != nil {
861+ return err
862+ }
863+
850864 // Upsert into the specific universe tree to
851865 // start with.
852866 uniProof , err := universeUpsertProofLeaf (
853867 ctx , store , item .ID .String (),
854868 item .ID .ProofType .String (),
855869 item .ID .GroupKey , item .Key , item .Leaf ,
856- item .MetaReveal ,
870+ item .MetaReveal , blockHeight ,
857871 )
858872 if err != nil {
859873 return fmt .Errorf ("failed universe " +
0 commit comments