im using getLogs in web3 python to get around using eth.filters so i can use Infura as my provider. https://web3py.readthedocs.io/en/stable/web3.eth.html?highlight=getlogs#web3.eth.Eth.getLogs
Last week i was able to use this function with no issue but just started consistently getting this error message today {‘code’: -32005, ‘message’: ‘query returned more than 1000 results’}
When i use my local node, most of the time my getLogs returns <10 items, nowhere close to 1000 results.
Anything change recently that may be causing this issue?
example of getLogs response (“Transfer” events from WETH) when i run my own node.
[
{
'address': '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
'blockHash': HexBytes('0xe09e45baae928f281035d170f8b91e84809059fde26aee80cea72d3b485d72d2'),
'blockNumber': 7271526,
'data': '0x000000000000000000000000000000000000000000000000001115fcc7b8d900',
'logIndex': 61,
'removed': False,
'topics': [
HexBytes('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'),
HexBytes('0x00000000000000000000000041a7f96431595e4310b0b5719beba5f729b38af3'),
HexBytes('0x000000000000000000000000c95af34ba523562dc0510f3a7034c2bb37328989')
],
'transactionHash': HexBytes('0x46fb9a219911c6c63f3259461ee6b46e2cc37d41e8535780d3f115fc0765d780'),
'transactionIndex': 76,
'transactionLogIndex': '0x1',
'type': 'mined'
},
{
'address': '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
'blockHash': HexBytes('0xe09e45baae928f281035d170f8b91e84809059fde26aee80cea72d3b485d72d2'),
'blockNumber': 7271526,
'data': '0x000000000000000000000000000000000000000000000000000d98832d377c00',
'logIndex': 63,
'removed': False,
'topics': [
HexBytes('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'),
HexBytes('0x00000000000000000000000041a7f96431595e4310b0b5719beba5f729b38af3'),
HexBytes('0x00000000000000000000000049497a4d914ae91d34ce80030fe620687bf333fd')
],
'transactionHash': HexBytes('0x46fb9a219911c6c63f3259461ee6b46e2cc37d41e8535780d3f115fc0765d780'),
'transactionIndex': 76,
'transactionLogIndex': '0x3',
'type': 'mined'
},
{
'address': '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
'blockHash': HexBytes('0xe09e45baae928f281035d170f8b91e84809059fde26aee80cea72d3b485d72d2'),
'blockNumber': 7271526,
'data': '0x000000000000000000000000000000000000000000000000744bbd99d1c60000',
'logIndex': 76,
'removed': False,
'topics': [
HexBytes('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'),
HexBytes('0x00000000000000000000000039755357759ce0d7f32dc8dc45414cca409ae24e'),
HexBytes('0x000000000000000000000000c3d73a4f23373d9334fe007828026af363936f18')
],
'transactionHash': HexBytes('0xaaa1129520294dc64061342ed3818f0e11c2760da8d99c7b784cf6181a91141e'),
'transactionIndex': 86,
'transactionLogIndex': '0x0',
'type': 'mined'
}
]