celo-org / celo-blockchain

Official repository for the golang Celo Blockchain
https://celo.org
GNU Lesser General Public License v3.0
552 stars 196 forks source link

Fix eth_getBlockReceipts #2295

Closed piersy closed 3 months ago

piersy commented 3 months ago

Updated the api method to take into account the celo block receipt.

There was previous confusion around whether this was working or not, as it had worked for some people but not others.

This confusion was caused because block receipts are only added when logs have been generated by system calls. Before gingerbread, we would update the gas price minimum on every block and hence create a log for the update, but post gingerbread the only updates that are happening are for epoch blocks.

Tested

Manually tested using cast

cast rpc eth_getBlockReceipts `cast to-hex 53906`

Related issues

github-actions[bot] commented 3 months ago

Coverage from tests in ./e2e_test/... for ./consensus/istanbul/... at commit d832d98cea1f1ab7187ac0169b27642bd3767bf1

coverage: 50.6% of statements across all listed packages
coverage:  63.2% of statements in consensus/istanbul
coverage:  41.8% of statements in consensus/istanbul/announce
coverage:  55.8% of statements in consensus/istanbul/backend
coverage:   0.0% of statements in consensus/istanbul/backend/backendtest
coverage:  24.3% of statements in consensus/istanbul/backend/internal/replica
coverage:  64.9% of statements in consensus/istanbul/core
coverage:  50.0% of statements in consensus/istanbul/db
coverage:   0.0% of statements in consensus/istanbul/proxy
coverage:  64.2% of statements in consensus/istanbul/uptime
coverage:  51.8% of statements in consensus/istanbul/validator
coverage:  79.2% of statements in consensus/istanbul/validator/random
github-actions[bot] commented 3 months ago
5882 passed, 45 skipped