Skip to content

Commit

Permalink
add new executor errors (0xPolygonHermez#3077)
Browse files Browse the repository at this point in the history
* add new executor errors

* fix linter
  • Loading branch information
ToniRamirezM authored Jan 15, 2024
1 parent e3de7a7 commit 27ce15f
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 27 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ services:
zkevm-prover:
container_name: zkevm-prover
restart: unless-stopped
image: hermeznetwork/zkevm-prover:v4.0.0-RC19
image: hermeznetwork/zkevm-prover:v4.0.0-RC25
depends_on:
zkevm-state-db:
condition: service_healthy
Expand Down
4 changes: 4 additions & 0 deletions proto/src/proto/executor/v1/executor.proto
Original file line number Diff line number Diff line change
Expand Up @@ -850,4 +850,8 @@ enum ExecutorError {
EXECUTOR_ERROR_HASHDB_GRPC_ERROR = 109;
// EXECUTOR_ERROR_STATE_MANAGER indicates an error in the State Manager
EXECUTOR_ERROR_STATE_MANAGER = 110;
// EXECUTOR_ERROR_INVALID_L1_INFO_TREE_INDEX indicates that the ROM asked for an L1InfoTree index that was not present in the input
EXECUTOR_ERROR_INVALID_L1_INFO_TREE_INDEX = 111;
// EXECUTOR_ERROR_INVALID_L1_INFO_TREE_SMT_PROOF_VALUE indicates that the ROM asked for an L1InfoTree SMT proof that was not present in the input
EXECUTOR_ERROR_INVALID_L1_INFO_TREE_SMT_PROOF_VALUE = 112;
}
9 changes: 9 additions & 0 deletions state/runtime/executor/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,10 @@ func ExecutorErr(errorCode ExecutorError) error {
return runtime.ErrExecutorErrorHashDBGRPCError
case ExecutorError_EXECUTOR_ERROR_STATE_MANAGER:
return runtime.ErrExecutorErrorStateManager
case ExecutorError_EXECUTOR_ERROR_INVALID_L1_INFO_TREE_INDEX:
return runtime.ErrExecutorErrorInvalidL1InfoTreeIndex
case ExecutorError_EXECUTOR_ERROR_INVALID_L1_INFO_TREE_SMT_PROOF_VALUE:
return runtime.ErrExecutorErrorInvalidL1InfoTreeSmtProofValue
}
return ErrExecutorUnknown
}
Expand Down Expand Up @@ -666,6 +670,11 @@ func ExecutorErrorCode(err error) ExecutorError {
return ExecutorError_EXECUTOR_ERROR_HASHDB_GRPC_ERROR
case runtime.ErrExecutorErrorStateManager:
return ExecutorError_EXECUTOR_ERROR_STATE_MANAGER
case runtime.ErrExecutorErrorInvalidL1InfoTreeIndex:
return ExecutorError_EXECUTOR_ERROR_INVALID_L1_INFO_TREE_INDEX
case runtime.ErrExecutorErrorInvalidL1InfoTreeSmtProofValue:
return ExecutorError_EXECUTOR_ERROR_INVALID_L1_INFO_TREE_SMT_PROOF_VALUE
}

return ErrCodeExecutorUnknown
}
62 changes: 38 additions & 24 deletions state/runtime/executor/executor.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions state/runtime/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@ var (
ErrExecutorErrorHashDBGRPCError = errors.New("HashDB GRPC error")
// ErrExecutorErrorStateManager indicates an error in the State Manager
ErrExecutorErrorStateManager = errors.New("state Manager error")
// ErrExecutorErrorInvalidL1InfoTreeIndex indicates that the ROM asked for an L1InfoTree index that was not present in the input
ErrExecutorErrorInvalidL1InfoTreeIndex = errors.New("invalid l1_info_tree_index")
// ErrExecutorErrorInvalidL1InfoTreeSmtProofValue indicates that the ROM asked for an L1InfoTree SMT proof that was not present in the input
ErrExecutorErrorInvalidL1InfoTreeSmtProofValue = errors.New("invalid l1_info_tree_smt_proof_value")

// GRPC ERRORS
// ===========
Expand Down
4 changes: 2 additions & 2 deletions test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ services:

zkevm-prover:
container_name: zkevm-prover
image: hermeznetwork/zkevm-prover:v4.0.0-RC24
image: hermeznetwork/zkevm-prover:v4.0.0-RC25
ports:
- 50061:50061 # MT
- 50071:50071 # Executor
Expand Down Expand Up @@ -601,7 +601,7 @@ services:

zkevm-permissionless-prover:
container_name: zkevm-permissionless-prover
image: hermeznetwork/zkevm-prover:v4.0.0-RC24
image: hermeznetwork/zkevm-prover:v4.0.0-RC25
ports:
# - 50058:50058 # Prover
- 50059:50052 # Mock prover
Expand Down

0 comments on commit 27ce15f

Please sign in to comment.