fix according to reviews

This commit is contained in:
Ho
2025-11-11 11:44:48 +09:00
parent dbd648e2f7
commit 833a2f50a5
3 changed files with 13 additions and 9 deletions

View File

@@ -219,7 +219,6 @@ func (m *ProofReceiverLogic) HandleZkProof(ctx *gin.Context, proofParameter coor
if unmarshalErr := json.Unmarshal([]byte(proofParameter.Proof), &chunkProof); unmarshalErr != nil {
return unmarshalErr
}
log.Info("parse chunkproof", "key", chunkProof.MetaData.ChunkInfo.EncryptionKey)
success, verifyErr = m.verifier.VerifyChunkProof(chunkProof, hardForkName)
if stat := chunkProof.VmProof.Stat; stat != nil {
if g, _ := m.proverSpeed.GetMetricWithLabelValues("chunk", "exec"); g != nil && stat.ExecutionTimeMills > 0 {

View File

@@ -18,13 +18,12 @@ type DABatch interface {
}
type daBatchValidiumV1 struct {
Version CodecVersion `json:"version"`
BatchIndex uint64 `json:"batch_index"`
BlobVersionedHash common.Hash `json:"blob_versioned_hash"`
ParentBatchHash common.Hash `json:"parent_batch_hash"`
PostStateRoot common.Hash `json:"post_state_root"`
WithDrawRoot common.Hash `json:"withdraw_root"`
Commitment common.Hash `json:"commitment"`
Version CodecVersion `json:"version"`
BatchIndex uint64 `json:"batch_index"`
ParentBatchHash common.Hash `json:"parent_batch_hash"`
PostStateRoot common.Hash `json:"post_state_root"`
WithDrawRoot common.Hash `json:"withdraw_root"`
Commitment common.Hash `json:"commitment"`
}
type daBatchValidium struct {

View File

@@ -159,7 +159,13 @@ pub unsafe extern "C" fn gen_universal_task(
let pre_task_str = c_char_to_str(task);
let cli = l2geth::get_client();
let decryption_key = if decryption_key_len > 0 {
assert_eq!(decryption_key_len, 32, "len(decryption_key) != 32");
if decryption_key_len != 32 {
tracing::error!(
"gen_universal_task received {}-byte decryption key; expected 32",
decryption_key_len
);
return failed_handling_result();
}
Some(std::slice::from_raw_parts(
decryption_key,
decryption_key_len,