Skip to content

Commit cff3ace

Browse files
authored
Merge pull request #789 from evoskuil/master
Parse database multisig table config.
2 parents ea403ad + 7cc1da9 commit cff3ace

3 files changed

Lines changed: 78 additions & 58 deletions

File tree

console/executor_dumps.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ void executor::dump_body_sizes() const
103103
query_.confirmed_body_size() %
104104
query_.ecdsa_body_size() %
105105
query_.schnorr_body_size() %
106+
query_.multisig_body_size() %
106107
query_.duplicate_body_size() %
107108
query_.prevout_body_size() %
108109
query_.strong_tx_body_size() %
@@ -125,6 +126,7 @@ void executor::dump_records() const
125126
query_.confirmed_records() %
126127
query_.ecdsa_records() %
127128
query_.schnorr_records() %
129+
query_.multisig_records() %
128130
query_.duplicate_records() %
129131
query_.strong_tx_records() %
130132
query_.filter_bk_records() %

console/localize.hpp

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
#define BS_RESTORE_COMPLETE \
6868
"Restored the database in %1% secs."
6969

70+
// TODO: table names should be derived from database constants and sorted.
7071
// --information
7172
#define BS_INFORMATION_START \
7273
"Configuration...\n" \
@@ -86,14 +87,15 @@
8687
" confirmed :%10%\n" \
8788
" ecdsa :%11%\n" \
8889
" schnorr :%12%\n" \
89-
" duplicate :%13%\n" \
90-
" prevout :%14%\n" \
91-
" strong_tx :%15%\n" \
92-
" valid_bk :%16%\n" \
93-
" valid_tx :%17%\n" \
94-
" filter_bk :%18%\n" \
95-
" filter_tx :%19%\n" \
96-
" address :%20%"
90+
" multisig :%13%\n" \
91+
" duplicate :%14%\n" \
92+
" prevout :%15%\n" \
93+
" strong_tx :%16%\n" \
94+
" valid_bk :%17%\n" \
95+
" valid_tx :%18%\n" \
96+
" filter_bk :%19%\n" \
97+
" filter_tx :%20%\n" \
98+
" address :%21%"
9799
#define BS_INFORMATION_RECORDS \
98100
"Table records...\n" \
99101
" header :%1%\n" \
@@ -105,10 +107,11 @@
105107
" confirmed :%7%\n" \
106108
" ecdsa :%8%\n" \
107109
" schnorr :%9%\n" \
108-
" duplicate :%10%\n" \
109-
" strong_tx :%11%\n" \
110-
" filter_bk :%12%\n" \
111-
" address :%13%"
110+
" multisig :%10%\n" \
111+
" duplicate :%11%\n" \
112+
" strong_tx :%12%\n" \
113+
" filter_bk :%13%\n" \
114+
" address :%14%"
112115
#define BS_INFORMATION_SLABS \
113116
"Table slabs..."
114117
#define BS_INFORMATION_SLABS_ROW \

src/parser.cpp

