From c533abd8b61995e00995a2ec0f1bf83c5d8b9d3d Mon Sep 17 00:00:00 2001 From: Mayukha Vadari Date: Thu, 1 May 2025 18:41:51 -0400 Subject: [PATCH] Update size and compute cap defaults (#5417) --- cfg/rippled-example.cfg | 6 +++--- src/test/jtx/impl/envconfig.cpp | 6 +++--- src/xrpld/core/Config.h | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cfg/rippled-example.cfg b/cfg/rippled-example.cfg index 6da6841052..bd2b044c4c 100644 --- a/cfg/rippled-example.cfg +++ b/cfg/rippled-example.cfg @@ -1259,7 +1259,7 @@ # default. Don't change this without understanding the consequences. # # Example: -# extension_compute_limit = 2000000 # 2 million gas +# extension_compute_limit = 1000000 # 1 million gas # # extension_size_limit = # @@ -1271,7 +1271,7 @@ # default. Don't change this without understanding the consequences. # # Example: -# extension_size_limit = 2000000 # 2 mb +# extension_size_limit = 100000 # 100 kb # # gas_price = # @@ -1281,7 +1281,7 @@ # default. Don't change this without understanding the consequences. # # Example: -# gas_price = 2000000 # 2 drops per gas +# gas_price = 1000000 # 1 drop per gas #------------------------------------------------------------------------------- # # 9. Misc Settings diff --git a/src/test/jtx/impl/envconfig.cpp b/src/test/jtx/impl/envconfig.cpp index ab0969c6cb..79643a8bb9 100644 --- a/src/test/jtx/impl/envconfig.cpp +++ b/src/test/jtx/impl/envconfig.cpp @@ -38,9 +38,9 @@ setupConfigForUnitTests(Config& cfg) cfg.FEES.reference_fee = 10; cfg.FEES.account_reserve = XRP(200).value().xrp().drops(); cfg.FEES.owner_reserve = XRP(50).value().xrp().drops(); - cfg.FEES.extension_compute_limit = 4294967295; - cfg.FEES.extension_size_limit = 4294967295; - cfg.FEES.gas_price = 1000000; + cfg.FEES.extension_compute_limit = 1'000'000; + cfg.FEES.extension_size_limit = 100'000; + cfg.FEES.gas_price = 1'000'000; // 1 drop = 1,000,000 micro-drops // The Beta API (currently v2) is always available to tests cfg.BETA_RPC_API = true; diff --git a/src/xrpld/core/Config.h b/src/xrpld/core/Config.h index 4b297c8610..c1b143b799 100644 --- a/src/xrpld/core/Config.h +++ b/src/xrpld/core/Config.h @@ -74,13 +74,13 @@ struct FeeSetup XRPAmount owner_reserve{2 * DROPS_PER_XRP}; /** The compute limit for Feature Extensions. */ - std::uint32_t extension_compute_limit{4294967295}; + std::uint32_t extension_compute_limit{1'000'000}; /** The WASM size limit for Feature Extensions. */ - std::uint32_t extension_size_limit{4294967295}; + std::uint32_t extension_size_limit{100'000}; /** The price of 1 WASM gas, in micro-drops. */ - std::uint32_t gas_price{1000000}; + std::uint32_t gas_price{1'000'000}; /* (Remember to update the example cfg files when changing any of these * values.) */