Commit 1936ba6
authored
feat: ingestion and querying for new PoX-2 events (#1403)
* test: Rosetta PoX-2 rewards and unlock events
* feat: progress on parsing and writing PoX2 events to postgres
* feat: sql insert for pox2 event data
* feat: reading pox2 event data from db, sql constraints on named pox event types
* feat: db-controller and initial GET route for reading & parsing pox2 events
* chore: progress on e2e testing for pox-2 delegation functionality
* chore: e2e testing for pox-2 delegation commit operation
* chore: e2e testing for pox-2 delegate-stack-increase
* chore: e2e testing for pox-2 delegate-stack-extend
* chore: e2e testing for pox-2 handle-unlock (missed reward slot)
* chore: lint fix, possible test fix
* chore: validation tests for each of the pox2-event payloads
* chore: potential test fixes
* chore: test fixes num 2
* chore: additional flaky test fixes
* feat: use pox2-events table to calculate account STX locked amount in /extended/v1/address balance endpoints
* chore: Rosetta integration tests for using segwit address in stacking operation
* test: ensure stacks RPC reports expected locked balance after Rosetta lock op
* chore: bump to latest pox2-events stacks-node image
* chore: move pox2-event parsing code into separate file
* ci: bump stacks2.1 test suite time to account for longer block mining interval from latest stacks-node changes
* chore: speed up tests with better "wait for pox cycle" logic
* ci: test fixes
* fix: adjustments to `handle-unlock` processing
* feat: add support for latest additions to pox2: `stack-aggregation-commit-indexed` and `stack-aggregation-increase`
* chore: integration tests for `stack-aggregation-commit-indexed` and `stack-aggregation-increase` pox2 event handling
* feat: store pox_v1_unlock_height as singleton in pg
* chore: initial setup for stacks-2.1 transition test suite
* chore: fix pox_state migrations
* feat: make account balance drop pox1-locked state after pox_v1_unlock_height is reached
* fix: rosetta block unlock events were limited to one account
* fix: off-by-one bug causing accounts to be reported as unlocked one block too early
* feat: add burn_block_height to db chainTip and /extended/status
* chore: fix datastore-tests from new status endpoint field
* chore: fix datastore-tests from new status endpoint field, second pass
* fix: adjust pox2_events query to handle special case with `handle-unlock`
* feat: add `contract_name` processing for the `stx_lock_event`, see stacks-network/stacks-core#3413
* chore: bump to latest stacks-network/stacks-core#3415
* chore: add account balance test for consistency between RPC and API balances throughout pox transition
* ci: matrix for stacks2.1-transition tests
* chore: start of Rosetta pox transition period tests
* chore: test Rosetta account balance endpoint in pox-2 stacking test suite
* ci: use unique account key for pox-2 rosetta test suite
* chore: test for pox_v1_unlock_height in Rosetta pox transition tests
* chore: refactor giant pox-2 test file into multiple files, run separately in ci
* feat: generate synthetic Rosetta stx unlock operations for the pox_v1_unlock_height block
* feat: generate Rosetta unlock operations from pox2 auto-unlock events
* fix: store locked balance from `handle-unlock` event rather than resetting to zero
* chore: remove todos
* chore: remove todos
* chore: remove no-longer correct sanity check
* chore: address PR feedback, composite index for pox2_events ordering1 parent 6cd5083 commit 1936ba6
File tree
51 files changed
+5999
-967
lines changed- .github/workflows
- .vscode
- docker
- docs
- api/info
- entities/info
- migrations
- src
- api
- controllers
- routes
- core-rpc
- datastore
- event-stream
- test-utils
- tests-2.1-transition
- tests-2.1
- tests
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
51 files changed
+5999
-967
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
349 | 359 | | |
350 | 360 | | |
351 | 361 | | |
| |||
382 | 392 | | |
383 | 393 | | |
384 | 394 | | |
385 | | - | |
| 395 | + | |
386 | 396 | | |
387 | 397 | | |
388 | 398 | | |
| |||
404 | 414 | | |
405 | 415 | | |
406 | 416 | | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
407 | 483 | | |
408 | 484 | | |
409 | 485 | | |
| |||
647 | 723 | | |
648 | 724 | | |
649 | 725 | | |
| 726 | + | |
650 | 727 | | |
651 | 728 | | |
652 | 729 | | |
| |||
666 | 743 | | |
667 | 744 | | |
668 | 745 | | |
| 746 | + | |
669 | 747 | | |
670 | 748 | | |
671 | 749 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
231 | 252 | | |
232 | 253 | | |
233 | 254 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1609 | 1609 | | |
1610 | 1610 | | |
1611 | 1611 | | |
| 1612 | + | |
1612 | 1613 | | |
1613 | 1614 | | |
1614 | 1615 | | |
| |||
1635 | 1636 | | |
1636 | 1637 | | |
1637 | 1638 | | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
1638 | 1643 | | |
1639 | 1644 | | |
1640 | 1645 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| |||
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| 78 | + | |
74 | 79 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
0 commit comments