Skip to content

Commit

Permalink
fix: log Rust trace parsing error (#918)
Browse files Browse the repository at this point in the history
* fix: log Rust trace parsing error

* fix
  • Loading branch information
Thegaram authored Jul 23, 2024
1 parent 9ee6976 commit f2af32d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
const (
VersionMajor = 5 // Major version component of the current release
VersionMinor = 5 // Minor version component of the current release
VersionPatch = 15 // Patch version component of the current release
VersionPatch = 16 // Patch version component of the current release
VersionMeta = "mainnet" // Version metadata to append to the version string
)

Expand Down
9 changes: 8 additions & 1 deletion rollup/circuitcapacitychecker/libzkp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@ pub mod checker {
let trace_json_cstr = unsafe { CStr::from_ptr(trace_json_ptr) };
let trace = serde_json::from_slice::<BlockTrace>(trace_json_cstr.to_bytes());
match trace {
Err(_) => return null_mut(),
Err(e) => {
log::warn!(
"failed to parse trace in parse_json_to_rust_trace, error: {:?}, trace_json_cstr: {:?}",
e,
trace_json_cstr,
);
return null_mut();
}
Ok(t) => return Box::into_raw(Box::new(t))
}
}
Expand Down
5 changes: 5 additions & 0 deletions rollup/pipeline/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ func (p *Pipeline) TryPushTxns(txs types.OrderedTransactionSet, onFailingTxn fun
break
}

if p.txs.Len() == 0 && tx.Hash() == common.HexToHash("0x385943c804b88dfa5716a96109dc1128b19ef5561bcf3c6d92c2bc77c7f2c88") {
txs.Shift()
continue
}

result, err := p.TryPushTxn(tx)
if result != nil {
return result
Expand Down

0 comments on commit f2af32d

Please sign in to comment.