Skip to content

Commit b6614c3

Browse files
authored
Merge pull request #782 from evoskuil/master
Add schnorr and ecdsa table config settings parse.
2 parents 8037572 + 13f8294 commit b6614c3

4 files changed

Lines changed: 58 additions & 22 deletions

File tree

console/executor.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,6 @@ void executor::handle_stop(int signal)
111111
// Manage race between console stop and server stop.
112112
void executor::stop(int signal)
113113
{
114-
////if (auto* log = fopen("shutdown.log", "a"))
115-
////{
116-
//// fprintf(log, "stop %lu at %llu\n", signal, GetTickCount64());
117-
//// fflush(log);
118-
//// fclose(log);
119-
////}
120-
121114
// Implementation is limited to signal safe code.
122115
static_assert(std::atomic<int>::is_always_lock_free);
123116

console/executor_dumps.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ void executor::dump_body_sizes() const
101101
query_.outs_body_size() %
102102
query_.candidate_body_size() %
103103
query_.confirmed_body_size() %
104+
query_.ecdsa_body_size() %
105+
query_.schnorr_body_size() %
104106
query_.duplicate_body_size() %
105107
query_.prevout_body_size() %
106108
query_.strong_tx_body_size() %
@@ -121,6 +123,8 @@ void executor::dump_records() const
121123
query_.outs_records() %
122124
query_.candidate_records() %
123125
query_.confirmed_records() %
126+
query_.ecdsa_records() %
127+
query_.schnorr_records() %
124128
query_.duplicate_records() %
125129
query_.strong_tx_records() %
126130
query_.filter_bk_records() %

console/localize.hpp

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,16 @@
8484
" outs :%8%\n" \
8585
" candidate :%9%\n" \
8686
" confirmed :%10%\n" \
87-
" duplicate :%11%\n" \
88-
" prevout :%12%\n" \
89-
" strong_tx :%13%\n" \
90-
" valid_bk :%14%\n" \
91-
" valid_tx :%15%\n" \
92-
" filter_bk :%16%\n" \
93-
" filter_tx :%17%\n" \
94-
" address :%18%"
87+
" ecdsa :%11%\n" \
88+
" 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%"
9597
#define BS_INFORMATION_RECORDS \
9698
"Table records...\n" \
9799
" header :%1%\n" \
@@ -101,10 +103,12 @@
101103
" outs :%5%\n" \
102104
" candidate :%6%\n" \
103105
" confirmed :%7%\n" \
104-
" duplicate :%8%\n" \
105-
" strong_tx :%9%\n" \
106-
" filter_bk :%10%\n" \
107-
" address :%11%"
106+
" ecdsa :%8%\n" \
107+
" schnorr :%9%\n" \
108+
" duplicate :%10%\n" \
109+
" strong_tx :%11%\n" \
110+
" filter_bk :%12%\n" \
111+
" address :%13%"
108112
#define BS_INFORMATION_SLABS \
109113
"Table slabs..."
110114
#define BS_INFORMATION_SLABS_ROW \

src/parser.cpp

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ parser::parser(system::chain::selection context,
142142

143143
// database (caches)
144144

145+
configured.database.ecdsa_size = 1;
146+
configured.database.ecdsa_rate = 5;
147+
148+
configured.database.schnorr_size = 1;
149+
configured.database.schnorr_rate = 5;
150+
145151
configured.database.duplicate_buckets = 1024;
146152
configured.database.duplicate_size = 44;
147153
configured.database.duplicate_rate = 5;
@@ -1329,15 +1335,20 @@ options_metadata parser::load_settings() THROWS
13291335
"Defer confirmation, defaults to 'false'."
13301336
)
13311337
(
1332-
"node.fee_estimate_horizon",
1333-
value<uint16_t>(&configured.node.fee_estimate_horizon),
1334-
"Fee estimation horizon, limited to 1008, defaults to '0' (0 disables)."
1338+
"node.batch_signatures",
1339+
value<bool>(&configured.node.batch_signatures),
1340+
"Verify signatures in a batch for each concurrency window, defaults to 'true'."
13351341
)
13361342
////(
13371343
//// "node.headers_first",
13381344
//// value<bool>(&configured.node.headers_first),
13391345
//// "Obtain current header chain before obtaining associated blocks, defaults to 'true'."
13401346
////)
1347+
(
1348+
"node.fee_estimate_horizon",
1349+
value<uint16_t>(&configured.node.fee_estimate_horizon),
1350+
"Fee estimation horizon, limited to 1008, defaults to '0' (0 disables)."
1351+
)
13411352
(
13421353
"node.minimum_fee_rate",
13431354
value<float>(&configured.node.minimum_fee_rate),
@@ -1589,6 +1600,30 @@ options_metadata parser::load_settings() THROWS
15891600
"The percentage expansion of the strong_tx table body, defaults to '5'."
15901601
)
15911602

1603+
/* ecdsa */
1604+
(
1605+
"database.ecdsa_size",
1606+
value<uint64_t>(&configured.database.ecdsa_size),
1607+
"The minimum allocation of the ecdsa table body, defaults to '1'."
1608+
)
1609+
(
1610+
"database.ecdsa_rate",
1611+
value<uint16_t>(&configured.database.ecdsa_rate),
1612+
"The percentage expansion of the ecdsa table body, defaults to '5'."
1613+
)
1614+
1615+
/* schnorr */
1616+
(
1617+
"database.schnorr_size",
1618+
value<uint64_t>(&configured.database.schnorr_size),
1619+
"The minimum allocation of the schnorr table body, defaults to '1'."
1620+
)
1621+
(
1622+
"database.schnorr_rate",
1623+
value<uint16_t>(&configured.database.schnorr_rate),
1624+
"The percentage expansion of the schnorr table body, defaults to '5'."
1625+
)
1626+
15921627
/* duplicate */
15931628
(
15941629
"database.duplicate_buckets",

0 commit comments

Comments
 (0)