Skip to content

Commit 1724947

Browse files
authored
Merge pull request #2189 from hirosystems/master
Update develop with master
2 parents 1632698 + f00f286 commit 1724947

File tree

12 files changed

+659
-351
lines changed

12 files changed

+659
-351
lines changed

CHANGELOG.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,63 @@
1+
## [8.4.0](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.3.0...v8.4.0) (2024-12-17)
2+
3+
4+
### Features
5+
6+
* adjust rBTC default amount, add xlarge url param, add tests ([b30f16a](https://github.com/hirosystems/stacks-blockchain-api/commit/b30f16ac5ab7f3c3cd1e1a66e815013a268bfc4f))
7+
* change tbtc faucet default, allow user to request more than default ([8e3f288](https://github.com/hirosystems/stacks-blockchain-api/commit/8e3f288ec8680ebf5b32974b6897ad56c6c87995))
8+
9+
10+
### Bug Fixes
11+
12+
* update BTC faucet comments to use regtest instead of testnet ([ced8242](https://github.com/hirosystems/stacks-blockchain-api/commit/ced8242f3cb3670d5f84405cfceb408e696fa286))
13+
14+
## [8.3.0](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.2.3...v8.3.0) (2024-12-10)
15+
16+
17+
### Features
18+
19+
* option to modify estimated fees in /v2/fees/transaction proxy ([#2172](https://github.com/hirosystems/stacks-blockchain-api/issues/2172)) ([9b7e97d](https://github.com/hirosystems/stacks-blockchain-api/commit/9b7e97d8d3faf94b1d17162cb2bf17f214afe172))
20+
21+
22+
### Bug Fixes
23+
24+
* socket-io reconnection bug ([#2174](https://github.com/hirosystems/stacks-blockchain-api/issues/2174)) ([b99c672](https://github.com/hirosystems/stacks-blockchain-api/commit/b99c672112c92f92bf1421f3eae44b6861292de9))
25+
26+
## [8.2.3](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.2.2...v8.2.3) (2024-12-10)
27+
28+
29+
### Bug Fixes
30+
31+
* bug in multisig tx decoding ([#2181](https://github.com/hirosystems/stacks-blockchain-api/issues/2181)) ([1f4125d](https://github.com/hirosystems/stacks-blockchain-api/commit/1f4125dacfe98ccefacf77f2e0f3ed33026f25ad))
32+
33+
## [8.2.2](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.2.1...v8.2.2) (2024-11-10)
34+
35+
36+
### Bug Fixes
37+
38+
* **rosetta:** add support for Nakamoto coinbase for unlock events ([#2162](https://github.com/hirosystems/stacks-blockchain-api/issues/2162)) ([2370799](https://github.com/hirosystems/stacks-blockchain-api/commit/2370799b8b29a74b0b273a6662a91f376e857fdc))
39+
40+
## [8.2.1](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.2.0...v8.2.1) (2024-11-05)
41+
42+
43+
### Bug Fixes
44+
45+
* indexes to optimize principal-based etag db lookups ([#2157](https://github.com/hirosystems/stacks-blockchain-api/issues/2157)) ([9da4dcd](https://github.com/hirosystems/stacks-blockchain-api/commit/9da4dcde18291d0e251820cc2e8fadaca568a4af))
46+
47+
## [8.2.0](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.1.2...v8.2.0) (2024-10-25)
48+
49+
50+
### Features
51+
52+
* allow stackerdb_chunks messages to be stored in db raw events table ([d03f2ef](https://github.com/hirosystems/stacks-blockchain-api/commit/d03f2ef940fd90e9b9e99d9b3636aaf2d348f0e7))
53+
* include `tenure-height` in block responses ([#2134](https://github.com/hirosystems/stacks-blockchain-api/issues/2134)) ([07426a2](https://github.com/hirosystems/stacks-blockchain-api/commit/07426a2e0060029ffe908597120a820c16cb3db3))
54+
* ingest `signer_signature` from `/new_block` event and expose in new endpoint ([#2125](https://github.com/hirosystems/stacks-blockchain-api/issues/2125)) ([c389154](https://github.com/hirosystems/stacks-blockchain-api/commit/c389154a47fee6f382be2343abdb9e01bc093300))
55+
56+
57+
### Bug Fixes
58+
59+
* event-replay block parsing outdated and incorrect ([#2133](https://github.com/hirosystems/stacks-blockchain-api/issues/2133)) ([2cd69fa](https://github.com/hirosystems/stacks-blockchain-api/commit/2cd69face8953541fcc2697a5a3b7b350de33383))
60+
161
## [8.1.2](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.1.1...v8.1.2) (2024-10-21)
262

363

client/src/socket-io/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export class StacksApiSocketClient {
7272

7373
handleSubscription(topic: Topic, subscribe = false, listener?: (...args: any[]) => void) {
7474
const subsQuery = this.socket.io.opts.query?.subscriptions as string | undefined;
75-
const subscriptions = new Set(subsQuery?.split(',') ?? []);
75+
const subscriptions = new Set(subsQuery ? subsQuery.split(',') : []);
7676
if (subscribe) {
7777
this.socket.emit('subscribe', topic, error => {
7878
if (error) console.error(`Error subscribing: ${error}`);
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/** @param { import("node-pg-migrate").MigrationBuilder } pgm */
2+
exports.up = pgm => {
3+
// Indexes used to speed up queries in the `getPrincipalLastActivityTxIds` function:
4+
// https://github.com/hirosystems/stacks-blockchain-api/blob/e3c30c6e0cb14843d5f089b64010d738b0b27763/src/datastore/pg-store.ts#L4440-L4492
5+
// See issue https://github.com/hirosystems/stacks-blockchain-api/issues/2147
6+
7+
pgm.createIndex(
8+
'ft_events',
9+
[
10+
'sender',
11+
'recipient',
12+
{ name: 'block_height', order: 'DESC' },
13+
{ name: 'microblock_sequence', order: 'DESC' },
14+
{ name: 'tx_index', order: 'DESC' },
15+
{ name: 'event_index', order: 'DESC' }
16+
],
17+
{
18+
name: 'idx_ft_events_optimized',
19+
where: 'canonical = TRUE AND microblock_canonical = TRUE',
20+
}
21+
);
22+
23+
pgm.createIndex(
24+
'nft_events',
25+
[
26+
'sender',
27+
'recipient',
28+
{ name: 'block_height', order: 'DESC' },
29+
{ name: 'microblock_sequence', order: 'DESC' },
30+
{ name: 'tx_index', order: 'DESC' },
31+
{ name: 'event_index', order: 'DESC' }
32+
],
33+
{
34+
name: 'idx_nft_events_optimized',
35+
where: 'canonical = TRUE AND microblock_canonical = TRUE',
36+
}
37+
);
38+
39+
pgm.createIndex(
40+
'mempool_txs',
41+
[
42+
'sender_address',
43+
'sponsor_address',
44+
'token_transfer_recipient_address',
45+
{ name: 'receipt_time', order: 'DESC' }
46+
],
47+
{
48+
name: 'idx_mempool_txs_optimized',
49+
where: 'pruned = FALSE',
50+
}
51+
);
52+
};
53+
54+
/** @param { import("node-pg-migrate").MigrationBuilder } pgm */
55+
exports.down = pgm => {
56+
pgm.dropIndex('ft_events', ['sender', 'recipient', 'block_height', 'microblock_sequence', 'tx_index', 'event_index'], { name: 'idx_ft_events_optimized' });
57+
pgm.dropIndex('nft_events', ['sender', 'recipient', 'block_height', 'microblock_sequence', 'tx_index', 'event_index'], { name: 'idx_nft_events_optimized' });
58+
pgm.dropIndex('mempool_txs', ['sender_address', 'sponsor_address', 'token_transfer_recipient_address', 'receipt_time'], { name: 'idx_mempool_txs_optimized' });
59+
};

0 commit comments

Comments
 (0)