-
Notifications
You must be signed in to change notification settings - Fork 828
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 endpoints for excluding tracing failures #1995
Conversation
return &SeiBlockAPI{ | ||
BlockAPI: blockAPI, | ||
isPanicTx: isPanicTx, | ||
} |
Check warning
Code scanning / CodeQL
Calling the system time Warning
func NewDebugAPI(tmClient rpcclient.Client, k *keeper.Keeper, ctxProvider func(int64) sdk.Context, txDecoder sdk.TxDecoder, config *SimulateConfig, connectionType ConnectionType) *DebugAPI { | ||
backend := NewBackend(ctxProvider, k, txDecoder, tmClient, config) | ||
tracersAPI := tracers.NewAPI(backend) | ||
return &DebugAPI{tracersAPI: tracersAPI, tmClient: tmClient, keeper: k, ctxProvider: ctxProvider, txDecoder: txDecoder, connectionType: connectionType} | ||
} | ||
|
||
func NewSeiDebugAPI( | ||
tmClient rpcclient.Client, |
Check warning
Code scanning / CodeQL
Calling the system time Warning
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1995 +/- ##
==========================================
- Coverage 61.64% 61.51% -0.13%
==========================================
Files 365 263 -102
Lines 26178 24480 -1698
==========================================
- Hits 16138 15060 -1078
+ Misses 8967 8298 -669
- Partials 1073 1122 +49
|
@@ -36,6 +73,59 @@ | |||
return | |||
} | |||
|
|||
func (api *SeiDebugAPI) TraceBlockByNumberExcludeTraceFail(ctx context.Context, number rpc.BlockNumber, config *tracers.TraceConfig) (result interface{}, returnErr error) { | |||
startTime := time.Now() |
Check warning
Code scanning / CodeQL
Calling the system time Warning
* 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
Describe your changes and provide context
A panic tx is a tx which fails tracing. This can be due to several issues such as nonce errors, insufficient funds, etc. Adding 3 new endpoints for excluding panic txs.
sei_traceBlockByNumberExcludeTraceFail
sei_getBlockByNumberExcludeTraceFail
+sei_getBlockByHashExcludeTraceFail
sei_getTransactionByReceiptExcludeTraceFail
Relies on sei-protocol/go-ethereum#40
Testing performed to validate your change
added unit tests in rpc layer + test on RPC node