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

handling support and claim reorgs in leveldb #3143

Closed
31 of 41 tasks
kauffj opened this issue Jan 11, 2021 · 9 comments · Fixed by #3205
Closed
31 of 41 tasks

handling support and claim reorgs in leveldb #3143

kauffj opened this issue Jan 11, 2021 · 9 comments · Fixed by #3205
Assignees

Comments

@kauffj
Copy link
Member

kauffj commented Jan 11, 2021

leveldb claimtrie
does not touch claim_search, removes usage of claims.db

  • fix blockchain.claimtrie.getclaimbyid, swap single claim searches (in tests) to use this.
  • handle abandon
  • store undo info
  • what to do about invalid signatures? no result vs return result and say signature is invalid. resolution: clients should validate signatures
  • handle same-block claims/supports
  • sync chain
  • PR the code
  • finish rebase
  • TAKEOVER/ACTIVATION HEIGHTS
  • wait till victor is done with claim_search because jack's branch drops claim search completely
  • confirm that app no longer uses trending fields from resolve and claim_search responses, since they have been dropped
  • handle takeovers from spent supports
  • feed ES claims from the block processor
  • claim search tests pass
  • test takeover due to a dropped support in a reorg
  • test invalidated channel resolution for stream claims where the channel is dropped in a reorg
  • track repost counts in ES(45min)
  • make sure these make it back https://github.com/lbryio/lbry-sdk/blob/master/tests/unit/wallet/server/test_sqldb.py
  • test channel state changes
    • invalidate prev claims for a channel when channel key changes
    • check existing invalid claims in chan to see if any have become valid
    • claim signature changes (adds sig, drops sig, signed by diff channel)
  • blocking censored content in resolve
    • updates to plugins should let them know that update happened because censoring state changed
  • write a summary of code changes in the PR to aid review
  • run on jack's local server so tom can do performance and correctness testing
    • check that as reorgs happen in the wild, this server stays correct

after PR is merged:

(later)

maybe redo this stuff inside hub instead of fetching from lbrycrd

(more later)

  • replace usage of claim_hash with truncated form
  • proofs
    • re-enable resolve proofs
    • include proofs in resolve proto response
    • non-winning proofs (by claim_id)
  • reduce boilerplate
  • wrap plyvel database (e.g. electrumx storage classes)
@lyoshenka
Copy link
Member

  • ~2.5h to sync
  • next: finish claim sync

@lyoshenka
Copy link
Member

api change: drop trending fields from resolve response. app doesnt use them

@lyoshenka
Copy link
Member

estimate: 3 days left

@lyoshenka
Copy link
Member

  • get supports done
  • run reorg tests
  • wind chain back and forward a bunch

est: 2 days left

@lyoshenka
Copy link
Member

jack says it feels 80% done

@lyoshenka
Copy link
Member

est: somewhere between "will finish today" and "unknown unknowns"

@lyoshenka
Copy link
Member

found an unknown unknown

@lyoshenka
Copy link
Member

est: tom can test against a build in the next 2 days

@lyoshenka
Copy link
Member

lyoshenka commented Jul 26, 2021

  • address tom's feedback
  • ask devs in discord to try sdk.lbry.tech
  • fix performance issues
  • run in docker
  • fix content blocking
  • expose plyvel-lru cache size as env var
  • convert claim_txo to be lru cache and expose size as setting
  • make a snapshot
  • deploy to spv16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants