Commit 1f64818
authored
feat!: optimize tables and improve canonical treatment of BNS data (#1287)
* refactor: re-order helper files
* fix: new columns for zonefiles
* feat: batch update subdomains
* fix: optimize some queries
* fix: api tests
* fix: optimize more queries, add cache handlers
* fix: some integration tests
* fix: all integration tests
* fix: v1 import test individually
* fix: move v1 import tests to separate file
* fix: start adding on conflict to subdomains
* fix: add uniqueness to names, subdomains and namespaces
* fix: remove extra index
* refactor: remove unused tx function
* fix: unused exports
* feat: echo block height while doing replays
* refactor: separate batch updates
* fix: calculate expire_block for a name based on namespace lifetime
* fix: test strict equal
* fix: remove secondary temporary table for event import
* fix: test sorting
* fix: detect namespaces readyed by third party contracts
* fix: bigint for namespaces
* refactor: move bns helper tests to bns suite
* chore: make event test less verbose
* chore: temporarily disable migrations on boot
* chore: add verbose logs to migration
* chore: make migration verbosity depend on log level
* fix: detect names from print event
* test: re-orgd attachments
* test: duplicate zonefile updates1 parent a10ac03 commit 1f64818
File tree
25 files changed
+1400
-721
lines changed- src
- api/routes/bns
- datastore
- event-replay
- event-stream
- bns
- import-v1
- migrations
- test-utils
- tests-bns
- tests
25 files changed
+1400
-721
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
| 15 | + | |
| 16 | + | |
11 | 17 | | |
12 | 18 | | |
| 19 | + | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
| |||
23 | 30 | | |
24 | 31 | | |
25 | 32 | | |
| 33 | + | |
26 | 34 | | |
27 | 35 | | |
28 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| 16 | + | |
12 | 17 | | |
13 | 18 | | |
14 | 19 | | |
| 20 | + | |
15 | 21 | | |
16 | | - | |
17 | 22 | | |
18 | 23 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
34 | 32 | | |
35 | | - | |
| 33 | + | |
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
| 40 | + | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | | - | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
71 | 60 | | |
72 | | - | |
| 61 | + | |
73 | 62 | | |
74 | 63 | | |
75 | 64 | | |
76 | 65 | | |
77 | 66 | | |
78 | 67 | | |
| 68 | + | |
79 | 69 | | |
80 | 70 | | |
81 | 71 | | |
82 | 72 | | |
83 | 73 | | |
84 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
85 | 78 | | |
86 | | - | |
87 | 79 | | |
88 | 80 | | |
89 | 81 | | |
90 | 82 | | |
91 | 83 | | |
| 84 | + | |
92 | 85 | | |
93 | 86 | | |
94 | 87 | | |
| |||
149 | 142 | | |
150 | 143 | | |
151 | 144 | | |
| 145 | + | |
152 | 146 | | |
153 | 147 | | |
154 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
| 19 | + | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
18 | 24 | | |
19 | 25 | | |
| 26 | + | |
20 | 27 | | |
21 | 28 | | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
25 | 32 | | |
26 | 33 | | |
| 34 | + | |
27 | 35 | | |
28 | 36 | | |
29 | 37 | | |
| |||
39 | 47 | | |
40 | 48 | | |
41 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
42 | 53 | | |
43 | | - | |
44 | 54 | | |
45 | 55 | | |
46 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 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 | + | |
431 | 456 | | |
432 | 457 | | |
433 | 458 | | |
| |||
472 | 497 | | |
473 | 498 | | |
474 | 499 | | |
| 500 | + | |
475 | 501 | | |
476 | 502 | | |
477 | 503 | | |
| |||
480 | 506 | | |
481 | 507 | | |
482 | 508 | | |
483 | | - | |
484 | | - | |
| 509 | + | |
| 510 | + | |
485 | 511 | | |
486 | 512 | | |
487 | 513 | | |
| |||
683 | 709 | | |
684 | 710 | | |
685 | 711 | | |
686 | | - | |
687 | 712 | | |
688 | 713 | | |
689 | 714 | | |
| |||
744 | 769 | | |
745 | 770 | | |
746 | 771 | | |
747 | | - | |
| 772 | + | |
| 773 | + | |
748 | 774 | | |
749 | 775 | | |
750 | 776 | | |
| |||
948 | 974 | | |
949 | 975 | | |
950 | 976 | | |
| 977 | + | |
951 | 978 | | |
952 | 979 | | |
953 | 980 | | |
| |||
0 commit comments