-
Notifications
You must be signed in to change notification settings - Fork 203
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomerskatanaThis issue is related to KatanaThis issue is related to Katana
Description
dojo/crates/katana/rpc/rpc/src/starknet/mod.rs
Lines 494 to 513 in 8a9dc0c
fn events( | |
&self, | |
from_block: BlockIdOrTag, | |
to_block: BlockIdOrTag, | |
address: Option<ContractAddress>, | |
keys: Option<Vec<Vec<Felt>>>, | |
continuation_token: Option<String>, | |
chunk_size: u64, | |
) -> StarknetApiResult<EventsPage> { | |
let provider = self.inner.backend.blockchain.provider(); | |
let from = if BlockIdOrTag::Tag(BlockTag::Pending) == from_block { | |
EventBlockId::Pending | |
} else { | |
let num = provider.convert_block_id(from_block)?; | |
EventBlockId::Num(num.ok_or(StarknetApiError::BlockNotFound)?) | |
}; | |
let to = if BlockIdOrTag::Tag(BlockTag::Pending) == to_block { | |
EventBlockId::Pending |
we should limit the chunk size to avoid getting dos by giving an insanely large value. the limit should be configurable through the cli
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomerskatanaThis issue is related to KatanaThis issue is related to Katana