@@ -9,6 +9,7 @@ use std::{
99} ;
1010
1111use iota_adapter:: adapter:: run_metered_move_bytecode_verifier;
12+ use iota_config:: verifier_signing_config:: VerifierSigningConfig ;
1213use iota_framework:: BuiltInFramework ;
1314use iota_move_build:: { CompiledPackage , IotaPackageHooks } ;
1415use iota_protocol_config:: ProtocolConfig ;
@@ -36,8 +37,10 @@ fn test_metered_move_bytecode_verifier() {
3637 let compiled_modules: Vec < _ > = compiled_package. get_modules ( ) . cloned ( ) . collect ( ) ;
3738
3839 let protocol_config = ProtocolConfig :: get_for_max_version_UNSAFE ( ) ;
39- let mut verifier_config = protocol_config. verifier_config ( /* for_signing */ true ) ;
40- let mut meter_config = protocol_config. meter_config_for_signing ( ) ;
40+ let signing_config = VerifierSigningConfig :: default ( ) ;
41+ let mut verifier_config =
42+ protocol_config. verifier_config ( Some ( signing_config. limits_for_signing ( ) ) ) ;
43+ let mut meter_config = signing_config. meter_config_for_signing ( ) ;
4144 let registry = & Registry :: new ( ) ;
4245 let bytecode_verifier_metrics = Arc :: new ( BytecodeVerifierMetrics :: new ( registry) ) ;
4346 let mut meter = IotaVerifierMeter :: new ( meter_config. clone ( ) ) ;
@@ -202,9 +205,11 @@ fn test_metered_move_bytecode_verifier() {
202205 let package = build ( & path) . unwrap ( ) ;
203206 packages. push ( package. get_dependency_sorted_modules ( with_unpublished_deps) ) ;
204207
208+ let signing_config = VerifierSigningConfig :: default ( ) ;
205209 let protocol_config = ProtocolConfig :: get_for_max_version_UNSAFE ( ) ;
206- let verifier_config = protocol_config. verifier_config ( /* for_signing */ true ) ;
207- let meter_config = protocol_config. meter_config_for_signing ( ) ;
210+ let verifier_config =
211+ protocol_config. verifier_config ( Some ( signing_config. limits_for_signing ( ) ) ) ;
212+ let meter_config = signing_config. meter_config_for_signing ( ) ;
208213
209214 // Check if the same meter is indeed used multiple invocations of the verifier
210215 let mut meter = IotaVerifierMeter :: new ( meter_config) ;
@@ -229,9 +234,11 @@ fn test_metered_move_bytecode_verifier() {
229234fn test_meter_system_packages ( ) {
230235 move_package:: package_hooks:: register_package_hooks ( Box :: new ( IotaPackageHooks ) ) ;
231236
237+ let signing_config = VerifierSigningConfig :: default ( ) ;
232238 let protocol_config = ProtocolConfig :: get_for_max_version_UNSAFE ( ) ;
233- let verifier_config = protocol_config. verifier_config ( /* for_signing */ true ) ;
234- let meter_config = protocol_config. meter_config_for_signing ( ) ;
239+ let verifier_config =
240+ protocol_config. verifier_config ( Some ( signing_config. limits_for_signing ( ) ) ) ;
241+ let meter_config = signing_config. meter_config_for_signing ( ) ;
235242 let registry = & Registry :: new ( ) ;
236243 let bytecode_verifier_metrics = Arc :: new ( BytecodeVerifierMetrics :: new ( registry) ) ;
237244 let mut meter = IotaVerifierMeter :: new ( meter_config) ;
@@ -283,9 +290,11 @@ fn test_meter_system_packages() {
283290fn test_build_and_verify_programmability_examples ( ) {
284291 move_package:: package_hooks:: register_package_hooks ( Box :: new ( IotaPackageHooks ) ) ;
285292
293+ let signing_config = VerifierSigningConfig :: default ( ) ;
286294 let protocol_config = ProtocolConfig :: get_for_max_version_UNSAFE ( ) ;
287- let verifier_config = protocol_config. verifier_config ( /* for_signing */ true ) ;
288- let meter_config = protocol_config. meter_config_for_signing ( ) ;
295+ let verifier_config =
296+ protocol_config. verifier_config ( Some ( signing_config. limits_for_signing ( ) ) ) ;
297+ let meter_config = signing_config. meter_config_for_signing ( ) ;
289298 let registry = & Registry :: new ( ) ;
290299 let bytecode_verifier_metrics = Arc :: new ( BytecodeVerifierMetrics :: new ( registry) ) ;
291300 let examples = PathBuf :: from ( env ! ( "CARGO_MANIFEST_DIR" ) ) . join ( "../../examples" ) ;
0 commit comments