Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rpc skip falsy contract #984

Merged
merged 2 commits into from
Feb 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions rpc/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package rpc

import (
"math/big"
"strings"
"time"

"github.com/Fantom-foundation/Aida/state"
Expand All @@ -10,6 +11,8 @@ import (
"github.com/ethereum/go-ethereum/common"
)

const falsyContract = "0xe0c38b2a8d09aad53f1c67734b9a95e43d5981c0"
cabrador marked this conversation as resolved.
Show resolved Hide resolved

// StateDBData represents data that StateDB returned for requests recorded on API server
// This is sent to Comparator and compared with RecordedData
type StateDBData struct {
Expand Down Expand Up @@ -47,6 +50,13 @@ func Execute(block uint64, rec *RequestAndResults, archive state.NonCommittableS
}

evm := newEvmExecutor(block, archive, cfg, rec.Query.Params[0].(map[string]interface{}), timestamp)

// calls to this contract are excluded for now,
// this contract causes issues in validation
if strings.Compare(falsyContract, strings.ToLower(evm.args.To.String())) == 0 {
rec.SkipValidation = true
}

return executeCall(evm)

case "estimateGas":
Expand Down
Loading