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

EmptyEthHash duo to GC #11117

Closed
6 of 11 tasks
rickiey opened this issue Jul 31, 2023 · 2 comments · Fixed by #11748
Closed
6 of 11 tasks

EmptyEthHash duo to GC #11117

rickiey opened this issue Jul 31, 2023 · 2 comments · Fixed by #11748
Labels

Comments

@rickiey
Copy link

rickiey commented Jul 31, 2023

Checklist

  • This is not a security-related bug/issue. If it is, please follow please follow the security policy.
  • I have searched on the issue tracker and the lotus forum, and there is no existing related issue or discussion.
  • I am running the Latest release, the most recent RC(release canadiate) for the upcoming release or the dev branch(master), or have an issue updating to any of these.
  • I did not make any code changes to lotus.

Lotus component

  • lotus daemon - chain sync
  • lotus fvm/fevm - Lotus FVM and FEVM interactions
  • lotus miner/worker - sealing
  • lotus miner - proving(WindowPoSt/WinningPoSt)
  • lotus JSON-RPC API
  • lotus message management (mpool)
  • Other

Lotus Version

v1.23.0+

Repro Steps

I query history eth event log , I got tx_hash: '0x0000000000000000000000000000000000000000000000000000000000000000'
my lotus config.toml:

[Chainstore]
  EnableSplitstore = true
  [Chainstore.Splitstore]
    ColdStoreType = "discard"
    HotStoreType = "badger"
    MarkSetType = "map"
    HotStoreFullGCFrequency = 1
    HotStoreMaxSpaceTarget = 800000000000
    HotStoreMaxSpaceThreshold = 150000000000
    HotstoreMaxSpaceSafetyBuffer = 50000000000
[Fevm]
  EnableEthRPC = true
  EthTxHashMappingLifetimeDays = 0
  [Fevm.Events]
    MaxFilterHeightRange = 43200

Describe the Bug

I expect get valid txhash,related code at

func EthTxHashFromMessageCid(ctx context.Context, c cid.Cid, sa StateAPI) (ethtypes.EthHash, error) {

it return EmptyEthHash when cid not found in chain state(duo to GC), but it exist in sqlite database (table eth_tx_hashes),
so ,I think I can check again from the database

I tried to use ethtypes.EthHashFromCid, but it's wrong

Logging Information

debug
@Stebalien
Copy link
Member

We could but... that's going to be inconsistent. IMO, the correct solution is to trim the event database when we discard messages during splitstore compaction (see #11681 (comment)).

@Stebalien
Copy link
Member

I'm going to submit a patch that skips events where we no longer have the associated message.

Stebalien added a commit that referenced this issue Mar 19, 2024
This can happen if, e.g., we run a splitstore garbage collection.

fixes #11117
Stebalien added a commit that referenced this issue Mar 20, 2024
…11748)

This can happen if, e.g., we run a splitstore garbage collection.

fixes #11117
LexLuthr pushed a commit that referenced this issue Mar 26, 2024
…11748)

This can happen if, e.g., we run a splitstore garbage collection.

fixes #11117
ribasushi pushed a commit to ribasushi/ci-abusing-lotus-fork that referenced this issue May 11, 2024
ribasushi pushed a commit to ribasushi/ci-abusing-lotus-fork that referenced this issue May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants