DeFiCh / metachain

DFIP 2111-B: VOC: Ethereum Virtual Machine (EVM) Support
https://docs.defimetachain.org
MIT License
22 stars 4 forks source link

NativeChain optionally require MetaChain Execution Layer? #97

Open fuxingloh opened 2 years ago

fuxingloh commented 2 years ago

What would you like to be added:

While the current proposed specification (earmark for documentation in #8) requires MetaChain to run alongside NativeChain 100% of the time. This issue proposes the possibility of running NativeChain without connectivity to MetaChain for sustaining existing node operator operations.

While for miners, it is required (or preferably required) for them to have both chains up since they need introspection to the internal state of both chains for trustless bridging. A case can be made for a miner that doesn't care about mining on MetaChain (due to the cost of maintaining both chains and ignoring EVM chain since rewards come from Native chain only) and modify their node such that they always mine an empty block/template for EVM. (Due to trustless bridging, they can implement "mindless bridging" where the modified node doesn't process trustless bridging and take the amount as it is without during state verification.)

That being said, tokenomics could easily be adjusted for "forced" participation on MetaChain. Economically incentivizing miners to run EVM nodes when a percentage of their rewards can only be claimed on the EVM side.

While for the connectivity providers (e.g. think ocean or infura) that don't care about EVM DFI and only process UTXO DFI. They "technically" don't need to be aware of the EVM state or have no concern over the "internal state" of Meta Chain.

Why is this needed:

defichain-bot commented 2 years ago

@fuxingloh: Thanks for opening an issue, it is currently awaiting triage.

The triage/accepted label can be added by foundation members by writing /triage accepted in a comment.

Details I am a bot created to help the [DeFiCh](https://github.com/DeFiCh) developers manage community feedback and contributions. You can check out my [manifest file](https://github.com/DeFiCh/metachain/blob/main/.github/governance.yml) to understand my behavior and what I can do. If you want to use this for your project, you can check out the [BirthdayResearch/oss-governance-bot](https://github.com/BirthdayResearch/oss-governance-bot) repository.
fuxingloh commented 1 year ago

Related comment from https://github.com/DeFiCh/metachain/issues/106#issuecomment-1266390720

Part of it. With DMC embedded, the "server profile" and server maintenance's operational flow must be changed if we force defid to be prepackaged. Several operators such as exchanges, individuals, and node operators would have to reconfigure their setup to fit the runtime requirements running defid. It's not simply a plug-and-play since these must be pre-communicated, tested, and operationalized.

prasannavl commented 1 year ago

The fundamental way to think of this, is that EVM is just a part of defichain consensus (whether it's a separate chain or not is an internal detail of DeFiChain consensus). There is no reason for operators to think of them as 2 separate chains. The data will be all inclusively managed by defid.

This requirement will unnecessarily complicate things further to allow things to be run separately, exposing implementation details into the user world, since now there needs to logic to ignore EVM consensus, which now creates a partial validation case, which defeats the purpose of validation in the first place. There shouldn't be any need or separation externally when everything is just a part of the defid.

prasannavl commented 1 year ago

In summary:

prasannavl commented 1 year ago

Adding more details:

It won't force immediate deprecation/upgrade on node operators as there are increased complexity and changes to operation when running 2 nodes.

Allow non miners to run Native Chain without Meta Chain.

While for the connectivity providers (e.g. think ocean or infura) that don't care about EVM DFI and only process UTXO DFI. They "technically" don't need to be aware of the EVM state or have no concern over the "internal state" of Meta Chain.

To deal with infrastructural components, data pruning and manual arguments for the RPC port of the Ethereum JSON RPC that can potentially be managed separately, can be used to separate it in Ocean environments as advanced cases. Miners or not otherwise should not have different validation paths.

Native UTXO doesn't care about EVM state, but just the final output today. But when there's are cross native calls that's exposed as op-codes in EVM, there needs to be two-way trust, always.

fuxingloh commented 1 year ago

@prasannavl generally, I agree with your concerns. The insights are great.

The only doubt/question I have is the operational workflow of running the new "defid" and communicating that with our partners is quite a challenge. The end-goal north-star would be scraping this issue, but till we have a sound resolution to address the operational workflow. I don't have a good answer for it yet.

@wafflespeanut, what's your take?

Related comment from #106 (comment)

Part of it. With DMC embedded, the "server profile" and server maintenance's operational flow must be changed if we force defid to be prepackaged. Several operators such as exchanges, individuals, and node operators would have to reconfigure their setup to fit the runtime requirements running defid. It's not simply a plug-and-play since these must be pre-communicated, tested, and operationalized.

wafflespeanut commented 1 year ago

The only doubt/question I have is the operational workflow of running the new "defid" and communicating that with our partners is quite a challenge. The end-goal north-star would be scraping this issue, but till we have a sound resolution to address the operational workflow. I don't have a good answer for it yet.

As far as I can see, the only change from an external perspective will be a bigger size for defid executable. Unless we concretely know that running both of them in parallel is gonna hurt the performance of either, I'd say we can go ahead with our current plan of prepackaging. If it causes problems when we try it out, then we always have the RPC work to fallback.

fuxingloh commented 1 year ago

The only doubt/question I have is the operational workflow of running the new "defid" and communicating that with our partners is quite a challenge. The end-goal north-star would be scraping this issue, but till we have a sound resolution to address the operational workflow. I don't have a good answer for it yet.

As far as I can see, the only change from an external perspective will be a bigger size for defid executable. Unless we concretely know that running both of them in parallel is gonna hurt the performance of either, I'd say we can go ahead with our current plan of prepackaging. If it causes problems when we try it out, then we always have the RPC work to fallback.

Yup, sounds good. I was doing back of the mind calculation the other day; it's insignificant and doesn't warrant a change of operations, with at most an increase of 1-2GB RAM and 1 CPU at most. Storage increase will growth will be slow and linear and won't result in drastic operational changes either.

fuxingloh commented 1 year ago

Will keep this open for now since this thread wasn't triage/accepted to be worked on either, acting more as an RFC.