From d5bce4ebe04ff4ef9e8c81910c5b11cd82aa195e Mon Sep 17 00:00:00 2001 From: Aayush Date: Thu, 17 Nov 2022 12:19:43 -0500 Subject: [PATCH] Account actor: Deprecate AuthenticateMessage --- actors/account/src/lib.rs | 5 +++-- actors/account/tests/account_actor_test.rs | 8 -------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/actors/account/src/lib.rs b/actors/account/src/lib.rs index 2f27a5208..0f23d9944 100644 --- a/actors/account/src/lib.rs +++ b/actors/account/src/lib.rs @@ -32,7 +32,8 @@ fil_actors_runtime::wasm_trampoline!(Actor); pub enum Method { Constructor = METHOD_CONSTRUCTOR, PubkeyAddress = 2, - AuthenticateMessage = 3, + // Deprecated in v10 + // AuthenticateMessage = 3, AuthenticateMessageExported = frc42_dispatch::method_hash!("AuthenticateMessage"), UniversalReceiverHook = frc42_dispatch::method_hash!("Receive"), } @@ -121,7 +122,7 @@ impl ActorCode for Actor { let addr = Self::pubkey_address(rt)?; Ok(RawBytes::serialize(addr)?) } - Some(Method::AuthenticateMessage) | Some(Method::AuthenticateMessageExported) => { + Some(Method::AuthenticateMessageExported) => { Self::authenticate_message(rt, cbor::deserialize_params(params)?)?; Ok(RawBytes::default()) } diff --git a/actors/account/tests/account_actor_test.rs b/actors/account/tests/account_actor_test.rs index de2792177..c1a631314 100644 --- a/actors/account/tests/account_actor_test.rs +++ b/actors/account/tests/account_actor_test.rs @@ -122,14 +122,6 @@ fn authenticate_message() { ); rt.verify(); - // Invalid caller of internal method number - rt.set_caller(make_identity_cid(b"1234"), Address::new_id(1000)); - expect_abort_contains_message( - ExitCode::USR_FORBIDDEN, - "must be built-in", - rt.call::(Method::AuthenticateMessage as MethodNum, ¶ms), - ); - // Ok to call exported method number rt.expect_validate_caller_any(); rt.expect_verify_signature(ExpectedVerifySig {