File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ const ENV_NTX_MAX_CYCLES: &str = "MIDEN_NTX_MAX_CYCLES";
5353const DEFAULT_NTX_TICKER_INTERVAL : Duration = Duration :: from_millis ( 200 ) ;
5454const DEFAULT_NTX_IDLE_TIMEOUT : Duration = Duration :: from_secs ( 5 * 60 ) ;
5555const DEFAULT_NTX_SCRIPT_CACHE_SIZE : NonZeroUsize = NonZeroUsize :: new ( 1000 ) . unwrap ( ) ;
56- const DEFAULT_NTX_MAX_CYCLES : u32 = 1 << 16 ;
56+ const DEFAULT_NTX_MAX_CYCLES : u32 = 1 << 18 ;
5757
5858/// Configuration for the Validator key used to sign blocks.
5959///
@@ -199,7 +199,7 @@ pub struct NtxBuilderConfig {
199199
200200 /// Maximum number of VM execution cycles allowed for a single network transaction.
201201 ///
202- /// Network transactions that exceed this limit will fail. Defaults to 2^16 (65536 ) cycles.
202+ /// Network transactions that exceed this limit will fail. Defaults to 2^18 (262.144 ) cycles.
203203 #[ arg(
204204 long = "ntx-builder.max-cycles" ,
205205 env = ENV_NTX_MAX_CYCLES ,
Original file line number Diff line number Diff line change @@ -38,5 +38,6 @@ fn bundled_start_parses() {
3838
3939#[ test]
4040fn bundled_start_with_max_cycles_parses ( ) {
41- let _ = parse ( & [ "bundled" , "start" , "--ntx-builder.max-cycles" , "131072" ] ) ;
41+ let max_cycles = 2_i32 . pow ( 18 ) . to_string ( ) ;
42+ let _ = parse ( & [ "bundled" , "start" , "--ntx-builder.max-cycles" , & max_cycles] ) ;
4243}
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ impl AccountActorContext {
112112 idle_timeout : Duration :: from_secs ( 60 ) ,
113113 db : db. clone ( ) ,
114114 request_tx,
115- max_cycles : 1 << 16 ,
115+ max_cycles : 1 << 18 ,
116116 }
117117 }
118118}
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ const DEFAULT_MAX_ACCOUNT_CRASHES: usize = 10;
7171///
7272/// This limits the computational cost of network transactions. The protocol maximum is
7373/// `1 << 29` but network transactions should be much cheaper.
74- const DEFAULT_MAX_TX_CYCLES : u32 = 1 << 16 ;
74+ const DEFAULT_MAX_TX_CYCLES : u32 = 1 << 19 ;
7575
7676// CONFIGURATION
7777// =================================================================================================
@@ -128,7 +128,7 @@ pub struct NtxBuilderConfig {
128128 /// Maximum number of VM execution cycles allowed for a single network transaction.
129129 ///
130130 /// Network transactions that exceed this limit will fail with an execution error.
131- /// Defaults to 64k cycles.
131+ /// Defaults to 2^18 cycles.
132132 pub max_cycles : u32 ,
133133
134134 /// Path to the SQLite database file used for persistent state.
You can’t perform that action at this time.
0 commit comments