Lines changed: 61 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ parser::parser(system::chain::selection context,
148148
configured.database.schnorr_size = 1;
149149
configured.database.schnorr_rate = 5;
150150

151+
configured.database.multisig_size = 1;
152+
configured.database.multisig_rate = 5;
153+
151154
configured.database.duplicate_buckets = 1024;
152155
configured.database.duplicate_size = 44;
153156
configured.database.duplicate_rate = 5;
@@ -1447,215 +1450,227 @@ options_metadata parser::load_settings() THROWS
14471450
(
14481451
"database.header_buckets",
14491452
value<uint32_t>(&configured.database.header_buckets),
1450-
"The number of buckets in the header table head, defaults to '386364'."
1453+
"The number of buckets in the archive_header table head, defaults to '386364'."
14511454
)
14521455
(
14531456
"database.header_size",
14541457
value<uint64_t>(&configured.database.header_size),
1455-
"The minimum allocation of the header table body, defaults to '21000000'."
1458+
"The minimum allocation of the archive_header table body, defaults to '21000000'."
14561459
)
14571460
(
14581461
"database.header_rate",
14591462
value<uint16_t>(&configured.database.header_rate),
1460-
"The percentage expansion of the header table body, defaults to '5'."
1463+
"The percentage expansion of the archive_header table body, defaults to '5'."
14611464
)
14621465

14631466
/* input */
14641467
(
14651468
"database.input_size",
14661469
value<uint64_t>(&configured.database.input_size),
1467-
"The minimum allocation of the input table body, defaults to '92500000000'."
1470+
"The minimum allocation of the archive_input table body, defaults to '92500000000'."
14681471
)
14691472
(
14701473
"database.input_rate",
14711474
value<uint16_t>(&configured.database.input_rate),
1472-
"The percentage expansion of the input table body, defaults to '5'."
1475+
"The percentage expansion of the archive_input table body, defaults to '5'."
14731476
)
14741477

14751478
/* output */
14761479
(
14771480
"database.output_size",
14781481
value<uint64_t>(&configured.database.output_size),
1479-
"The minimum allocation of the output table body, defaults to '25300000000'."
1482+
"The minimum allocation of the archive_output table body, defaults to '25300000000'."
14801483
)
14811484
(
14821485
"database.output_rate",
14831486
value<uint16_t>(&configured.database.output_rate),
1484-
"The percentage expansion of the output table body, defaults to '5'."
1487+
"The percentage expansion of the archive_output table body, defaults to '5'."
14851488
)
14861489

14871490
/* point */
14881491
(
14891492
"database.point_buckets",
14901493
value<uint32_t>(&configured.database.point_buckets),
1491-
"The number of buckets in the spend table head, defaults to '1365977136'."
1494+
"The number of buckets in the archive_point table head, defaults to '1365977136'."
14921495
)
14931496
(
14941497
"database.point_size",
14951498
value<uint64_t>(&configured.database.point_size),
1496-
"The minimum allocation of the point table body, defaults to '25700000000'."
1499+
"The minimum allocation of the archive_point table body, defaults to '25700000000'."
14971500
)
14981501
(
14991502
"database.point_rate",
15001503
value<uint16_t>(&configured.database.point_rate),
1501-
"The percentage expansion of the point table body, defaults to '5'."
1504+
"The percentage expansion of the archive_point table body, defaults to '5'."
15021505
)
15031506

15041507
/* ins */
15051508
(
15061509
"database.ins_size",
15071510
value<uint64_t>(&configured.database.ins_size),
1508-
"The minimum allocation of the point table body, defaults to '8550000000'."
1511+
"The minimum allocation of the archive_ins table body, defaults to '8550000000'."
15091512
)
15101513
(
15111514
"database.ins_rate",
15121515
value<uint16_t>(&configured.database.ins_rate),
1513-
"The percentage expansion of the ins table body, defaults to '5'."
1516+
"The percentage expansion of the archive_ins table body, defaults to '5'."
15141517
)
15151518

15161519
/* outs */
15171520
(
15181521
"database.outs_size",
15191522
value<uint64_t>(&configured.database.outs_size),
1520-
"The minimum allocation of the puts table body, defaults to '3700000000'."
1523+
"The minimum allocation of the archive_puts table body, defaults to '3700000000'."
15211524
)
15221525
(
15231526
"database.outs_rate",
15241527
value<uint16_t>(&configured.database.outs_rate),
1525-
"The percentage expansion of the puts table body, defaults to '5'."
1528+
"The percentage expansion of the archive_puts table body, defaults to '5'."
15261529
)
15271530

15281531
/* tx */
15291532
(
15301533
"database.tx_buckets",
15311534
value<uint32_t>(&configured.database.tx_buckets),
1532-
"The number of buckets in the tx table head, defaults to '469222525'."
1535+
"The number of buckets in the archive_tx table head, defaults to '469222525'."
15331536
)
15341537
(
15351538
"database.tx_size",
15361539
value<uint64_t>(&configured.database.tx_size),
1537-
"The minimum allocation of the tx table body, defaults to '17000000000'."
1540+
"The minimum allocation of the archive_tx table body, defaults to '17000000000'."
15381541
)
15391542
(
15401543
"database.tx_rate",
15411544
value<uint16_t>(&configured.database.tx_rate),
1542-
"The percentage expansion of the tx table body, defaults to '5'."
1545+
"The percentage expansion of the archive_tx table body, defaults to '5'."
15431546
)
15441547

15451548
/* txs */
15461549
(
15471550
"database.txs_buckets",
15481551
value<uint32_t>(&configured.database.txs_buckets),
1549-
"The number of buckets in the txs table head, defaults to '900001'."
1552+
"The number of buckets in the archive_txs table head, defaults to '900001'."
15501553
)
15511554
(
15521555
"database.txs_size",
15531556
value<uint64_t>(&configured.database.txs_size),
1554-
"The minimum allocation of the txs table body, defaults to '1050000000'."
1557+
"The minimum allocation of the archive_txs table body, defaults to '1050000000'."
15551558
)
15561559
(
15571560
"database.txs_rate",
15581561
value<uint16_t>(&configured.database.txs_rate),
1559-
"The percentage expansion of the txs table body, defaults to '5'."
1562+
"The percentage expansion of the archive_txs table body, defaults to '5'."
15601563
)
15611564

15621565
/* candidate */
15631566
(
15641567
"database.candidate_size",
15651568
value<uint64_t>(&configured.database.candidate_size),
1566-
"The minimum allocation of the candidate table body, defaults to '2575500'."
1569+
"The minimum allocation of the index_candidate table body, defaults to '2575500'."
15671570
)
15681571
(
15691572
"database.candidate_rate",
15701573
value<uint16_t>(&configured.database.candidate_rate),
1571-
"The percentage expansion of the candidate table body, defaults to '5'."
1574+
"The percentage expansion of the index_candidate table body, defaults to '5'."
15721575
)
15731576

15741577
/* confirmed */
15751578
(
15761579
"database.confirmed_size",
15771580
value<uint64_t>(&configured.database.confirmed_size),
1578-
"The minimum allocation of the candidate table body, defaults to '2575500'."
1581+
"The minimum allocation of the index_confirmed table body, defaults to '2575500'."
15791582
)
15801583
(
15811584
"database.confirmed_rate",
15821585
value<uint16_t>(&configured.database.confirmed_rate),
1583-
"The percentage expansion of the candidate table body, defaults to '5'."
1586+
"The percentage expansion of the index_confirmed table body, defaults to '5'."
15841587
)
15851588

15861589
/* strong_tx */
15871590
(
15881591
"database.strong_tx_buckets",
15891592
value<uint32_t>(&configured.database.strong_tx_buckets),
1590-
"The number of buckets in the strong_tx table head, defaults to '469222525'."
1593+
"The number of buckets in the index_strong table head, defaults to '469222525'."
15911594
)
15921595
(
15931596
"database.strong_tx_size",
15941597
value<uint64_t>(&configured.database.strong_tx_size),
1595-
"The minimum allocation of the strong_tx table body, defaults to '2900000000'."
1598+
"The minimum allocation of the index_strong table body, defaults to '2900000000'."
15961599
)
15971600
(
15981601
"database.strong_tx_rate",
15991602
value<uint16_t>(&configured.database.strong_tx_rate),
1600-
"The percentage expansion of the strong_tx table body, defaults to '5'."
1603+
"The percentage expansion of the index_strong table body, defaults to '5'."
16011604
)
16021605

16031606
/* ecdsa */
16041607
(
16051608
"database.ecdsa_size",
16061609
value<uint64_t>(&configured.database.ecdsa_size),
1607-
"The minimum allocation of the ecdsa table body, defaults to '1'."
1610+
"The minimum allocation of the batch_ecdsa table body, defaults to '1'."
16081611
)
16091612
(
16101613
"database.ecdsa_rate",
16111614
value<uint16_t>(&configured.database.ecdsa_rate),
1612-
"The percentage expansion of the ecdsa table body, defaults to '5'."
1615+
"The percentage expansion of the batch_ecdsa table body, defaults to '5'."
16131616
)
16141617

16151618
/* schnorr */
16161619
(
16171620
"database.schnorr_size",
16181621
value<uint64_t>(&configured.database.schnorr_size),
1619-
"The minimum allocation of the schnorr table body, defaults to '1'."
1622+
"The minimum allocation of the batch_schnorr table body, defaults to '1'."
16201623
)
16211624
(
16221625
"database.schnorr_rate",
16231626
value<uint16_t>(&configured.database.schnorr_rate),
1624-
"The percentage expansion of the schnorr table body, defaults to '5'."
1627+
"The percentage expansion of the batch_schnorr table body, defaults to '5'."
1628+
)
1629+
1630+
/* multisig */
1631+
(
1632+
"database.multisig_size",
1633+
value<uint64_t>(&configured.database.multisig_size),
1634+
"The minimum allocation of the batch_multisig table body, defaults to '1'."
1635+
)
1636+
(
1637+
"database.multisig_rate",
1638+
value<uint16_t>(&configured.database.multisig_rate),
1639+
"The percentage expansion of the batch_multisig table body, defaults to '5'."
16251640
)
16261641

16271642
/* duplicate */
16281643
(
16291644
"database.duplicate_buckets",
16301645
value<uint16_t>(&configured.database.duplicate_buckets),
1631-
"The minimum number of buckets in the duplicate table head, defaults to '1024'."
1646+
"The minimum number of buckets in the cache_duplicate table head, defaults to '1024'."
16321647
)
16331648
(
16341649
"database.duplicate_size",
16351650
value<uint64_t>(&configured.database.duplicate_size),
1636-
"The minimum allocation of the duplicate table body, defaults to '44'."
1651+
"The minimum allocation of the cache_duplicate table body, defaults to '44'."
16371652
)
16381653
(
16391654
"database.duplicate_rate",
16401655
value<uint16_t>(&configured.database.duplicate_rate),
1641-
"The percentage expansion of the duplicate table, defaults to '5'."
1656+
"The percentage expansion of the cache_duplicate table, defaults to '5'."
16421657
)
16431658

16441659
/* prevout */
16451660
(
16461661
"database.prevout_buckets",
16471662
value<uint32_t>(&configured.database.prevout_buckets),
1648-
"The minimum number of buckets in the prevout table head, defaults to '0'."
1663+
"The minimum number of buckets in the cache_prevout table head, defaults to '0'."
16491664
)
16501665
(
16511666
"database.prevout_size",
16521667
value<uint64_t>(&configured.database.prevout_size),
1653-
"The minimum allocation of the prevout table body, defaults to '1'."
1668+
"The minimum allocation of the cache_prevout table body, defaults to '1'."
16541669
)
16551670
(
16561671
"database.prevout_rate",
16571672
value<uint16_t>(&configured.database.prevout_rate),
1658-
"The percentage expansion of the prevout table, defaults to '5'."
1673+
"The percentage expansion of the cache_prevout table, defaults to '5'."
16591674
)
16601675

16611676
/* validated_bk */
@@ -1696,51 +1711,51 @@ options_metadata parser::load_settings() THROWS
16961711
(
16971712
"database.address_buckets",
16981713
value<uint32_t>(&configured.database.address_buckets),
1699-
"The number of buckets in the address table head, defaults to '1' (0|1 disables)."
1714+
"The number of buckets in the option_address table head, defaults to '1' (0|1 disables)."
17001715
)
17011716
(
17021717
"database.address_size",
17031718
value<uint64_t>(&configured.database.address_size),
1704-
"The minimum allocation of the address table body, defaults to '1'."
1719+
"The minimum allocation of the option_address table body, defaults to '1'."
17051720
)
17061721
(
17071722
"database.address_rate",
17081723
value<uint16_t>(&configured.database.address_rate),
1709-
"The percentage expansion of the address table body, defaults to '5'."
1724+
"The percentage expansion of the option_address table body, defaults to '5'."
17101725
)
17111726

17121727
/* filter_bk */
17131728
(
17141729
"database.filter_bk_buckets",
17151730
value<uint32_t>(&configured.database.filter_bk_buckets),
1716-
"The number of buckets in the filter_bk table head, defaults to '0' (0 disables)."
1731+
"The number of buckets in the option_filter_bk table head, defaults to '0' (0 disables)."
17171732
)
17181733
(
17191734
"database.filter_bk_size",
17201735
value<uint64_t>(&configured.database.filter_bk_size),
1721-
"The minimum allocation of the filter_bk table body, defaults to '1'."
1736+
"The minimum allocation of the option_filter_bk table body, defaults to '1'."
17221737
)
17231738
(
17241739
"database.filter_bk_rate",
17251740
value<uint16_t>(&configured.database.filter_bk_rate),
1726-
"The percentage expansion of the filter_bk table body, defaults to '5'."
1741+
"The percentage expansion of the option_filter_bk table body, defaults to '5'."
17271742
)
17281743

17291744
/* filter_tx */
17301745
(
17311746
"database.filter_tx_buckets",
17321747
value<uint32_t>(&configured.database.filter_tx_buckets),
1733-
"The number of buckets in the filter_tx table head, defaults to '0' (0 disables)."
1748+
"The number of buckets in the option_filter_tx table head, defaults to '0' (0 disables)."
17341749
)
17351750
(
17361751
"database.filter_tx_size",
17371752
value<uint64_t>(&configured.database.filter_tx_size),
1738-
"The minimum allocation of the filter_tx table body, defaults to '1'."
1753+
"The minimum allocation of the option_filter_tx table body, defaults to '1'."
17391754
)
17401755
(
17411756
"database.filter_tx_rate",
17421757
value<uint16_t>(&configured.database.filter_tx_rate),
1743-
"The percentage expansion of the filter_tx table body, defaults to '5'."
1758+
"The percentage expansion of the option_filter_tx table body, defaults to '5'."
17441759
)
17451760

17461761
/* [log] */

0 commit comments

Comments
 (0)