Skip to content

Commit 0f74846

Browse files
authored
Merge pull request #735 from evoskuil/master
Adapt to database changes, update table config.
2 parents 7e3878d + 5c93c06 commit 0f74846

File tree

3 files changed

+30
-30
lines changed

3 files changed

+30
-30
lines changed

console/executor_scans.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,11 +372,11 @@ void executor::scan_collisions() const
372372
const auto transactions = query_.to_transactions(link);
373373
for (const auto& transaction: transactions)
374374
{
375-
const auto inputs = query_.to_spends(transaction);
376-
for (const auto& in: inputs)
375+
const auto points = query_.to_points(transaction);
376+
for (const auto& point: points)
377377
{
378378
++total;
379-
++spend.at(hash(query_.get_spend_key(in)) % spend_buckets);
379+
++spend.at(hash(query_.to_spend_key(point)) % spend_buckets);
380380

381381
if (is_zero(index % put_frequency))
382382
logger(format("spend" BN_READ_ROW) % total %

console/executor_test_reader.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ void executor::read_test(bool dump) const
8787
size_t tx_position;
8888
hash_digest tx_hash;
8989

90-
uint32_t sp_tx_fk;
91-
hash_digest sp_tx_hash;
90+
uint32_t pt_tx_fk;
91+
hash_digest pt_tx_hash;
9292

9393
uint64_t input_fk;
9494
chain::input::cptr input{};
@@ -160,24 +160,24 @@ void executor::read_test(bool dump) const
160160
return;
161161
}
162162

163-
spend_link sp_fk{};
163+
point_link pt_fk{};
164164
input_link in_fk{};
165-
tx_link sp_tx_fk{};
165+
tx_link pt_tx_fk{};
166166

167167
// Get first spender only (may or may not be confirmed).
168-
const auto spenders = query_.to_spenders(out_fk);
169-
if (!spenders.empty())
168+
const auto points = query_.to_spenders(out_fk);
169+
if (!points.empty())
170170
{
171-
sp_fk = spenders.front();
172-
table::spend::record spend{};
173-
if (!store_.spend.get(sp_fk, spend))
171+
pt_fk = points.front();
172+
table::point::record point{};
173+
if (!store_.point.get(pt_fk, point))
174174
{
175-
// fault, missing spender.
175+
// fault, missing point.
176176
return;
177177
}
178178

179-
in_fk = spend.input_fk;
180-
sp_tx_fk = spend.parent_fk;
179+
in_fk = point.input_fk;
180+
pt_tx_fk = point.parent_fk;
181181
}
182182

183183
////++found;
@@ -193,11 +193,11 @@ void executor::read_test(bool dump) const
193193
txs.position,
194194
query_.get_tx_key(tx_fk),
195195

196-
sp_tx_fk,
197-
query_.get_tx_key(sp_tx_fk),
196+
pt_tx_fk,
197+
query_.get_tx_key(pt_tx_fk),
198198

199199
in_fk,
200-
query_.get_input(sp_fk),
200+
query_.get_input(pt_fk),
201201

202202
out_fk,
203203
query_.get_output(out_fk)
@@ -261,8 +261,8 @@ void executor::read_test(bool dump) const
261261
row.tx_position %
262262
encode_hash(row.tx_hash) %
263263

264-
row.sp_tx_fk %
265-
encode_hash(row.sp_tx_hash) %
264+
row.pt_tx_fk %
265+
encode_hash(row.pt_tx_hash) %
266266

267267
row.output_fk %
268268
output %

src/parser.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,18 @@ parser::parser(system::chain::selection context) NOEXCEPT
8282
configured.database.output_size = 25'300'000'000;
8383
configured.database.output_rate = 5;
8484

85-
configured.database.point_size = 8'389'074'978;
85+
configured.database.point_size = 32'000'000'000;
8686
configured.database.point_rate = 5;
8787

88-
configured.database.puts_size = 6'300'000'000;
88+
configured.database.puts_size = 3'700'000'000;
8989
configured.database.puts_rate = 5;
9090

91-
configured.database.spend_buckets = 1'751'471'741;
92-
configured.database.spend_size = 16'000'000'000;
91+
configured.database.spend_buckets = 1'750'905'073;
92+
configured.database.spend_size = 10'000'000'000;
9393
configured.database.spend_rate = 5;
9494

9595
configured.database.tx_buckets = 688'193'037;
96-
configured.database.tx_size = 16'150'000'000;
96+
configured.database.tx_size = 17'050'000'000;
9797
configured.database.tx_rate = 5;
9898

9999
configured.database.txs_buckets = 566'667;
@@ -696,7 +696,7 @@ options_metadata parser::load_settings() THROWS
696696
(
697697
"database.point_size",
698698
value<uint64_t>(&configured.database.point_size),
699-
"The minimum allocation of the point table body, defaults to '8389074978'."
699+
"The minimum allocation of the point table body, defaults to '32000000000'."
700700
)
701701
(
702702
"database.point_rate",
@@ -708,7 +708,7 @@ options_metadata parser::load_settings() THROWS
708708
(
709709
"database.puts_size",
710710
value<uint64_t>(&configured.database.puts_size),
711-
"The minimum allocation of the puts table body, defaults to '6300000000'."
711+
"The minimum allocation of the puts table body, defaults to '3700000000'."
712712
)
713713
(
714714
"database.puts_rate",
@@ -720,12 +720,12 @@ options_metadata parser::load_settings() THROWS
720720
(
721721
"database.spend_buckets",
722722
value<uint32_t>(&configured.database.spend_buckets),
723-
"The number of buckets in the spend table head, defaults to '1751471741'."
723+
"The number of buckets in the spend table head, defaults to '1750905073'."
724724
)
725725
(
726726
"database.spend_size",
727727
value<uint64_t>(&configured.database.spend_size),
728-
"The minimum allocation of the spend table body, defaults to '16000000000'."
728+
"The minimum allocation of the spend table body, defaults to '10000000000'."
729729
)
730730
(
731731
"database.spend_rate",
@@ -742,7 +742,7 @@ options_metadata parser::load_settings() THROWS
742742
(
743743
"database.tx_size",
744744
value<uint64_t>(&configured.database.tx_size),
745-
"The minimum allocation of the tx table body, defaults to '16150000000'."
745+
"The minimum allocation of the tx table body, defaults to '17050000000'."
746746
)
747747
(
748748
"database.tx_rate",

0 commit comments

Comments
 (0)