-
Notifications
You must be signed in to change notification settings - Fork 818
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RPC endpoints for excluding tracing failures (#1995)
* add sei_getTransactionReceipt * add logic to exclude panic txs from getBlockByNumber * fixed compilation errs * test both sei_traceBlock and sei_getTransactionReceipt * fix block_test * update go.mod * fixed tracer test * tests seem to all work now * fix genesis code * remove unnecessary isPanicTx param * remove prints * fix complilation * use a trace block + cache to do isPanic * catch panic in traceTx * fix * add README + change name to *TraceFail * update geth dep * update geth dep
- Loading branch information
Showing
13 changed files
with
418 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Sei's EVM RPC | ||
|
||
Sei supports the standard [Ethereum JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/) endpoints. On top of that, Sei supports some additional custom endpoints. | ||
|
||
## Sei_ endpoints | ||
|
||
### Endpoints for Synthetic txs | ||
The motivation for these endpoints is to expose CW20 and CW721 events on the EVM side through synthetic receipts and logs. This is useful for indexing pointer contracts. | ||
- `sei_getFilterLogs` | ||
- same as `eth_getFilterLogs` but includes synthetic logs | ||
- `sei_getLogs` | ||
- same as `eth_getLogs` but includes synthetic logs | ||
- `sei_getBlockByNumber` and `sei_getBlockByHash` | ||
- same as `eth_getBlockByNumber` and `eth_getBlockByHash` but includes synthetic txs | ||
- NOTE: for synthetic txs, `eth_getTransactionReceipt` can be used to get the receipt data for a synthetic tx hash. | ||
|
||
### Endpoints for excluding tracing failures | ||
The motivation for these endpoints is to exclude tracing failures from the EVM side. Due to how our mempool works and our lack of tx simulation, we cannot rely on txs to pass all pre-state checks. Therefore, in the eth_ endpoints, we may see txs that fail tracing with errors like "nonce too low", "nonce too high", "insufficient funds", or other types of panic failures. These transactions are not executed, yet are still included in the block. These endpoints are useful for filtering out these txs. | ||
- `sei_traceBlockByNumberExcludeTraceFail` | ||
- same as `debug_traceBlockByNumber` but excludes panic txs | ||
- `sei_getTransactionReceiptExcludeTraceFail` | ||
- same as `eth_getTransactionReceipt` but excludes panic txs | ||
- `sei_getBlockByNumberExcludeTraceFail` and `sei_getBlockByHashExcludeTraceFail` | ||
- same as `eth_getBlockByNumber` and `eth_getBlockByHash` but excludes panic txs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.