File tree 7 files changed +0
-63
lines changed
7 files changed +0
-63
lines changed Original file line number Diff line number Diff line change @@ -520,17 +520,6 @@ where
520
520
} ) )
521
521
}
522
522
523
- /// Verify seal proof for sectors. This proof verifies that a sector was sealed by the miner.
524
- fn verify_seal ( & self , vi : & SealVerifyInfo ) -> Result < bool > {
525
- let t = self
526
- . call_manager
527
- . charge_gas ( self . call_manager . price_list ( ) . on_verify_seal ( vi) ) ?;
528
-
529
- // It's probably _fine_ to just let these turn into fatal errors, but seal verification is
530
- // pretty self contained, so catching panics here probably doesn't hurt.
531
- t. record ( catch_and_log_panic ( "verifying seal" , || verify_seal ( vi) ) )
532
- }
533
-
534
523
fn verify_post ( & self , verify_info : & WindowPoStVerifyInfo ) -> Result < bool > {
535
524
let t = self
536
525
. call_manager
Original file line number Diff line number Diff line change @@ -285,9 +285,6 @@ pub trait CryptoOps {
285
285
pieces : & [ PieceInfo ] ,
286
286
) -> Result < Cid > ;
287
287
288
- /// Verifies a sector seal proof.
289
- fn verify_seal ( & self , vi : & SealVerifyInfo ) -> Result < bool > ;
290
-
291
288
/// Verifies a window proof of spacetime.
292
289
fn verify_post ( & self , verify_info : & WindowPoStVerifyInfo ) -> Result < bool > ;
293
290
Original file line number Diff line number Diff line change @@ -124,25 +124,6 @@ pub fn compute_unsealed_sector_cid(
124
124
context. memory . write_cid ( & cid, cid_off, cid_len)
125
125
}
126
126
127
- /// Verifies a sector seal proof.
128
- ///
129
- /// The return i32 indicates the status code of the verification:
130
- /// - 0: verification ok.
131
- /// - -1: verification failed.
132
- pub fn verify_seal (
133
- context : Context < ' _ , impl Kernel > ,
134
- info_off : u32 , // SealVerifyInfo
135
- info_len : u32 ,
136
- ) -> Result < i32 > {
137
- let info = context
138
- . memory
139
- . read_cbor :: < SealVerifyInfo > ( info_off, info_len) ?;
140
- context
141
- . kernel
142
- . verify_seal ( & info)
143
- . map ( |v| if v { 0 } else { -1 } )
144
- }
145
-
146
127
/// Verifies a window proof of spacetime.
147
128
///
148
129
/// The return i32 indicates the status code of the verification:
Original file line number Diff line number Diff line change @@ -292,7 +292,6 @@ pub fn bind_syscalls(
292
292
crypto:: recover_secp_public_key,
293
293
) ?;
294
294
linker. bind ( "crypto" , "hash" , crypto:: hash) ?;
295
- linker. bind ( "crypto" , "verify_seal" , crypto:: verify_seal) ?;
296
295
linker. bind ( "crypto" , "verify_post" , crypto:: verify_post) ?;
297
296
linker. bind (
298
297
"crypto" ,
Original file line number Diff line number Diff line change @@ -132,12 +132,6 @@ pub fn compute_unsealed_sector_cid(
132
132
}
133
133
}
134
134
135
- /// Verifies a sector seal proof.
136
- pub fn verify_seal ( info : & SealVerifyInfo ) -> SyscallResult < bool > {
137
- let info = to_vec ( info) . expect ( "failed to marshal seal verification input" ) ;
138
- unsafe { sys:: crypto:: verify_seal ( info. as_ptr ( ) , info. len ( ) as u32 ) . map ( status_code_to_bool) }
139
- }
140
-
141
135
/// Verifies a window proof of spacetime.
142
136
pub fn verify_post ( info : & WindowPoStVerifyInfo ) -> SyscallResult < bool > {
143
137
let info = to_vec ( info) . expect ( "failed to marshal PoSt verification input" ) ;
Original file line number Diff line number Diff line change @@ -111,22 +111,6 @@ super::fvm_syscalls! {
111
111
cid_len: u32 ,
112
112
) -> Result <u32 >;
113
113
114
- /// Verifies a sector seal proof.
115
- ///
116
- /// Returns 0 to indicate that the proof was valid, -1 otherwise.
117
- ///
118
- /// # Arguments
119
- ///
120
- /// `info_off` and `info_len` specify the location and length of a cbor-encoded
121
- /// [`SealVerifyInfo`][fvm_shared::sector::SealVerifyInfo] in tuple representation.
122
- ///
123
- /// # Errors
124
- ///
125
- /// | Error | Reason |
126
- /// |---------------------|--------------------------|
127
- /// | [`IllegalArgument`] | an argument is malformed |
128
- pub fn verify_seal( info_off: * const u8 , info_len: u32 ) -> Result <i32 >;
129
-
130
114
/// Verifies a window proof of spacetime.
131
115
///
132
116
/// Returns 0 to indicate that the proof was valid, -1 otherwise.
Original file line number Diff line number Diff line change @@ -385,13 +385,6 @@ where
385
385
Ok ( vec ! [ true ; vis. len( ) ] )
386
386
}
387
387
388
- // NOT forwarded
389
- fn verify_seal ( & self , vi : & SealVerifyInfo ) -> Result < bool > {
390
- let charge = self . 1 . price_list . on_verify_seal ( vi) ;
391
- let _ = self . 0 . charge_gas ( & charge. name , charge. total ( ) ) ?;
392
- Ok ( true )
393
- }
394
-
395
388
// NOT forwarded
396
389
fn verify_post ( & self , vi : & WindowPoStVerifyInfo ) -> Result < bool > {
397
390
let charge = self . 1 . price_list . on_verify_post ( vi) ;
You can’t perform that action at this time.
0 commit comments