dymensionxyz / dymension

Dymension Hub
https://dymension.xyz
Other
366 stars 340 forks source link

fraud: Impact of fraud submission on `x/dymns` alias records #1078

Closed zale144 closed 3 weeks ago

zale144 commented 2 months ago

When a fraud submission is made on a rollapp, there needs to be a defined way to handle the existing records of aliases tied to the rollapp in question. Two possible solutions are:

  1. Move all aliases to a forked rollapp's ID:
    • Upon freezing the rollapp, immediately fork it
    • Migrate all the aliases to the forked rollapp
  2. Instead of tying aliases to the rollapp ID, tie them to the EIP155 part of the rollapp ID
    • All rollapps already comply with EIP155
    • The EIP155 stays the same across rollapp forks, so no need to do anything on fraud-submission/forking
    • There already is an index for EIP155 rollapp IDs
VictorTrustyDev commented 2 months ago

@zale144 please provide me a hook when a RollApp changes it's chain-id because of whatever reason.

zale144 commented 2 months ago

@VictorTrustyDev Rollapps can only change the ID through forking. If we decide to tie the EIP155 part of the rollapp ID to aliases, then no need to do anything

VictorTrustyDev commented 2 months ago

Move all aliases to a forked rollapp's ID what does that means? Itsn't that means RollApp change the Chain-ID?

zale144 commented 2 months ago

yes, when forking, the rollapp ID will be different. So, now the mapping of all the aliases should be migrated to the new rollapp ID. But in case aliases are tied to the EIP155 ID, then forking will not change it, so no need to move the aliases

VictorTrustyDev commented 2 months ago

not just that, configurations in Dym-Names records needs to be migrated also, so best way is to provide me a hook, thanks

danwt commented 1 month ago

Hey guys, in this research doc I am figuring this out

https://www.notion.so/dymension/Fork-based-Rollapp-Rollback-Research-V2-10aa4a51f86a80a6a1d2ca8fcca9e68b

In my opinion, there are many aspects of the hub which are dependent on rollapp id, so when we fork we would need to migrate a lot of things

I have made a suggestion here

https://www.notion.so/dymension/Fork-based-Rollapp-Rollback-Research-V2-10aa4a51f86a80a6a1d2ca8fcca9e68b?pvs=4#111a4a51f86a8002af38c5d1346f7fbc

when the hub handles a chain ID, it should be converted first to the *-1 or original version

In this way we do not explicitly migrate, but rather do a lazy conversion

WDYT, does it apply in this case?

omritoptix commented 3 weeks ago

closing as there is nothing to do on dymns as chain-id doesn't change .