Skip to content

Commit 010a6d5

Browse files
committed
Increase rangeproof ct bits from 36 to 52
In line with elements update ElementsProject/elements#834 Also removed the min/max construct, again in line with elements
1 parent 401b2e8 commit 010a6d5

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

docs/source/gdk-json.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ Networks list JSON
740740
51840,
741741
65535
742742
],
743-
"ct_bits": 36,
743+
"ct_bits": 52,
744744
"ct_exponent": 0,
745745
"default_peers": [],
746746
"development": false,
@@ -805,7 +805,7 @@ Networks list JSON
805805
51840,
806806
65535
807807
],
808-
"ct_bits": 36,
808+
"ct_bits": 52,
809809
"ct_exponent": 0,
810810
"default_peers": [],
811811
"development": true,

src/ga_tx.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,8 +1070,7 @@ namespace sdk {
10701070
const auto eph_keypair_pub = h2b(output.at("eph_keypair_pub"));
10711071

10721072
const auto rangeproof = asset_rangeproof(value, pub_key, eph_keypair_sec, asset_id, abf, vbf, value_commitment,
1073-
script, generator, 1, std::min(std::max(net_params.ct_exponent(), -1), 18),
1074-
std::min(std::max(net_params.ct_bits(), 1), 51));
1073+
script, generator, 1, std::min(std::max(net_params.ct_exponent(), -1), 18), net_params.ct_bits());
10751074

10761075
const auto surjectionproof = asset_surjectionproof(
10771076
asset_id, abf, generator, get_random_bytes<32>(), input_assets, input_abfs, input_ags);

src/network_parameters.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static std::map<std::string, std::shared_ptr<nlohmann::json>> registered_network
9696
{ "default_peers", nlohmann::json::array() }, { "p2pkh_version", 57u }, { "p2sh_version", 39u },
9797
{ "bech32_prefix", "lq" }, { "mainnet", true }, { "liquid", true }, { "development", false },
9898
{ "policy_asset", "6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d" },
99-
{ "blinded_prefix", 12u }, { "ct_exponent", 0 }, { "ct_bits", 36 },
99+
{ "blinded_prefix", 12u }, { "ct_exponent", 0 }, { "ct_bits", 52 },
100100
{ "csv_buckets", std::vector<uint32_t>{ 25920, 51840, 65535 } }, { "bip21_prefix", "liquidnetwork" } })) },
101101

102102
{ "localtest-liquid",
@@ -111,7 +111,7 @@ static std::map<std::string, std::shared_ptr<nlohmann::json>> registered_network
111111
{ "default_peers", nlohmann::json::array() }, { "p2pkh_version", 235u }, { "p2sh_version", 75u },
112112
{ "bech32_prefix", "tb" }, { "mainnet", false }, { "liquid", true }, { "development", true },
113113
{ "policy_asset", "5ac9f65c0efcc4775e0baec4ec03abdde22473cd3cf33c0419ca290e0751b225" },
114-
{ "blinded_prefix", 4u }, { "ct_exponent", 0 }, { "ct_bits", 36 },
114+
{ "blinded_prefix", 4u }, { "ct_exponent", 0 }, { "ct_bits", 52 },
115115
{ "csv_buckets", std::vector<uint32_t>{ 144, 4320, 25920, 51840, 65535 } },
116116
{ "bip21_prefix", "liquidnetwork" } })) },
117117

0 commit comments

Comments
 (0)