js-ceramic
js-ceramic copied to clipboard
feat(core): Allow setting network to mainnet
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
CDB-1837 Allow --network=mainnet
Forcing node operators to set --network=elp
is 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.
Do we have a follow up ticket to update our docs?
Is there an ETA for when this code can be removed, because there is no ELP anymore?
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
⚠️ 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