@@ -10,7 +10,7 @@ pub mod pallet {
1010 use frame_support:: {
1111 dispatch:: { GetDispatchInfo , PostDispatchInfo } ,
1212 pallet_prelude:: * ,
13- traits:: { ConstU32 , Currency } ,
13+ traits:: ConstU32 ,
1414 weights:: Weight ,
1515 } ;
1616 use frame_system:: pallet_prelude:: * ;
@@ -60,14 +60,13 @@ pub mod pallet {
6060 // ----------------- Types -----------------
6161
6262 /// AEAD‑independent commitment over the revealed payload.
63- #[ freeze_struct( "6c00690caddfeb78 " ) ]
63+ #[ freeze_struct( "b307ebc1f8eae75 " ) ]
6464 #[ derive( Encode , Decode , Clone , PartialEq , Eq , RuntimeDebug , TypeInfo , MaxEncodedLen ) ]
6565 pub struct Submission < AccountId , BlockNumber , Moment , Hash > {
6666 pub author : AccountId ,
6767 pub key_epoch : u64 ,
6868 pub commitment : Hash ,
6969 pub ciphertext : BoundedVec < u8 , ConstU32 < 8192 > > ,
70- pub payload_version : u16 ,
7170 pub submitted_in : BlockNumber ,
7271 pub submitted_at : Moment ,
7372 pub max_weight : Weight ,
@@ -96,17 +95,6 @@ pub mod pallet {
9695 > + GetDispatchInfo ;
9796
9897 type AuthorityOrigin : AuthorityOriginExt < Self :: RuntimeOrigin , AccountId = AccountId32 > ;
99-
100- #[ pallet:: constant]
101- type SlotMs : Get < u64 > ;
102- #[ pallet:: constant]
103- type AnnounceAtMs : Get < u64 > ;
104- #[ pallet:: constant]
105- type GraceMs : Get < u64 > ;
106- #[ pallet:: constant]
107- type DecryptWindowMs : Get < u64 > ;
108-
109- type Currency : Currency < Self :: AccountId > ;
11098 }
11199
112100 #[ pallet:: pallet]
@@ -215,7 +203,7 @@ pub mod pallet {
215203 ///
216204 /// ```text
217205 /// raw_payload =
218- /// signer (32B) || nonce (u32 LE) || mortality_byte || SCALE(call)
206+ /// signer (32B) || nonce (u32 LE) || SCALE(call)
219207 /// commitment = blake2_256(raw_payload)
220208 /// ```
221209 ///
@@ -232,7 +220,6 @@ pub mod pallet {
232220 key_epoch : u64 ,
233221 commitment : T :: Hash ,
234222 ciphertext : BoundedVec < u8 , ConstU32 < 8192 > > ,
235- payload_version : u16 ,
236223 max_weight : Weight ,
237224 ) -> DispatchResult {
238225 let who = ensure_signed ( origin) ?;
@@ -248,7 +235,6 @@ pub mod pallet {
248235 key_epoch,
249236 commitment,
250237 ciphertext,
251- payload_version,
252238 submitted_in : <frame_system:: Pallet < T > >:: block_number ( ) ,
253239 submitted_at : now,
254240 max_weight,
@@ -278,7 +264,6 @@ pub mod pallet {
278264 id : T :: Hash ,
279265 signer : T :: AccountId ,
280266 nonce : T :: Nonce ,
281- mortality : sp_runtime:: generic:: Era ,
282267 call : Box < <T as Config >:: RuntimeCall > ,
283268 signature : MultiSignature ,
284269 ) -> DispatchResultWithPostInfo {
@@ -289,7 +274,7 @@ pub mod pallet {
289274 } ;
290275
291276 let payload_bytes =
292- Self :: build_raw_payload_bytes ( & signer, nonce, & mortality , call. as_ref ( ) ) ;
277+ Self :: build_raw_payload_bytes ( & signer, nonce, call. as_ref ( ) ) ;
293278
294279 // 1) Commitment check against on-chain stored commitment.
295280 let recomputed: T :: Hash = T :: Hashing :: hash ( & payload_bytes) ;
@@ -347,11 +332,10 @@ pub mod pallet {
347332 /// - signature message (after domain separation).
348333 ///
349334 /// Layout:
350- /// signer (32B) || nonce (u32 LE) || mortality_byte || SCALE(call)
335+ /// signer (32B) || nonce (u32 LE) || SCALE(call)
351336 fn build_raw_payload_bytes (
352337 signer : & T :: AccountId ,
353338 nonce : T :: Nonce ,
354- mortality : & sp_runtime:: generic:: Era ,
355339 call : & <T as Config >:: RuntimeCall ,
356340 ) -> Vec < u8 > {
357341 let mut out = Vec :: new ( ) ;
@@ -361,13 +345,6 @@ pub mod pallet {
361345 let n_u32: u32 = nonce. saturated_into ( ) ;
362346 out. extend_from_slice ( & n_u32. to_le_bytes ( ) ) ;
363347
364- // Simple 1-byte mortality code to match the off-chain layout.
365- let m_byte: u8 = match mortality {
366- sp_runtime:: generic:: Era :: Immortal => 0 ,
367- _ => 1 ,
368- } ;
369- out. push ( m_byte) ;
370-
371348 // Append SCALE-encoded call.
372349 out. extend ( call. encode ( ) ) ;
373350
0 commit comments