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

Lotus: splitstore and snapshots preparedness for tipset CIDs #1053

Closed
raulk opened this issue Nov 7, 2022 · 10 comments
Closed

Lotus: splitstore and snapshots preparedness for tipset CIDs #1053

raulk opened this issue Nov 7, 2022 · 10 comments
Assignees

Comments

@raulk
Copy link
Member

raulk commented Nov 7, 2022

A user has reported that the attached program run against Wallaby is unable to resolve a tipset that the node provided in the first place.

  • The tipset CID in this case was bafy2bzacecwnr6sbpqvo6hcezvkqdi5unnd4t4mwa7zqyljtxtfzacy2ojgi6.
  • The current epoch on Wallaby is 36100.
  • The user was able to successfully resolve tipsets for more recent heights, e.g. 34539.

Theory

The Wallaby JSON-RPC endpoint is running the Lotus splitstore (pending confirmation). Tipset keys are not linked to the state tree or the chain in any manner, nor to one another; therefore the splitstore discards them. That would explain why more recent heights are available, while older ones aren't.

Solution

Maybe add the ability to inform the splitstore about CIDs bound by time, not by linkage?

Repro

	ctx := context.Background()
	api2, _, err := client.NewFullNodeRPCV1(ctx, "http://18.224.22.146:1234/rpc/v1", nil)
	if err != nil {
		panic(err)
	}
	tipSet, err := api2.ChainGetTipSetByHeight(ctx, abi.ChainEpoch(6905), types.EmptyTSK)
	if err != nil {
		panic(err)
	}
	tipSetCid, err := tipSet.Key().Cid()
	if err != nil {
		panic(err)
	}
	fmt.Println(tipSetCid)
	hash, err := api.EthHashFromCid(tipSetCid)
	if err != nil {
		panic(err)
	}
	block, err := api2.EthGetBlockByHash(ctx, hash, true)
	if err != nil {
		panic(err)
	}
	fmt.Println(block)
@raulk raulk added this to the M2.1 milestone Nov 7, 2022
@raulk raulk mentioned this issue Nov 7, 2022
85 tasks
@raulk raulk added the Kind: Bug Something isn't working label Nov 7, 2022
@raulk
Copy link
Member Author

raulk commented Nov 8, 2022

Node was not running a splitstore, but this will definitely become a problem with it.

@jennijuju
Copy link
Member

oh we have an issue for this! so... so not splitstore.. but more of.. we dont think tipset CID is ever put in the block store in the first place lololol

@jennijuju jennijuju changed the title Lotus: Cannot resolve tipset CIDs -- possible splitstore issue Lotus: tipset CIDs not stored in blokstore properly Dec 17, 2022
@jennijuju jennijuju moved this to 🌟 In Scope in Network v18 Dec 17, 2022
@arajasek
Copy link
Contributor

filecoin-project/lotus#9904 for the non-splitstore part of this issue.

@raulk raulk changed the title Lotus: tipset CIDs not stored in blokstore properly Lotus: tipset CIDs not stored in blockstore properly Dec 17, 2022
@raulk raulk changed the title Lotus: tipset CIDs not stored in blockstore properly Lotus: splitstore and snapshots preparedness for tipset CIDs Jan 4, 2023
@raulk
Copy link
Member Author

raulk commented Jan 4, 2023

I've renamed this issue to align with what should be covered. I think this is best assigned to @arajasek, so will reassign.

@Stebalien
Copy link
Member

Or maybe @vyzo? @arajasek has a lot on his plate right now.

@jennijuju
Copy link
Member

jennijuju commented Jan 9, 2023

i sus the splitstore part of this issue shall be resolved by filecoin-project/lotus#9799

@arajasek
Copy link
Contributor

arajasek commented Jan 9, 2023

So there's 3 parts to this:

  • making sure we actually preserve CIDs, done in #9904
  • making sure splitstore GC these CIDs, done in #9960
  • making sure snapshots contain this information, not yet done
    • @jennijuju has a proposal that i like, which is to simply calculate and persist these CIDs on snapshot import -- she will open a lotus issue for that

@jennijuju
Copy link
Member

jennijuju commented Jan 9, 2023

she will open a lotus issue for that

filecoin-project/lotus#9977

@maciejwitowski maciejwitowski removed the P1 P1: Must be resolved label Jan 9, 2023
@arajasek arajasek assigned jennijuju and unassigned arajasek Jan 11, 2023
@arajasek
Copy link
Contributor

Handing over to Jennifer, who will close when lotus 9977 lands.

@jennijuju
Copy link
Member

filecoin-project/lotus#10042 is the last piece. will make sure lotus pr lands so closing this now

@github-project-automation github-project-automation bot moved this from 🌟 In Scope to ✅ Done in Network v18 Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

No branches or pull requests

6 participants