cerc-io / laconicd-deprecated

Read-only mirror of https://git.vdb.to/cerc-io/laconicd-deprecated
https://git.vdb.to/cerc-io/laconicd-deprecated
GNU Lesser General Public License v3.0
6 stars 8 forks source link

Chain id naming convention #77

Closed 0xmuralik closed 1 year ago

0xmuralik commented 1 year ago

Figure out a naming convention for chain ids.

The current one follows {string}_{number/port}-{number} --adopted from ethermint. Example: laconic_9000-1. But the conventional approach to naming chains in the cosmos ecosystem has been {string}-{number}. Example: cosmoshub-4 There is no strict rule to follow for chain-ids, but it's better to decide on the best one for us.

Once decided on the naming convention, change the regex check and few other tests to work accordingly. https://github.com/cerc-io/laconicd/blob/ab2ea51aac6e3c26a41dd4028d8d5d8884e13b50/types/chain_id.go#L18

0xmuralik commented 1 year ago

The Evmos Chain ID contains 3 main components

Identifier: Unstructured string that defines the name of the application. EIP155 Number: Immutable EIP155 CHAIN_ID that defines the replay attack protection number. Version Number: Is the version number (always positive) that the chain is currently running. This number MUST be incremented every time the chain is upgraded or forked in order to avoid network or consensus errors.

The EIP155 corresponds to the ethereum based ChanID. https://chainlist.org/?search=evmos&testnets=true

Every chain must have a unique identifier or chain-id. Tendermint requires each application to define its own chain-id in the genesis.json fields. However, in order to comply with both EIP155 and Cosmos standard for chain upgrades, Evmos-compatible chains must implement a special structure for their chain identifiers.

Hence, laconicd should also adopt the same chain-id format with a unique EIP155 number.

The format for specifying Evmos compatible chain-id in genesis is the following: {identifier}_{EIP155}-{version}

Helpful Links: https://docs.evmos.org/users/technical_concepts/chain_id.html https://chainlist.org/?search=evmos&testnets=true https://github.com/cosmos/chain-registry/blob/master/evmos/chain.json#L8 https://eips.ethereum.org/EIPS/eip-155

0xmuralik commented 1 year ago

Next steps: Decide on a EIP155 chain id @AFDudley @i-norden

0xmuralik commented 1 year ago

@AFDudley @i-norden any updates on this?

telackey commented 1 year ago

https://git.vdb.to/cerc-io/laconicd/issues/77