js-ceramic icon indicating copy to clipboard operation
js-ceramic copied to clipboard

feat(core): Allow setting network to mainnet

Open stbrody opened this issue 2 years ago • 3 comments

We can already run on mainnet, you just need to set the network to "elp" instead of "mainnet". This is a confusing requirement. This PR let's mainnet mean mainnet, and removes the need to use "elp". It also has logic to preserve backwards compatibly for nodes that previously were running with "elp" and then switch to "mainnet", to ensure that their state store data isn't lost.

builds on https://github.com/ceramicnetwork/js-ceramic/pull/2490

stbrody avatar Oct 11 '22 20:10 stbrody

CDB-1837 Allow --network=mainnet

Forcing node operators to set --network=elpis confusing, especially now that the Early Launch Program is effectively over. We should just let nodes run with --network=mainnet.

We have a problem though, with CDB-1575. Nodes that are already on mainnet with --network=elp have their state store data written into an elp directory. We need to be careful that they don't lose data if they switch to using --network=mainnet. Ideally we should detect the presence of an elp directory at startup and rename it to mainnet (assuming S3 allows atomic directory renames, I'm not sure if it does or not). For now though, the simplest thing we could do is to always use elp as the directory for the state store, even when using --network=mainnet. It's a bit ugly, but will make this ticket trivial to implement and improve the UX of running a node. In the future we can try to add a migration process to change the directory that the state store data is stored in.

linear[bot] avatar Oct 11 '22 20:10 linear[bot]

Do we have a follow up ticket to update our docs?

oed avatar Oct 12 '22 11:10 oed

Is there an ETA for when this code can be removed, because there is no ELP anymore?

ukstv avatar Oct 14 '22 09:10 ukstv

Do we have a follow up ticket to update our docs?

Filed https://linear.app/3boxlabs/issue/CDB-1947/update-docs-around-running-with-network=mainnet. I'm not even sure how much the --network=elp thing was documented to begin with, but I'll make sure to do a quick pass over our docs to double check

stbrody avatar Oct 18 '22 17:10 stbrody

⚠️ No Changeset found

Latest commit: 05016cbaeb87d5b2ad4da1d3d5b80c0ffca8ab64

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Oct 19 '22 16:10 changeset-bot[bot]