Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
fix ErrDepth check (#1623)
Browse files Browse the repository at this point in the history
### 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_]

<hr>

## 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
  • Loading branch information
lispc committed Sep 25, 2023
1 parent 69d0a63 commit b573265
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bus-mapping/src/circuit_input_builder/input_state_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit b573265

Please sign in to comment.