Skip to content

Commit

Permalink
Merge pull request #785 from Roasbeef/v0-3-3-branch
Browse files Browse the repository at this point in the history
release: create v0.3.3 rc release branch
  • Loading branch information
Roasbeef authored Feb 6, 2024
2 parents 86b4039 + 0b7aade commit 82a0c51
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
13 changes: 10 additions & 3 deletions tapdb/sqlc/migrations/000015_asset_witnesses.up.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
-- The witness index indicates the order of the witness in the list of witnesses
-- for a given asset. We didn't really support more than one witness before, so
-- the default value of 0 should be fine for all existing assets.
ALTER TABLE asset_witnesses ADD COLUMN witness_index INTEGER NOT NULL DEFAULT 0;
-- for a given asset. We'll be inserting an actual value in the next query, so
-- we just start with -1.
ALTER TABLE asset_witnesses ADD COLUMN witness_index INTEGER NOT NULL DEFAULT -1;

-- Update the witness index to be the same as the witness id. We'll use the
-- witness_index for sorting only, so setting the default to the witness_id is
-- just to make sure we preserve the current order of witnesses while also
-- satisfying the unique constraint we add below.
UPDATE asset_witnesses SET witness_index = CAST(witness_id AS INTEGER)
WHERE witness_index = -1;

-- We need to be able to upsert witnesses, so we need a unique constraint on
-- (asset_id, witness_index).
Expand Down
22 changes: 22 additions & 0 deletions tapdb/testdata/migrations_test_00015_dummy_data.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-- This dummy data inserts a single asset that has two witness entries so we can
-- test the migration 15 that adds the witness_index column to the
-- asset_witnesses table.
INSERT INTO chain_txns VALUES(1,X'a1594fc379308b2a209f6d0bdb8602e9f87cf71fc232c69032b9a5fed28f9331',1980,X'02000000000101022cd51ca4d850c5f71ceedf7c50a08ff82d66612b22f631eac95e6b52cbbd2d0000000000ffffffff02e80300000000000022512018ac5a65a0d12e7846c89d24705e2697b1da14627978ba8db24bdbce21fc2aa85cd5f5050000000022512030263d67b4275144b2b00921d220a1311b9a4465fa656ba7d5754b421cb4308402483045022100fa32af97cab8a765dc347c3ff57b14f9810b6dbfc4d02727fb099d1ed875660602204cb66f3bbd92925707158b4aa67338c50a9ffddceb023875eb82b78b3967e007012102eb9cd2a22fd11c40823cb7b0f0fba4156138af69cf73c0644be54f4d46ba480700000000',441,X'4295613d85ccbc455159eb4ddd1e266ca10041d3c75726286b7dfeb3132c9c4f',1);

INSERT INTO genesis_points VALUES(1,X'022cd51ca4d850c5f71ceedf7c50a08ff82d66612b22f631eac95e6b52cbbd2d00000000',1);

INSERT INTO assets_meta VALUES(1,X'2b990b7adb1faf51ccb9b1c73bc5e73926db39cdec8906d4fd3c6c423a3c9821',X'736f6d65206d65746164617461',0);

INSERT INTO genesis_assets VALUES(1,X'add7d0d7cc37e58a7c0d8ad40b6904050d2baa25a1829f00689c4b27b524dd04','itestbuxx-collectible',1,0,1,1);

INSERT INTO internal_keys VALUES(1,X'02827d74858d152da1fae12010ad8d3c46b595c2d4480512a6575925424617124f',212,0);
INSERT INTO internal_keys VALUES(2,X'03efbcf2878876bae81ca9a7f6476764d2da38d565b9fb2b691e7bb22fd99f9e5e',212,2);

INSERT INTO managed_utxos VALUES(1,X'a1594fc379308b2a209f6d0bdb8602e9f87cf71fc232c69032b9a5fed28f933100000000',1000,1,X'1dd3e2cf0bbbee32832c4deb57bbae58779fa599be0b8eb1f61e8c624157e2fa',NULL,X'1dd3e2cf0bbbee32832c4deb57bbae58779fa599be0b8eb1f61e8c624157e2fa',1,NULL,NULL);

INSERT INTO script_keys VALUES(1,2,X'029c571fffcac1a1a7cd3372bd202ad8562f28e48b90f8a4eb714eca062f576ee6',NULL);

INSERT INTO assets VALUES(1,1,1,1,NULL,0,1,0,0,NULL,NULL,1,false);

INSERT INTO asset_witnesses VALUES(1,1,X'a1594fc379308b2a209f6d0bdb8602e9f87cf71fc232c69032b9a5fed28f933100000000',X'add7d0d7cc37e58a7c0d8ad40b6904050d2baa25a1829f00689c4b27b524dd04',X'02827d74858d152da1fae12010ad8d3c46b595c2d4480512a6575925424617124f',X'0101aa',NULL);
INSERT INTO asset_witnesses VALUES(2,1,X'a1594fc379308b2a209f6d0bdb8602e9f87cf71fc232c69032b9a5fed28f933101000000',X'add7d0d7cc37e58a7c0d8ad40b6904050d2baa25a1829f00689c4b27b524dd04',X'02827d74858d152da1fae12010ad8d3c46b595c2d4480512a6575925424617124f',X'0101bb',NULL);
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const (

// AppPreRelease MUST only contain characters from semanticAlphabet
// per the semantic versioning spec.
AppPreRelease = "alpha.rc2"
AppPreRelease = "alpha.rc3"

// defaultAgentName is the default name of the software that is added as
// the first part of the user agent string.
Expand Down

0 comments on commit 82a0c51

Please sign in to comment.