Skip to content

Commit

Permalink
Merge pull request #712 from onflow/feature/local-tx-reexecution
Browse files Browse the repository at this point in the history
Local state transaction re-execution
  • Loading branch information
j1010001 authored Dec 18, 2024
2 parents 3e67411 + a746c82 commit 0833fee
Show file tree
Hide file tree
Showing 33 changed files with 1,173 additions and 935 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ EMULATOR_ARGS := --flow-network-id=flow-emulator \
--log-writer=console \
--tx-state-validation=local-index \
--profiler-enabled=true \
--profiler-port=6060
--profiler-port=6060 \
--tx-state-validation=local-index

# Set VERSION from command line, environment, or default to SHORT_COMMIT
VERSION ?= ${SHORT_COMMIT}
Expand Down
68 changes: 0 additions & 68 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,74 +33,6 @@ const maxFeeHistoryBlockCount = 1024

var baseFeesPerGas = big.NewInt(1)

// A map containing all the valid method names that are found
// in the Ethereum JSON-RPC API specification.
// Update accordingly if any new methods are added/removed.
var validMethods = map[string]struct{}{
// eth namespace
"eth_blockNumber": {},
"eth_syncing": {},
"eth_sendRawTransaction": {},
"eth_getBalance": {},
"eth_getTransactionByHash": {},
"eth_getTransactionByBlockHashAndIndex": {},
"eth_getTransactionByBlockNumberAndIndex": {},
"eth_getTransactionReceipt": {},
"eth_getBlockByHash": {},
"eth_getBlockByNumber": {},
"eth_getBlockReceipts": {},
"eth_getBlockTransactionCountByHash": {},
"eth_getBlockTransactionCountByNumber": {},
"eth_call": {},
"eth_getLogs": {},
"eth_getTransactionCount": {},
"eth_estimateGas": {},
"eth_getCode": {},
"eth_feeHistory": {},
"eth_getStorageAt": {},
"eth_chainId": {},
"eth_coinbase": {},
"eth_gasPrice": {},
"eth_getUncleCountByBlockHash": {},
"eth_getUncleCountByBlockNumber": {},
"eth_getUncleByBlockHashAndIndex": {},
"eth_getUncleByBlockNumberAndIndex": {},
"eth_maxPriorityFeePerGas": {},
"eth_mining": {},
"eth_hashrate": {},
"eth_getProof": {},
"eth_createAccessList": {},

// debug namespace
"debug_traceTransaction": {},
"debug_traceBlockByNumber": {},
"debug_traceBlockByHash": {},
"debug_traceCall": {},
"debug_flowHeightByBlock": {},

// web3 namespace
"web3_clientVersion": {},
"web3_sha3": {},

// net namespace
"net_listening": {},
"net_peerCount": {},
"net_version": {},

// txpool namespace
"txpool_content": {},
"txpool_contentFrom": {},
"txpool_status": {},
"txpool_inspect": {},
}

// Returns whether the given method name is a valid method from
// the Ethereum JSON-RPC API specification.
func IsValidMethod(methodName string) bool {
_, ok := validMethods[methodName]
return ok
}

var latestBlockNumberOrHash = rpc.BlockNumberOrHashWithNumber(rpc.LatestBlockNumber)

func SupportedAPIs(
Expand Down
Loading

0 comments on commit 0833fee

Please sign in to comment.