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

feat: sanity check for eth_getLogs max number of blocks #148

Merged
merged 6 commits into from
Jan 26, 2024

Conversation

rvanasa
Copy link
Collaborator

@rvanasa rvanasa commented Jan 25, 2024

Limits the maximum number of blocks returned from eth_getLogs to 500 when specifying both the start and end block numbers.

src/validate.rs Outdated
Err(ValidationError::CredentialPathNotAllowed(
credential_path.to_string(),
))
Err(ValidationError::CredentialPathNotAllowed)
Copy link
Collaborator Author

@rvanasa rvanasa Jan 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is more relevant to #147, but I'm changing this here to reduce the number of inevitable merge conflicts.

@rvanasa rvanasa marked this pull request as ready for review January 25, 2024 21:38
@rvanasa rvanasa merged commit b22fbc0 into main Jan 26, 2024
3 checks passed
@rvanasa rvanasa deleted the eth-getlogs-sanity-check branch January 26, 2024 19:34
gitlab-dfinity pushed a commit to dfinity/ic that referenced this pull request Jan 29, 2024
…ister'

feat(evmrpc): set up `evm-rpc-canister` branch

Prerequisite changes for [#146](dfinity/evm-rpc-canister#146), [#147](dfinity/evm-rpc-canister#147), and [#148](dfinity/evm-rpc-canister#148) in the [EVM RPC canister](https://github.com/internet-computer-protocol/ic-eth-rpc) repository. Merges into the `evm-rpc-canister` branch.

* Adds an `RpcConfig` struct with optional `response_size_estimate` field.
* Changes the default response size estimate for `eth_getLogs` from 100 to 1024.
* Refactors the ckETH max header size so that it is not added to the custom response size.
* Updates CI based on the requirements for the `evm-rpc-canister` branch. 
* Removes the `Debug` trait from `RpcApi` (which may contain API keys).
* Adjusts `ValidationError` enum variants.

Note that these changes will not be merged into `master` at any point and are only used for the EVM RPC canister. 

See merge request dfinity-lab/public/ic!17319
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants