subnet-evm icon indicating copy to clipboard operation
subnet-evm copied to clipboard

feat: Add possibility to separate databases for subnets

Open hitchhooker opened this issue 1 year ago • 3 comments

Is there way to separate P X C with subnet evm somehow? Even having own folder for subnet-evm:s database files would do a great deal.

hitchhooker avatar Oct 09 '23 23:10 hitchhooker

Could you expand on exactly what you mean by separating it?

It would be pretty easy to move the data to its own database it would just require a migration process. Specifically, current instances of Subnet-EVM put their data in the existing AvalancheGo database, so we’d need to remain backwards compatible with that. This would be a great feature request or PR if you’re interested to put one up.

aaronbuchwald avatar Oct 09 '23 23:10 aaronbuchwald

We run quite a few nodes for RPC(full&archive) avalanche & subnets. I feel it would be ideal to be able to run subnet-evm:s not just as plugins but as standalone clients with flag pointing to avalanche endpoint(--platformchain ws://localhost:9650). A bit in similar fashion as ethereum consensus clients or rollups are able to use any ethereum endpoint or polkadot parachains are capable of using any polkadot endpoint instead of needing to run every single time full relaychain node for subnets/rollups.

It is just quite painful place to be when one of the chains/db gets bricked leading loss of all advancement if not proper incremental snapshots in place. I think we had this issue happening on swimmer and dfk this far leading to resync from scratch for ALL chains.

hitchhooker avatar Oct 10 '23 02:10 hitchhooker

There is a flag for partially syncing: only P-chain + subnets you track. See: https://docs.avax.network/nodes/configure/avalanchego-config-flags#partial-sync-primary-network

ceyonur avatar Oct 10 '23 13:10 ceyonur