@@ -722,6 +722,12 @@ impl Forks {
722722 ForkName :: DontOverwriteAccountsFromStaleScillaState => {
723723 fork. dont_overwrite_evm_accounts_from_stale_scilla_state
724724 }
725+ ForkName :: MakeTransfersInScillaPrecompilesWithJournalApi => {
726+ fork. make_transfers_in_scilla_precompiles_with_journal_api
727+ }
728+ ForkName :: DisableInteropNativeZilTransfers0 => {
729+ fork. disable_interop_native_zil_transfers_0
730+ }
725731 } {
726732 return Some ( fork. at_height ) ;
727733 }
@@ -772,6 +778,8 @@ pub struct Fork {
772778 pub randao_support : bool ,
773779 pub evm_to_scilla_strings_encoded_properly : bool ,
774780 pub dont_overwrite_evm_accounts_from_stale_scilla_state : bool ,
781+ pub make_transfers_in_scilla_precompiles_with_journal_api : bool ,
782+ pub disable_interop_native_zil_transfers_0 : bool ,
775783}
776784
777785pub enum ForkName {
@@ -800,6 +808,8 @@ pub enum ForkName {
800808 ValidatorJailing ,
801809 ScillaCallGasExemptAddrsV2 ,
802810 DontOverwriteAccountsFromStaleScillaState ,
811+ MakeTransfersInScillaPrecompilesWithJournalApi ,
812+ DisableInteropNativeZilTransfers0 ,
803813}
804814
805815#[ derive( Clone , Debug , Serialize , Deserialize ) ]
@@ -925,6 +935,12 @@ pub struct ForkDelta {
925935 pub evm_to_scilla_strings_encoded_properly : Option < bool > ,
926936 /// If true, addresses modified also by EVM are skipped while applying the Scilla state delta
927937 pub dont_overwrite_evm_accounts_from_stale_scilla_state : Option < bool > ,
938+ /// If true, the `scilla_call` precompile performs its value refund through revm's journaled
939+ /// transfer API
940+ pub make_transfers_in_scilla_precompiles_with_journal_api : Option < bool > ,
941+ /// If true, a call to the `scilla_call` precompile that carries a non-zero native ZIL value fails
942+ /// immediately.
943+ pub disable_interop_native_zil_transfers_0 : Option < bool > ,
928944}
929945
930946impl Fork {
@@ -1043,6 +1059,12 @@ impl Fork {
10431059 dont_overwrite_evm_accounts_from_stale_scilla_state : delta
10441060 . dont_overwrite_evm_accounts_from_stale_scilla_state
10451061 . unwrap_or ( self . dont_overwrite_evm_accounts_from_stale_scilla_state ) ,
1062+ make_transfers_in_scilla_precompiles_with_journal_api : delta
1063+ . make_transfers_in_scilla_precompiles_with_journal_api
1064+ . unwrap_or ( self . make_transfers_in_scilla_precompiles_with_journal_api ) ,
1065+ disable_interop_native_zil_transfers_0 : delta
1066+ . disable_interop_native_zil_transfers_0
1067+ . unwrap_or ( self . disable_interop_native_zil_transfers_0 ) ,
10461068 }
10471069 }
10481070}
@@ -1150,6 +1172,8 @@ pub fn genesis_fork_default() -> Fork {
11501172 randao_support : true ,
11511173 evm_to_scilla_strings_encoded_properly : true ,
11521174 dont_overwrite_evm_accounts_from_stale_scilla_state : true ,
1175+ make_transfers_in_scilla_precompiles_with_journal_api : true ,
1176+ disable_interop_native_zil_transfers_0 : true ,
11531177 }
11541178}
11551179
@@ -1330,6 +1354,8 @@ mod tests {
13301354 randao_support: None ,
13311355 evm_to_scilla_strings_encoded_properly: None ,
13321356 dont_overwrite_evm_accounts_from_stale_scilla_state: None ,
1357+ make_transfers_in_scilla_precompiles_with_journal_api: None ,
1358+ disable_interop_native_zil_transfers_0: None ,
13331359 } ] ,
13341360 ..Default :: default ( )
13351361 } ;
@@ -1392,6 +1418,8 @@ mod tests {
13921418 randao_support: Some ( false ) ,
13931419 evm_to_scilla_strings_encoded_properly: None ,
13941420 dont_overwrite_evm_accounts_from_stale_scilla_state: None ,
1421+ make_transfers_in_scilla_precompiles_with_journal_api: None ,
1422+ disable_interop_native_zil_transfers_0: None ,
13951423 } ,
13961424 ForkDelta {
13971425 at_height: 20 ,
@@ -1434,6 +1462,8 @@ mod tests {
14341462 randao_support: None ,
14351463 evm_to_scilla_strings_encoded_properly: None ,
14361464 dont_overwrite_evm_accounts_from_stale_scilla_state: None ,
1465+ make_transfers_in_scilla_precompiles_with_journal_api: None ,
1466+ disable_interop_native_zil_transfers_0: None ,
14371467 } ,
14381468 ] ,
14391469 ..Default :: default ( )
@@ -1513,6 +1543,8 @@ mod tests {
15131543 randao_support: None ,
15141544 evm_to_scilla_strings_encoded_properly: None ,
15151545 dont_overwrite_evm_accounts_from_stale_scilla_state: None ,
1546+ make_transfers_in_scilla_precompiles_with_journal_api: None ,
1547+ disable_interop_native_zil_transfers_0: None ,
15161548 } ,
15171549 ForkDelta {
15181550 at_height: 10 ,
@@ -1555,6 +1587,8 @@ mod tests {
15551587 randao_support: None ,
15561588 evm_to_scilla_strings_encoded_properly: None ,
15571589 dont_overwrite_evm_accounts_from_stale_scilla_state: None ,
1590+ make_transfers_in_scilla_precompiles_with_journal_api: None ,
1591+ disable_interop_native_zil_transfers_0: None ,
15581592 } ,
15591593 ] ,
15601594 ..Default :: default ( )
@@ -1622,6 +1656,8 @@ mod tests {
16221656 randao_support : true ,
16231657 evm_to_scilla_strings_encoded_properly : true ,
16241658 dont_overwrite_evm_accounts_from_stale_scilla_state : true ,
1659+ make_transfers_in_scilla_precompiles_with_journal_api : true ,
1660+ disable_interop_native_zil_transfers_0 : true ,
16251661 } ,
16261662 forks : vec ! [ ] ,
16271663 ..Default :: default ( )
@@ -1677,6 +1713,8 @@ mod tests {
16771713 randao_support: None ,
16781714 evm_to_scilla_strings_encoded_properly: None ,
16791715 dont_overwrite_evm_accounts_from_stale_scilla_state: None ,
1716+ make_transfers_in_scilla_precompiles_with_journal_api: None ,
1717+ disable_interop_native_zil_transfers_0: None ,
16801718 } ,
16811719 ForkDelta {
16821720 at_height: 20 ,
@@ -1719,6 +1757,8 @@ mod tests {
17191757 randao_support: None ,
17201758 evm_to_scilla_strings_encoded_properly: None ,
17211759 dont_overwrite_evm_accounts_from_stale_scilla_state: None ,
1760+ make_transfers_in_scilla_precompiles_with_journal_api: None ,
1761+ disable_interop_native_zil_transfers_0: None ,
17221762 } ,
17231763 ] ,
17241764 ..Default :: default ( )
0 commit comments