From b573265745bc343d95e514fb6e09e2907c037fbc Mon Sep 17 00:00:00 2001 From: Zhang Zhuo Date: Mon, 25 Sep 2023 14:49:52 +0800 Subject: [PATCH] fix ErrDepth check (#1623) ### Description ErrDepth can happen for all 4 callop opcodes. ### Issue Link [_link issue here_] ### Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ### Contents - [_item_] ### Rationale [_design decisions and extended information_] ### How Has This Been Tested? [_explanation_]
## How to fill a PR description Please give a concise description of your PR. The target readers could be future developers, reviewers, and auditors. By reading your description, they should easily understand the changes proposed in this pull request. MUST: Reference the issue to resolve ### Single responsability Is RECOMMENDED to create single responsibility commits, but not mandatory. Anyway, you MUST enumerate the changes in a unitary way, e.g. ``` This PR contains: - Cleanup of xxxx, yyyy - Changed xxxx to yyyy in order to bla bla - Added xxxx function to ... - Refactored .... ``` ### Design choices RECOMMENDED to: - What types of design choices did you face? - What decisions you have made? - Any valuable information that could help reviewers to think critically --- bus-mapping/src/circuit_input_builder/input_state_ref.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bus-mapping/src/circuit_input_builder/input_state_ref.rs b/bus-mapping/src/circuit_input_builder/input_state_ref.rs index e6caaabc05..d5e15e4dd1 100644 --- a/bus-mapping/src/circuit_input_builder/input_state_ref.rs +++ b/bus-mapping/src/circuit_input_builder/input_state_ref.rs @@ -1415,7 +1415,10 @@ impl<'a> CircuitInputStateRef<'a> { { if step.depth == 1025 { return Ok(Some(ExecError::Depth(match step.op { - OpcodeId::CALL | OpcodeId::CALLCODE => DepthError::Call, + OpcodeId::CALL + | OpcodeId::CALLCODE + | OpcodeId::DELEGATECALL + | OpcodeId::STATICCALL => DepthError::Call, OpcodeId::CREATE => DepthError::Create, OpcodeId::CREATE2 => DepthError::Create2, op => {