Skip to content

Commit 86051be

Browse files
authored
Merge pull request #721 from evoskuil/master
Update table params, remove db.minimize config, add prevout to console dumps.
2 parents a2620a7 + fdfa4a1 commit 86051be

File tree

4 files changed

+75
-77
lines changed

4 files changed

+75
-77
lines changed

console/executor_dumps.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ void executor::dump_body_sizes() const
100100
query_.candidate_body_size() %
101101
query_.confirmed_body_size() %
102102
query_.spend_body_size() %
103+
query_.prevout_body_size() %
103104
query_.strong_tx_body_size() %
104105
query_.validated_tx_body_size() %
105106
query_.validated_bk_body_size() %
@@ -116,6 +117,7 @@ void executor::dump_records() const
116117
query_.candidate_records() %
117118
query_.confirmed_records() %
118119
query_.spend_records() %
120+
query_.prevout_records() %
119121
query_.strong_tx_records() %
120122
query_.address_records());
121123
}
@@ -128,6 +130,7 @@ void executor::dump_buckets() const
128130
query_.tx_buckets() %
129131
query_.point_buckets() %
130132
query_.spend_buckets() %
133+
query_.prevout_buckets() %
131134
query_.strong_tx_buckets() %
132135
query_.validated_tx_buckets() %
133136
query_.validated_bk_buckets() %
@@ -144,6 +147,7 @@ void executor::dump_collisions() const
144147
(to_double(query_.tx_records()) / query_.tx_buckets()) %
145148
(to_double(query_.point_records()) / query_.point_buckets()) %
146149
(to_double(query_.spend_records()) / query_.spend_buckets()) %
150+
(to_double(query_.prevout_records()) / query_.prevout_buckets()) %
147151
(to_double(query_.strong_tx_records()) / query_.strong_tx_buckets()) %
148152
(to_double(query_.tx_records()) / query_.validated_tx_buckets()) %
149153
(to_double(query_.header_records()) / query_.validated_bk_buckets()) %

