-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: apply gateway lookback limit to eth API lookback #10467
Conversation
Gateway tests are angry
|
@@ -53,10 +53,12 @@ type EthModuleAPI interface { | |||
EthGetBlockByHash(ctx context.Context, blkHash ethtypes.EthHash, fullTxInfo bool) (ethtypes.EthBlock, error) | |||
EthGetBlockByNumber(ctx context.Context, blkNum string, fullTxInfo bool) (ethtypes.EthBlock, error) | |||
EthGetTransactionByHash(ctx context.Context, txHash *ethtypes.EthHash) (*ethtypes.EthTx, error) | |||
EthGetTransactionByHashLimited(ctx context.Context, txHash *ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTx, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Limited stuff probably shouldn't be on EthModule
EthModule / other API modules is what is replaced with a Gateway api when running in lite mode.
If we do want to provide limited APIs in lite mode, we will also need to put them on the Gateway api (I don't think it's needed for lite nodes, those most of the time will likely not be used for eth rpc stuff I imagine)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The limit
s aren't actually enforced?
This change: 1. Introduces new "limited" API endpoints for EthGetTransactionByHash and EthGetTransactionReceipt that accept lookback-limits. 2. Implements the gateway version of these API endpoints by calling the limited variants with the default message search lookback limit. fixes #10412
e921b7b
to
17274e7
Compare
Related Issues
fixes #10412
Proposed Changes
This change applies the gateway lookback limits to the eth txn and receipt lookup APIs. It:
Checklist
Before you mark the PR ready for review, please make sure that:
<PR type>: <area>: <change being made>
fix: mempool: Introduce a cache for valid signatures
PR type
: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, testarea
, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps