Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Remove tx logs and block bloom from chain state #556

Merged
merged 1 commit into from
Sep 15, 2021

Conversation

yihuang
Copy link
Contributor

@yihuang yihuang commented Sep 14, 2021

Closes #452

Description

  • tx logs are stored in transient storage and emitted as events
  • block bloom is emitted as event in end block
  • RPC API query tx logs block bloom from events of tx result and block result.

For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@orijbot
Copy link

orijbot commented Sep 14, 2021

@codecov
Copy link

codecov bot commented Sep 14, 2021

Codecov Report

Merging #556 (1d4d22d) into main (3f1eeb3) will decrease coverage by 0.40%.
The diff coverage is 65.21%.

❗ Current head 1d4d22d differs from pull request most recent head 76de16a. Consider uploading reports for the commit 76de16a to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #556      +/-   ##
==========================================
- Coverage   53.78%   53.38%   -0.41%     
==========================================
  Files          64       64              
  Lines        5282     5127     -155     
==========================================
- Hits         2841     2737     -104     
+ Misses       2307     2263      -44     
+ Partials      134      127       -7     
Impacted Files Coverage Δ
x/evm/genesis.go 48.21% <ø> (+3.21%) ⬆️
x/evm/keeper/abci.go 21.42% <0.00%> (ø)
x/evm/keeper/grpc_query.go 65.28% <ø> (-3.17%) ⬇️
x/evm/types/genesis.go 85.71% <ø> (-4.61%) ⬇️
x/evm/types/key.go 0.00% <ø> (ø)
x/evm/keeper/keeper.go 74.41% <36.36%> (+7.30%) ⬆️
x/evm/keeper/msg_server.go 78.43% <100.00%> (+4.62%) ⬆️
x/evm/keeper/state_transition.go 74.30% <100.00%> (ø)
x/evm/keeper/statedb.go 86.22% <100.00%> (ø)
x/evm/types/logs.go 30.58% <0.00%> (-5.89%) ⬇️
... and 3 more

Copy link
Contributor

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

ACK. I would also add documentation on the JSON-RPC to turn on event indexing so that people don't run into the issue of not finding the bloom filter or logs.

This change is state machine braking so we also need to add an entry on the CHANGELOG

ethereum/rpc/backend/backend.go Outdated Show resolved Hide resolved
ethereum/rpc/backend/utils.go Outdated Show resolved Hide resolved
@yihuang yihuang force-pushed the remove-tx-logs branch 2 times, most recently from d56f297 to 005aad5 Compare September 14, 2021 17:39
@yihuang
Copy link
Contributor Author

yihuang commented Sep 14, 2021

ACK. I would also add documentation on the JSON-RPC to turn on event indexing so that people don't run into the issue of not finding the bloom filter or logs.

In this PR, we actually only used the /block_results and /tx?hash= tm rpc to get what we want, I think they are available even when tx indexer is not enabled?
But the tx hash conversion rely on the tx indexer, after we did the tendermint custom tx hasher thing, we can remove that dependency.

This change is state machine braking so we also need to add an entry on the CHANGELOG

changelog added.

@fedekunze
Copy link
Contributor

Thanks @yihuang feel free to fix the linter with make lint-fix

@fedekunze fedekunze enabled auto-merge (squash) September 15, 2021 08:44
Closes #452

fix unit tests

changelog and fix lint

fix unit test

Update ethereum/rpc/backend/backend.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

Update ethereum/rpc/backend/utils.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

changelog
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem: tx logs and block bloom inconsistency in export upgrade
3 participants