From 02c18b65725ba89f690770cd333185afa257b175 Mon Sep 17 00:00:00 2001 From: Matthew Little Date: Fri, 18 Oct 2024 20:31:05 +0200 Subject: [PATCH] chore: signer-signature -> signer-signatures --- ...62745699_stacks_block_signer-signatures.js | 4 +- src/api/routes/v2/blocks.ts | 8 +- src/datastore/common.ts | 4 +- src/datastore/helpers.ts | 2 +- src/datastore/pg-store-v2.ts | 8 +- src/datastore/pg-write-store.ts | 4 +- src/event-stream/event-server.ts | 6 +- tests/api/address.test.ts | 6 +- tests/api/block.test.ts | 10 +- tests/api/cache-control.test.ts | 2 +- tests/api/datastore.test.ts | 94 +++++++++---------- tests/api/mempool.test.ts | 16 ++-- tests/api/microblock.test.ts | 2 +- tests/api/other.test.ts | 2 +- tests/api/search.test.ts | 8 +- tests/api/smart-contract.test.ts | 8 +- tests/api/tx.test.ts | 32 +++---- tests/api/v2-proxy.test.ts | 2 +- tests/utils/test-builders.ts | 4 +- 19 files changed, 111 insertions(+), 111 deletions(-) diff --git a/migrations/1729262745699_stacks_block_signer-signatures.js b/migrations/1729262745699_stacks_block_signer-signatures.js index 07af71b39..40a97b591 100644 --- a/migrations/1729262745699_stacks_block_signer-signatures.js +++ b/migrations/1729262745699_stacks_block_signer-signatures.js @@ -4,11 +4,11 @@ exports.up = pgm => { pgm.addColumn('blocks', { - signer_signature: { + signer_signatures: { type: 'bytea[]', } }); - pgm.createIndex('blocks', 'signer_signature', { method: 'gin' }); + pgm.createIndex('blocks', 'signer_signatures', { method: 'gin' }); }; diff --git a/src/api/routes/v2/blocks.ts b/src/api/routes/v2/blocks.ts index b0db08191..afc25cbef 100644 --- a/src/api/routes/v2/blocks.ts +++ b/src/api/routes/v2/blocks.ts @@ -182,7 +182,7 @@ export const BlockRoutesV2: FastifyPluginAsync< ); fastify.get( - '/:height_or_hash/signer-signature', + '/:height_or_hash/signer-signatures', { preHandler: handleBlockCache, preValidation: (req, _reply, done) => { @@ -190,9 +190,9 @@ export const BlockRoutesV2: FastifyPluginAsync< done(); }, schema: { - operationId: 'get_signer_signature_for_block', - summary: 'Get signer signature for block', - description: `Retrieves the "signer signature" (typically an array of signature byte strings) in a single block`, + operationId: 'get_signer_signatures_for_block', + summary: 'Get signer signatures for block', + description: `Retrieves the signer signatures (an array of signature byte strings) in a single block`, tags: ['Blocks'], params: BlockParamsSchema, querystring: Type.Object({ diff --git a/src/datastore/common.ts b/src/datastore/common.ts index 215946db4..c0be3e42d 100644 --- a/src/datastore/common.ts +++ b/src/datastore/common.ts @@ -25,7 +25,7 @@ export interface DbBlock { tx_count: number; block_time: number; signer_bitvec: string | null; - signer_signature: string[] | null; + signer_signatures: string[] | null; } /** An interface representing the microblock data that can be constructed _only_ from the /new_microblocks payload */ @@ -1287,7 +1287,7 @@ export interface BlockInsertValues { execution_cost_write_length: number; tx_count: number; signer_bitvec: string | null; - signer_signature: PgBytea[] | null; + signer_signatures: PgBytea[] | null; } export interface MicroblockInsertValues { diff --git a/src/datastore/helpers.ts b/src/datastore/helpers.ts index 669ab17e1..21ee23ea8 100644 --- a/src/datastore/helpers.ts +++ b/src/datastore/helpers.ts @@ -487,7 +487,7 @@ export function parseBlockQueryResult(row: BlockQueryResult): DbBlock { execution_cost_write_length: Number.parseInt(row.execution_cost_write_length), tx_count: row.tx_count, signer_bitvec: row.signer_bitvec, - signer_signature: null, // this field is not queried from db by default due to size constraints + signer_signatures: null, // this field is not queried from db by default due to size constraints }; return block; } diff --git a/src/datastore/pg-store-v2.ts b/src/datastore/pg-store-v2.ts index 2d63f7a48..236fba9cd 100644 --- a/src/datastore/pg-store-v2.ts +++ b/src/datastore/pg-store-v2.ts @@ -245,10 +245,10 @@ export class PgStoreV2 extends BasePgStoreModule { OR index_block_hash = ${normalizeHashString(blockId.hash)} )` : sql`block_height = ${blockId.height}`; - const blockQuery = await sql<{ signer_signature: string[]; total: number }[]>` + const blockQuery = await sql<{ signer_signatures: string[]; total: number }[]>` SELECT - signer_signature[${offset + 1}:${offset + limit}] as signer_signature, - array_length(signer_signature, 1)::integer AS total + signer_signatures[${offset + 1}:${offset + limit}] as signer_signatures, + array_length(signer_signatures, 1)::integer AS total FROM blocks WHERE canonical = true AND ${filter} LIMIT 1 @@ -263,7 +263,7 @@ export class PgStoreV2 extends BasePgStoreModule { return { limit, offset, - results: blockQuery[0].signer_signature, + results: blockQuery[0].signer_signatures, total: blockQuery[0].total, }; }); diff --git a/src/datastore/pg-write-store.ts b/src/datastore/pg-write-store.ts index 907ccbb2e..dab62779a 100644 --- a/src/datastore/pg-write-store.ts +++ b/src/datastore/pg-write-store.ts @@ -484,7 +484,7 @@ export class PgWriteStore extends PgStore { execution_cost_write_length: block.execution_cost_write_length, tx_count: block.tx_count, signer_bitvec: block.signer_bitvec, - signer_signature: block.signer_signature, + signer_signatures: block.signer_signatures, }; const result = await sql` INSERT INTO blocks ${sql(values)} @@ -3385,7 +3385,7 @@ export class PgWriteStore extends PgStore { execution_cost_write_length: block.execution_cost_write_length, tx_count: block.tx_count, signer_bitvec: block.signer_bitvec, - signer_signature: block.signer_signature, + signer_signatures: block.signer_signatures, })); await sql` INSERT INTO blocks ${sql(values)} diff --git a/src/event-stream/event-server.ts b/src/event-stream/event-server.ts index 52904f2a1..2ed586713 100644 --- a/src/event-stream/event-server.ts +++ b/src/event-stream/event-server.ts @@ -299,7 +299,7 @@ async function handleBlockMessage( : null; // Stacks-core does not include the '0x' prefix in the signer signature hex strings - const signerSignature = + const signerSignatures = msg.signer_signature?.map(s => (s.startsWith('0x') ? s : '0x' + s)) ?? null; const dbBlock: DbBlock = { @@ -323,7 +323,7 @@ async function handleBlockMessage( tx_count: msg.transactions.length, block_time: blockData.block_time, signer_bitvec: signerBitvec, - signer_signature: signerSignature, + signer_signatures: signerSignatures, }; logger.debug(`Received block ${msg.block_hash} (${msg.block_height}) from node`, dbBlock); @@ -1163,7 +1163,7 @@ export function parseNewBlockMessage(chainId: ChainID, msg: CoreNodeBlockMessage execution_cost_write_length: totalCost.execution_cost_write_length, tx_count: msg.transactions.length, signer_bitvec: msg.signer_bitvec ?? null, - signer_signature: msg.signer_signature ?? null, + signer_signatures: msg.signer_signature ?? null, }; const dbMinerRewards: DbMinerReward[] = []; diff --git a/tests/api/address.test.ts b/tests/api/address.test.ts index 09211d06e..a9f1ba8e1 100644 --- a/tests/api/address.test.ts +++ b/tests/api/address.test.ts @@ -93,7 +93,7 @@ describe('address tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; let indexIdIndex = 0; const createStxTx = ( @@ -1170,7 +1170,7 @@ describe('address tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; let indexIdIndex = 0; @@ -2388,7 +2388,7 @@ describe('address tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const txBuilder = await makeContractCall({ contractAddress: 'ST11NJTTKGVT6D1HY4NJRVQWMQM7TVAR091EJ8P2Y', diff --git a/tests/api/block.test.ts b/tests/api/block.test.ts index 98a657fac..922d21785 100644 --- a/tests/api/block.test.ts +++ b/tests/api/block.test.ts @@ -87,7 +87,7 @@ describe('block tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; await db.updateBlock(client, block); const tx: DbTxRaw = { @@ -283,7 +283,7 @@ describe('block tests', () => { expect(result.body).toEqual(expectedResp); }); - test('/block signer signature', async () => { + test('/block signer signatures', async () => { const block_hash = '0x1234', index_block_hash = '0xabcd', tx_id = '0x12ff'; @@ -297,7 +297,7 @@ describe('block tests', () => { index_block_hash, // parent_index_block_hash: genesis_index_block_hash, block_height: 1, - signer_signature: signerSignatures, + signer_signatures: signerSignatures, }) .addTx({ block_hash, tx_id, index_block_hash }) .build(); @@ -338,7 +338,7 @@ describe('block tests', () => { expect(result.body).toEqual(expectedResp); const sigReq = await supertest(api.server).get( - `/extended/v2/blocks/${block1.block.block_height}/signer-signature?limit=3&offset=70` + `/extended/v2/blocks/${block1.block.block_height}/signer-signatures?limit=3&offset=70` ); const sigResult: BlockSignerSignatureResponse = sigReq.body; expect(sigResult).toEqual({ @@ -619,7 +619,7 @@ describe('block tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const dbTx1: DbTxRaw = { ...dbBlock, diff --git a/tests/api/cache-control.test.ts b/tests/api/cache-control.test.ts index 6311daf7e..09cadd5b8 100644 --- a/tests/api/cache-control.test.ts +++ b/tests/api/cache-control.test.ts @@ -60,7 +60,7 @@ describe('cache-control tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx: DbTxRaw = { tx_id: '0x1234', diff --git a/tests/api/datastore.test.ts b/tests/api/datastore.test.ts index 01a16f9bc..71000c837 100644 --- a/tests/api/datastore.test.ts +++ b/tests/api/datastore.test.ts @@ -279,7 +279,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx: DbTxRaw = { tx_id: '0x1234', @@ -448,7 +448,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx: DbTxRaw = { tx_id: '0x1234', @@ -623,7 +623,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; await db.updateBlock(client, block); const blockQuery = await db.getBlock({ hash: block.block_hash }); @@ -694,7 +694,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; let indexIdIndex = 0; @@ -959,7 +959,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const txs1 = [ createStxTx('addrA', 'addrB', 100, dbBlock1), @@ -1035,7 +1035,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx1: DbTxRaw = { tx_id: '0x1234', @@ -2010,7 +2010,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx: DbTx = { tx_id: '0x1234', @@ -2095,7 +2095,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx: DbTx = { tx_id: '0x421234', @@ -2185,7 +2185,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx: DbTx = { tx_id: '0x421234', @@ -2283,7 +2283,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx: DbTxRaw = { tx_id: '0x421234', @@ -2425,7 +2425,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx: DbTx = { tx_id: '0x421234', @@ -2515,7 +2515,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx: DbTx = { tx_id: '0x421234', @@ -2604,7 +2604,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx: DbTx = { tx_id: '0x421234', @@ -2692,7 +2692,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; await db.updateBlock(client, dbBlock); @@ -2767,7 +2767,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx1: DbTx = { tx_id: '0x421234', @@ -3142,7 +3142,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const block2: DbBlock = { block_hash: '0x22', @@ -3165,7 +3165,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const block3: DbBlock = { block_hash: '0x33', @@ -3188,7 +3188,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const block3B: DbBlock = { ...block3, @@ -3217,7 +3217,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const block4: DbBlock = { block_hash: '0x44', @@ -3240,7 +3240,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const block5: DbBlock = { block_hash: '0x55', @@ -3263,7 +3263,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const block6: DbBlock = { block_hash: '0x66', @@ -3286,7 +3286,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx1Mempool: DbMempoolTxRaw = { @@ -3479,7 +3479,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const block2: DbBlock = { block_hash: '0x22', @@ -3502,7 +3502,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const block3: DbBlock = { block_hash: '0x33', @@ -3525,7 +3525,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const block3B: DbBlock = { ...block3, @@ -3554,7 +3554,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const minerReward1: DbMinerReward = { @@ -3690,7 +3690,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const reorgResult = await db.handleReorg(client, block5, 0); @@ -3772,7 +3772,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const block2: DbBlock = { block_hash: '0x22', @@ -3795,7 +3795,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const minerReward1: DbMinerReward = { @@ -4076,7 +4076,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; await db.update({ block: block3, microblocks: [], minerRewards: [], txs: [] }); @@ -4101,7 +4101,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx3: DbTxRaw = { tx_id: '0x03', @@ -4313,7 +4313,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; await db.update({ block: block3b, microblocks: [], minerRewards: [], txs: [] }); const blockQuery2 = await db.getBlock({ hash: block3b.block_hash }); @@ -4355,7 +4355,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; await db.update({ block: block4b, microblocks: [], minerRewards: [], txs: [] }); @@ -4466,7 +4466,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const block2: DbBlock = { @@ -4490,7 +4490,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const block2b: DbBlock = { @@ -4514,7 +4514,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const block3: DbBlock = { @@ -4538,7 +4538,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const block3b: DbBlock = { @@ -4562,7 +4562,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const block4b: DbBlock = { @@ -4586,7 +4586,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const minerReward1: DbMinerReward = { @@ -5085,7 +5085,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx1: DbTxRaw = { tx_id: '0x421234', @@ -5173,7 +5173,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx1: DbTxRaw = { tx_id: '0x421234', @@ -5260,7 +5260,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx1: DbTxRaw = { tx_id: '0x421234', @@ -5418,7 +5418,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; await db.update({ block: dbBlock, @@ -5481,7 +5481,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; await db.update({ block: dbBlock, @@ -5545,7 +5545,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; await db.update({ block: dbBlock, @@ -5609,7 +5609,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; await db.updateBlock(client, block); const blockQuery = await db.getBlock({ hash: block.block_hash }); @@ -5720,7 +5720,7 @@ describe('postgres datastore', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; await db.updateBlock(client, block); const blockQuery = await db.getBlock({ hash: block.block_hash }); diff --git a/tests/api/mempool.test.ts b/tests/api/mempool.test.ts index 40a6a297f..648dbcc9d 100644 --- a/tests/api/mempool.test.ts +++ b/tests/api/mempool.test.ts @@ -573,7 +573,7 @@ describe('mempool tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const dbTx1: DbTxRaw = { ...mempoolTx1, @@ -1354,7 +1354,7 @@ describe('mempool tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; await db.updateBlock(client, dbBlock); const senderAddress = 'SP25YGP221F01S9SSCGN114MKDAK9VRK8P3KXGEMB'; @@ -1430,7 +1430,7 @@ describe('mempool tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; await db.updateBlock(client, dbBlock); const senderAddress = 'SP25YGP221F01S9SSCGN114MKDAK9VRK8P3KXGEMB'; @@ -1658,7 +1658,7 @@ describe('mempool tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const dbBlock2: DbBlock = { block_hash: '0x2123', @@ -1681,7 +1681,7 @@ describe('mempool tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const mempoolTx: DbMempoolTxRaw = { tx_id: txId, @@ -1807,7 +1807,7 @@ describe('mempool tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const dbBlock1b: DbBlock = { block_hash: '0x0123bb', @@ -1830,7 +1830,7 @@ describe('mempool tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const dbBlock2b: DbBlock = { block_hash: '0x2123', @@ -1853,7 +1853,7 @@ describe('mempool tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const mempoolTx: DbMempoolTxRaw = { tx_id: txId, diff --git a/tests/api/microblock.test.ts b/tests/api/microblock.test.ts index bf501621c..8d52de43e 100644 --- a/tests/api/microblock.test.ts +++ b/tests/api/microblock.test.ts @@ -287,7 +287,7 @@ describe('microblock tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx1: DbTxRaw = { diff --git a/tests/api/other.test.ts b/tests/api/other.test.ts index b3e830a9c..f3a0a481f 100644 --- a/tests/api/other.test.ts +++ b/tests/api/other.test.ts @@ -62,7 +62,7 @@ describe('other tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx: DbTxRaw = { tx_id: '0x1234', diff --git a/tests/api/search.test.ts b/tests/api/search.test.ts index 419fcc697..c39ad4be0 100644 --- a/tests/api/search.test.ts +++ b/tests/api/search.test.ts @@ -64,7 +64,7 @@ describe('search tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; await db.updateBlock(client, block); const tx: DbTxRaw = { @@ -277,7 +277,7 @@ describe('search tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx: DbTxRaw = { @@ -618,7 +618,7 @@ describe('search tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; await db.updateBlock(client, block); @@ -1064,7 +1064,7 @@ describe('search tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const stxTx1: DbTxRaw = { diff --git a/tests/api/smart-contract.test.ts b/tests/api/smart-contract.test.ts index 88114e68a..04483ef8a 100644 --- a/tests/api/smart-contract.test.ts +++ b/tests/api/smart-contract.test.ts @@ -64,7 +64,7 @@ describe('smart contract tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx1: DbTxRaw = { tx_id: '0x421234', @@ -218,7 +218,7 @@ describe('smart contract tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const txId1 = '0x421234'; const smartContract1: DbSmartContract = { @@ -331,7 +331,7 @@ describe('smart contract tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const txId1 = '0x421234'; const smartContract1: DbSmartContract = { @@ -442,7 +442,7 @@ describe('smart contract tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx1: DbTxRaw = { tx_id: '0x421235', diff --git a/tests/api/tx.test.ts b/tests/api/tx.test.ts index 335825a6f..db06fa588 100644 --- a/tests/api/tx.test.ts +++ b/tests/api/tx.test.ts @@ -158,7 +158,7 @@ describe('tx tests', () => { execution_cost_write_count: 138, execution_cost_write_length: 91116, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const dbTx2: DbTxRaw = { tx_id: '0x8915000000000000000000000000000000000000000000000000000000000000', @@ -356,7 +356,7 @@ describe('tx tests', () => { execution_cost_write_count: 0, execution_cost_write_length: 0, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; // stacks.js does not have a versioned-smart-contract tx builder as of writing, so use a known good serialized tx @@ -520,7 +520,7 @@ describe('tx tests', () => { execution_cost_write_count: 0, execution_cost_write_length: 0, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; // stacks.js does not support `coinbase-pay-to-alt-recipient` tx support as of writing, so use a known good serialized tx @@ -667,7 +667,7 @@ describe('tx tests', () => { execution_cost_write_count: 0, execution_cost_write_length: 0, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; // stacks.js does not support `coinbase-pay-to-alt-recipient` tx support as of writing, so use a known good serialized tx @@ -814,7 +814,7 @@ describe('tx tests', () => { execution_cost_write_count: 0, execution_cost_write_length: 0, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const txBuilder = await makeContractCall({ contractAddress: 'ST11NJTTKGVT6D1HY4NJRVQWMQM7TVAR091EJ8P2Y', @@ -1007,7 +1007,7 @@ describe('tx tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; await db.update({ block: dbBlock, @@ -1209,7 +1209,7 @@ describe('tx tests', () => { execution_cost_write_count: 0, execution_cost_write_length: 0, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const dbTx: DbTxRaw = { tx_id: '0x421234', @@ -1413,7 +1413,7 @@ describe('tx tests', () => { execution_cost_write_count: 0, execution_cost_write_length: 0, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const pc1 = createNonFungiblePostCondition( @@ -1667,7 +1667,7 @@ describe('tx tests', () => { execution_cost_write_count: 0, execution_cost_write_length: 0, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const txBuilder = await makeContractDeploy({ contractName: 'hello-world', @@ -1821,7 +1821,7 @@ describe('tx tests', () => { execution_cost_write_count: 0, execution_cost_write_length: 0, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const txBuilder = await makeContractDeploy({ contractName: 'hello-world', @@ -2662,7 +2662,7 @@ describe('tx tests', () => { execution_cost_write_count: 0, execution_cost_write_length: 0, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx: DbTxRaw = { tx_id: '0x421234', @@ -2783,7 +2783,7 @@ describe('tx tests', () => { execution_cost_write_count: 0, execution_cost_write_length: 0, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; await db.updateBlock(client, block); const tx: DbTxRaw = { @@ -3440,7 +3440,7 @@ describe('tx tests', () => { execution_cost_write_count: 0, execution_cost_write_length: 0, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx: DbTxRaw = { tx_id: '0x1234', @@ -3698,7 +3698,7 @@ describe('tx tests', () => { execution_cost_write_count: 138, execution_cost_write_length: 91116, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const expected = { tx_id: '0x8407751d1a8d11ee986aca32a6459d9cd798283a12e048ebafcd4cc7dadb29af', @@ -4037,7 +4037,7 @@ describe('tx tests', () => { execution_cost_write_count: 0, execution_cost_write_length: 0, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; const tx: DbTxRaw = { tx_id: '0x1234', @@ -4240,7 +4240,7 @@ describe('tx tests', () => { execution_cost_write_count: 0, execution_cost_write_length: 0, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; await db.updateBlock(client, block); const tx: DbTxRaw = { diff --git a/tests/api/v2-proxy.test.ts b/tests/api/v2-proxy.test.ts index c14f9e312..6fd2358ba 100644 --- a/tests/api/v2-proxy.test.ts +++ b/tests/api/v2-proxy.test.ts @@ -77,7 +77,7 @@ describe('v2-proxy tests', () => { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: null, - signer_signature: null, + signer_signatures: null, }; // Ensure db has a block so that current block height queries return a found result diff --git a/tests/utils/test-builders.ts b/tests/utils/test-builders.ts index 636ed3f59..2633c387b 100644 --- a/tests/utils/test-builders.ts +++ b/tests/utils/test-builders.ts @@ -99,7 +99,7 @@ export interface TestBlockArgs { parent_microblock_sequence?: number; canonical?: boolean; signer_bitvec?: string; - signer_signature?: string[]; + signer_signatures?: string[]; } /** @@ -129,7 +129,7 @@ function testBlock(args?: TestBlockArgs): DbBlock { execution_cost_write_length: 0, tx_count: 1, signer_bitvec: args?.signer_bitvec ?? null, - signer_signature: args?.signer_signature ?? null, + signer_signatures: args?.signer_signatures ?? null, }; }