File tree Expand file tree Collapse file tree 4 files changed +12
-9
lines changed
bin/fuel-core/chainspec/local-testnet
crates/chain-config/src/config Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -16,4 +16,5 @@ benches/benches-outputs/src/test_gas_costs_output.rs
1616node_modules /
1717package-lock.json
1818package.json
19+ bin /fuel-core /chainspec /local-testnet /state_transition_bytecode.wasm
1920
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ impl Default for ChainConfig {
5454 fuel_core_types:: blockchain:: header:: LATEST_STATE_TRANSITION_VERSION ,
5555 ) ,
5656 // Note: It is invalid bytecode.
57- state_transition_bytecode : vec ! [ 123 ; 1024 ] ,
57+ state_transition_bytecode : vec ! [ ] ,
5858 consensus : ConsensusConfig :: default_poa ( ) ,
5959 }
6060 }
@@ -78,13 +78,17 @@ impl ChainConfig {
7878 } ) ?;
7979
8080 let bytecode_path = path. with_file_name ( BYTECODE_NAME ) ;
81- let bytecode = std:: fs:: read ( bytecode_path) . map_err ( |e| {
82- anyhow:: Error :: new ( e) . context ( format ! (
83- "an error occurred while loading the state transition bytecode: {:?}" ,
84- path. to_str( )
85- ) )
86- } ) ?;
8781
82+ let bytecode = if bytecode_path. exists ( ) {
83+ std:: fs:: read ( bytecode_path) . map_err ( |e| {
84+ anyhow:: Error :: new ( e) . context ( format ! (
85+ "an error occurred while loading the state transition bytecode: {:?}" ,
86+ path. to_str( )
87+ ) )
88+ } ) ?
89+ } else {
90+ Vec :: new ( )
91+ } ;
8892 chain_config. state_transition_bytecode = bytecode;
8993
9094 Ok ( chain_config)
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ use fuel_core_types::{
1111 blockchain:: header:: LATEST_STATE_TRANSITION_VERSION ,
1212 fuel_tx:: GasCosts ,
1313} ;
14- use fuel_core_upgradable_executor:: WASM_BYTECODE ;
1514use test_helpers:: fuel_core_driver:: FuelCoreDriver ;
1615
1716#[ test]
@@ -29,7 +28,6 @@ fn local_chainconfig_validity() -> anyhow::Result<()> {
2928 . set_gas_costs ( benchmark_gas_costs) ;
3029
3130 if env:: var_os ( "OVERRIDE_CHAIN_CONFIGS" ) . is_some ( ) {
32- chain_config. state_transition_bytecode = WASM_BYTECODE . to_vec ( ) ;
3331 chain_config. genesis_state_transition_version =
3432 Some ( LATEST_STATE_TRANSITION_VERSION ) ;
3533 std:: fs:: remove_file ( & stored_snapshot. chain_config ) ?;
You can’t perform that action at this time.
0 commit comments