Skip to content

Commit

Permalink
handle fea2scalar error (0xPolygonHermez#1942)
Browse files Browse the repository at this point in the history
* handle fea2scalar error

* handle fea2scalar error
  • Loading branch information
ToniRamirezM authored Mar 28, 2023
1 parent b0a6ba5 commit ee5220d
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 29 deletions.
2 changes: 2 additions & 0 deletions proto/src/proto/executor/v1/executor.proto
Original file line number Diff line number Diff line change
Expand Up @@ -292,4 +292,6 @@ enum ExecutorError {
EXECUTOR_ERROR_UNSUPPORTED_FORK_ID = 8;
// EXECUTOR_ERROR_BALANCE_MISMATCH indicates that there is a balance mismatch error in the ROM
EXECUTOR_ERROR_BALANCE_MISMATCH = 9;
// EXECUTOR_ERROR_FEA2SCALAR indicates that there is a fea2scalar error in the execution
EXECUTOR_ERROR_FEA2SCALAR = 10;
}
54 changes: 30 additions & 24 deletions state/runtime/executor/pb/executor.pb.go

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

14 changes: 9 additions & 5 deletions state/runtime/executor/pb/executor_grpc.pb.go

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

2 changes: 2 additions & 0 deletions state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,8 @@ func (s *State) internalProcessUnsignedTransaction(ctx context.Context, tx *type
// Send Batch to the Executor
processBatchResponse, err := s.executorClient.ProcessBatch(ctx, processBatchRequest)
if err != nil {
// Log this error as an executor unspecified error
s.LogExecutorError(pb.ExecutorError_EXECUTOR_ERROR_UNSPECIFIED, processBatchRequest)
log.Errorf("error processing unsigned transaction ", err)
return nil, err
} else if processBatchResponse.Error != executor.EXECUTOR_ERROR_NO_ERROR {
Expand Down

0 comments on commit ee5220d

Please sign in to comment.