@@ -444,10 +444,6 @@ struct FeatureFlags {
444444 #[ serde( skip_serializing_if = "is_false" ) ]
445445 enable_move_authentication_for_sponsor : bool ,
446446
447- // If true, only sponsor Move authentication is performed pre-consensus.
448- #[ serde( skip_serializing_if = "is_false" ) ]
449- pre_consensus_sponsor_only_move_authentication : bool ,
450-
451447 // If true, the change epoch transaction will contain validator scores.
452448 #[ serde( skip_serializing_if = "is_false" ) ]
453449 pass_validator_scores_to_advance_epoch : bool ,
@@ -484,6 +480,10 @@ struct FeatureFlags {
484480 // If true, perform additional borrow checks
485481 #[ serde( skip_serializing_if = "is_false" ) ]
486482 additional_borrow_checks : bool ,
483+
484+ // If true, only sponsor Move authentication is performed pre-consensus.
485+ #[ serde( skip_serializing_if = "is_false" ) ]
486+ pre_consensus_sponsor_only_move_authentication : bool ,
487487}
488488
489489fn is_true ( b : & bool ) -> bool {
@@ -1653,23 +1653,6 @@ impl ProtocolConfig {
16531653 enable_move_authentication_for_sponsor
16541654 }
16551655
1656- pub fn pre_consensus_sponsor_only_move_authentication ( & self ) -> bool {
1657- let pre_consensus_sponsor_only_move_authentication = self
1658- . feature_flags
1659- . pre_consensus_sponsor_only_move_authentication ;
1660- if pre_consensus_sponsor_only_move_authentication {
1661- assert ! (
1662- self . enable_move_authentication( ) ,
1663- "pre_consensus_sponsor_only_move_authentication requires enable_move_authentication to be set"
1664- ) ;
1665- assert ! (
1666- self . enable_move_authentication_for_sponsor( ) ,
1667- "pre_consensus_sponsor_only_move_authentication requires enable_move_authentication_for_sponsor to be set"
1668- ) ;
1669- }
1670- pre_consensus_sponsor_only_move_authentication
1671- }
1672-
16731656 pub fn pass_validator_scores_to_advance_epoch ( & self ) -> bool {
16741657 self . feature_flags . pass_validator_scores_to_advance_epoch
16751658 }
@@ -1720,6 +1703,23 @@ impl ProtocolConfig {
17201703 pub fn move_native_tx_context ( & self ) -> bool {
17211704 self . feature_flags . move_native_tx_context
17221705 }
1706+
1707+ pub fn pre_consensus_sponsor_only_move_authentication ( & self ) -> bool {
1708+ let pre_consensus_sponsor_only_move_authentication = self
1709+ . feature_flags
1710+ . pre_consensus_sponsor_only_move_authentication ;
1711+ if pre_consensus_sponsor_only_move_authentication {
1712+ assert ! (
1713+ self . enable_move_authentication( ) ,
1714+ "pre_consensus_sponsor_only_move_authentication requires enable_move_authentication to be set"
1715+ ) ;
1716+ assert ! (
1717+ self . enable_move_authentication_for_sponsor( ) ,
1718+ "pre_consensus_sponsor_only_move_authentication requires enable_move_authentication_for_sponsor to be set"
1719+ ) ;
1720+ }
1721+ pre_consensus_sponsor_only_move_authentication
1722+ }
17231723}
17241724
17251725#[ cfg( not( msim) ) ]
@@ -3038,18 +3038,18 @@ impl ProtocolConfig {
30383038 self . feature_flags . enable_move_authentication_for_sponsor = val;
30393039 }
30403040
3041- pub fn set_pre_consensus_sponsor_only_move_authentication_for_testing ( & mut self , val : bool ) {
3042- self . feature_flags
3043- . pre_consensus_sponsor_only_move_authentication = val;
3044- }
3045-
30463041 pub fn set_consensus_fast_commit_sync_for_testing ( & mut self , val : bool ) {
30473042 self . feature_flags . consensus_fast_commit_sync = val;
30483043 }
30493044
30503045 pub fn set_consensus_block_restrictions_for_testing ( & mut self , val : bool ) {
30513046 self . feature_flags . consensus_block_restrictions = val;
30523047 }
3048+
3049+ pub fn set_pre_consensus_sponsor_only_move_authentication_for_testing ( & mut self , val : bool ) {
3050+ self . feature_flags
3051+ . pre_consensus_sponsor_only_move_authentication = val;
3052+ }
30533053}
30543054
30553055type OverrideFn = dyn Fn ( ProtocolVersion , ProtocolConfig ) -> ProtocolConfig + Send + Sync ;
0 commit comments