console/localize.hpp

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,12 @@ namespace node {
8080
" candidate :%8%\n" \
8181
" confirmed :%9%\n" \
8282
" spend :%10%\n" \
83-
" strong_tx :%11%\n" \
84-
" valid_tx :%12%\n" \
85-
" valid_bk :%13%\n" \
86-
" address :%14%\n" \
87-
" neutrino :%15%"
83+
" prevout :%11%\n" \
84+
" strong_tx :%12%\n" \
85+
" valid_tx :%13%\n" \
86+
" valid_bk :%14%\n" \
87+
" address :%15%\n" \
88+
" neutrino :%16%"
8889
#define BN_MEASURE_RECORDS \
8990
"Table records...\n" \
9091
" header :%1%\n" \
@@ -93,8 +94,9 @@ namespace node {
9394
" candidate :%4%\n" \
9495
" confirmed :%5%\n" \
9596
" spend :%6%\n" \
96-
" strong_tx :%7%\n" \
97-
" address :%8%"
97+
" prevout :%7%\n" \
98+
" strong_tx :%8%\n" \
99+
" address :%9%"
98100
#define BN_MEASURE_SLABS \
99101
"Table slabs..."
100102
#define BN_MEASURE_SLABS_ROW \
@@ -110,23 +112,25 @@ namespace node {
110112
" tx :%3%\n" \
111113
" point :%4%\n" \
112114
" spend :%5%\n" \
113-
" strong_tx :%6%\n" \
114-
" valid_tx :%7%\n" \
115-
" valid_bk :%8%\n" \
116-
" address :%9%\n" \
117-
" neutrino :%10%"
115+
" prevout :%6%\n" \
116+
" strong_tx :%7%\n" \
117+
" valid_tx :%8%\n" \
118+
" valid_bk :%9%\n" \
119+
" address :%10%\n" \
120+
" neutrino :%11%"
118121
#define BN_MEASURE_COLLISION_RATES \
119122
"Collision rates...\n" \
120123
" header :%1%\n" \
121124
" txs :%2%\n" \
122125
" tx :%3%\n" \
123126
" point :%4%\n" \
124127
" spend :%5%\n" \
125-
" strong_tx :%6%\n" \
126-
" valid_tx :%7%\n" \
127-
" valid_bk :%8%\n" \
128-
" address :%9%\n" \
129-
" neutrino :%10%"
128+
" prevout :%6%\n" \
129+
" strong_tx :%7%\n" \
130+
" valid_tx :%8%\n" \
131+
" valid_bk :%9%\n" \
132+
" address :%10%\n" \
133+
" neutrino :%11%"
130134
#define BN_MEASURE_PROGRESS_START \
131135
"Thinking..."
132136
#define BN_MEASURE_PROGRESS \

src/parser.cpp

Lines changed: 50 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -70,68 +70,64 @@ parser::parser(system::chain::selection context) NOEXCEPT
7070
configured.network.services_maximum = service::node_network |
7171
service::node_witness;
7272

73-
// database
73+
// database (archive)
7474

75-
configured.database.minimize = false;
76-
77-
// archive
78-
79-
configured.database.header_buckets = 524'493;
80-
configured.database.header_size = 20'397'669;
75+
configured.database.header_buckets = 566'667;
76+
configured.database.header_size = 21'000'000;
8177
configured.database.header_rate = 5;
8278

83-
configured.database.input_size = 90'116'786'234;
79+
configured.database.input_size = 93'050'000'000;
8480
configured.database.input_rate = 5;
8581

86-
configured.database.output_size = 24'315'563'831;
82+
configured.database.output_size = 25'300'000'000;
8783
configured.database.output_rate = 5;
8884

89-
configured.database.point_buckets = 546'188'501;
90-
configured.database.point_size = 8'389'074'978;
85+
configured.database.point_buckets = 1'750'905'073;
86+
configured.database.point_size = 24'000'000'000;
9187
configured.database.point_rate = 5;
9288

93-
configured.database.puts_size = 6'059'682'874;
89+
configured.database.puts_size = 6'300'000'000;
9490
configured.database.puts_rate = 5;
9591

96-
configured.database.spend_buckets = 1'459'791'875;
97-
configured.database.spend_size = 15'364'630'530;
92+
configured.database.spend_buckets = 1'751'471'741;
93+
configured.database.spend_size = 16'000'000'000;
9894
configured.database.spend_rate = 5;
9995

100-
configured.database.tx_buckets = 551'320'125;
101-
configured.database.tx_size = 15'435'744'998;
96+
configured.database.tx_buckets = 688'193'037;
97+
configured.database.tx_size = 16'150'000'000;
10298
configured.database.tx_rate = 5;
10399

104-
configured.database.txs_buckets = 524'493;
105-
configured.database.txs_size = 999'581'257;
100+
configured.database.txs_buckets = 566'667;
101+
configured.database.txs_size = 1'050'000'000;
106102
configured.database.txs_rate = 5;
107103

108-
// indexes
104+
// database (indexes)
109105

110-
configured.database.candidate_size = 2'523'423;
106+
configured.database.candidate_size = 2'575'500;
111107
configured.database.candidate_rate = 5;
112108

113-
configured.database.confirmed_size = 2'523'423;
109+
configured.database.confirmed_size = 2'575'500;
114110
configured.database.confirmed_rate = 5;
115111

116-
configured.database.strong_tx_buckets = 551'320'125;
117-
configured.database.strong_tx_size = 2'987'563'554;
112+
configured.database.strong_tx_buckets = 688'193'037;
113+
configured.database.strong_tx_size = 3'150'000'000;
118114
configured.database.strong_tx_rate = 5;
119115

120-
// caches
116+
// database (caches)
121117

122-
configured.database.prevout_buckets = 850'000;
123-
configured.database.prevout_size = 2'000'000'000;
118+
configured.database.prevout_buckets = 850'001;
119+
configured.database.prevout_size = 2'600'000'000;
124120
configured.database.prevout_rate = 5;
125121

126-
configured.database.validated_tx_buckets = 551'320'125;
127-
configured.database.validated_tx_size = 47'068'879;
122+
configured.database.validated_tx_buckets = 0;
123+
configured.database.validated_tx_size = 1;
128124
configured.database.validated_tx_rate = 5;
129125

130-
configured.database.validated_bk_buckets = 524'493;
131-
configured.database.validated_bk_size = 8'290;
126+
configured.database.validated_bk_buckets = 566'667;
127+
configured.database.validated_bk_size = 3'400'000;
132128
configured.database.validated_bk_rate = 5;
133129

134-
// optionals
130+
// database (optionals)
135131

136132
configured.database.address_buckets = 0;
137133
configured.database.address_size = 1;
@@ -655,22 +651,17 @@ options_metadata parser::load_settings() THROWS
655651
value<std::filesystem::path>(&configured.database.path),
656652
"The blockchain database directory, defaults to 'blockchain'."
657653
)
658-
(
659-
"database.minimize",
660-
value<bool>(&configured.database.minimize),
661-
"Minimize store, saves ~50GiB, requires high RAM to avoid thrashing, defaults to false."
662-
)
663654

664655
/* header */
665656
(
666657
"database.header_buckets",
667658
value<uint32_t>(&configured.database.header_buckets),
668-
"The number of buckets in the header table head, defaults to '524493'."
659+
"The number of buckets in the header table head, defaults to '566667'."
669660
)
670661
(
671662
"database.header_size",
672663
value<uint64_t>(&configured.database.header_size),
673-
"The minimum allocation of the header table body, defaults to '20397669'."
664+
"The minimum allocation of the header table body, defaults to '21000000'."
674665
)
675666
(
676667
"database.header_rate",
@@ -682,7 +673,7 @@ options_metadata parser::load_settings() THROWS
682673
(
683674
"database.input_size",
684675
value<uint64_t>(&configured.database.input_size),
685-
"The minimum allocation of the input table body, defaults to '90116786234'."
676+
"The minimum allocation of the input table body, defaults to '93050000000'."
686677
)
687678
(
688679
"database.input_rate",
@@ -694,7 +685,7 @@ options_metadata parser::load_settings() THROWS
694685
(
695686
"database.output_size",
696687
value<uint64_t>(&configured.database.output_size),
697-
"The minimum allocation of the output table body, defaults to '24315563831'."
688+
"The minimum allocation of the output table body, defaults to '25300000000'."
698689
)
699690
(
700691
"database.output_rate",
@@ -706,12 +697,12 @@ options_metadata parser::load_settings() THROWS
706697
(
707698
"database.point_buckets",
708699
value<uint32_t>(&configured.database.point_buckets),
709-
"The number of buckets in the point table head, defaults to '546188501'."
700+
"The number of buckets in the point table head, defaults to '1750905073'."
710701
)
711702
(
712703
"database.point_size",
713704
value<uint64_t>(&configured.database.point_size),
714-
"The minimum allocation of the point table body, defaults to '8389074978'."
705+
"The minimum allocation of the point table body, defaults to '24000000000'."
715706
)
716707
(
717708
"database.point_rate",
@@ -723,7 +714,7 @@ options_metadata parser::load_settings() THROWS
723714
(
724715
"database.puts_size",
725716
value<uint64_t>(&configured.database.puts_size),
726-
"The minimum allocation of the puts table body, defaults to '6059682874'."
717+
"The minimum allocation of the puts table body, defaults to '6300000000'."
727718
)
728719
(
729720
"database.puts_rate",
@@ -735,12 +726,12 @@ options_metadata parser::load_settings() THROWS
735726
(
736727
"database.spend_buckets",
737728
value<uint32_t>(&configured.database.spend_buckets),
738-
"The number of buckets in the spend table head, defaults to '1459791875'."
729+
"The number of buckets in the spend table head, defaults to '1751471741'."
739730
)
740731
(
741732
"database.spend_size",
742733
value<uint64_t>(&configured.database.spend_size),
743-
"The minimum allocation of the spend table body, defaults to '15364630530'."
734+
"The minimum allocation of the spend table body, defaults to '16000000000'."
744735
)
745736
(
746737
"database.spend_rate",
@@ -752,12 +743,12 @@ options_metadata parser::load_settings() THROWS
752743
(
753744
"database.tx_buckets",
754745
value<uint32_t>(&configured.database.tx_buckets),
755-
"The number of buckets in the tx table head, defaults to '551320125'."
746+
"The number of buckets in the tx table head, defaults to '688193037'."
756747
)
757748
(
758749
"database.tx_size",
759750
value<uint64_t>(&configured.database.tx_size),
760-
"The minimum allocation of the tx table body, defaults to '15435744998'."
751+
"The minimum allocation of the tx table body, defaults to '16150000000'."
761752
)
762753
(
763754
"database.tx_rate",
@@ -769,12 +760,12 @@ options_metadata parser::load_settings() THROWS
769760
(
770761
"database.txs_buckets",
771762
value<uint32_t>(&configured.database.txs_buckets),
772-
"The number of buckets in the txs table head, defaults to '524493'."
763+
"The number of buckets in the txs table head, defaults to '566667'."
773764
)
774765
(
775766
"database.txs_size",
776767
value<uint64_t>(&configured.database.txs_size),
777-
"The minimum allocation of the txs table body, defaults to '999581257'."
768+
"The minimum allocation of the txs table body, defaults to '1050000000'."
778769
)
779770
(
780771
"database.txs_rate",
@@ -786,7 +777,7 @@ options_metadata parser::load_settings() THROWS
786777
(
787778
"database.candidate_size",
788779
value<uint64_t>(&configured.database.candidate_size),
789-
"The minimum allocation of the candidate table body, defaults to '2523423'."
780+
"The minimum allocation of the candidate table body, defaults to '2575500'."
790781
)
791782
(
792783
"database.candidate_rate",
@@ -798,7 +789,7 @@ options_metadata parser::load_settings() THROWS
798789
(
799790
"database.confirmed_size",
800791
value<uint64_t>(&configured.database.confirmed_size),
801-
"The minimum allocation of the candidate table body, defaults to '2523423'."
792+
"The minimum allocation of the candidate table body, defaults to '2575500'."
802793
)
803794
(
804795
"database.confirmed_rate",
@@ -810,12 +801,12 @@ options_metadata parser::load_settings() THROWS
810801
(
811802
"database.strong_tx_buckets",
812803
value<uint32_t>(&configured.database.strong_tx_buckets),
813-
"The number of buckets in the strong_tx table head, defaults to '551320125'."
804+
"The number of buckets in the strong_tx table head, defaults to '688193037'."
814805
)
815806
(
816807
"database.strong_tx_size",
817808
value<uint64_t>(&configured.database.strong_tx_size),
818-
"The minimum allocation of the strong_tx table body, defaults to '2987563554'."
809+
"The minimum allocation of the strong_tx table body, defaults to '3150000000'."
819810
)
820811
(
821812
"database.strong_tx_rate",
@@ -827,12 +818,12 @@ options_metadata parser::load_settings() THROWS
827818
(
828819
"database.prevout_buckets",
829820
value<uint32_t>(&configured.database.prevout_buckets),
830-
"The minimum number of buckets in the prevout table head, defaults to '850000'."
821+
"The minimum number of buckets in the prevout table head, defaults to '850001'."
831822
)
832823
(
833824
"database.prevout_size",
834825
value<uint64_t>(&configured.database.prevout_size),
835-
"The minimum allocation of the prevout table body, defaults to '2000000000'."
826+
"The minimum allocation of the prevout table body, defaults to '2600000000'."
836827
)
837828
(
838829
"database.prevout_rate",
@@ -844,12 +835,12 @@ options_metadata parser::load_settings() THROWS
844835
(
845836
"database.validated_tx_buckets",
846837
value<uint32_t>(&configured.database.validated_tx_buckets),
847-
"The number of buckets in the validated_tx table head, defaults to '551320125'."
838+
"The number of buckets in the validated_tx table head, defaults to '0' (0 disables)."
848839
)
849840
(
850841
"database.validated_tx_size",
851842
value<uint64_t>(&configured.database.validated_tx_size),
852-
"The minimum allocation of the validated_tx table body, defaults to '47068879'."
843+
"The minimum allocation of the validated_tx table body, defaults to '1'."
853844
)
854845
(
855846
"database.validated_tx_rate",
@@ -861,12 +852,12 @@ options_metadata parser::load_settings() THROWS
861852
(
862853
"database.validated_bk_buckets",
863854
value<uint32_t>(&configured.database.validated_bk_buckets),
864-
"The number of buckets in the validated_bk table head, defaults to '524493'."
855+
"The number of buckets in the validated_bk table head, defaults to '566667'."
865856
)
866857
(
867858
"database.validated_bk_size",
868859
value<uint64_t>(&configured.database.validated_bk_size),
869-
"The minimum allocation of the validated_bk table body, defaults to '8290'."
860+
"The minimum allocation of the validated_bk table body, defaults to '3400000'."
870861
)
871862
(
872863
"database.validated_bk_rate",

test/configuration.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ BOOST_AUTO_TEST_CASE(configuration__construct1__none_context__expected)
4444
BOOST_REQUIRE(!instance.write);
4545

4646
// Just a sample of settings.
47-
BOOST_REQUIRE(instance.database.minimize);
4847
BOOST_REQUIRE(instance.node.headers_first);
4948
BOOST_REQUIRE_EQUAL(instance.network.threads, 1_u32);
5049
BOOST_REQUIRE_EQUAL(instance.bitcoin.first_version, 1_u32);

0 commit comments

Comments
 (0)