Chain id naming convention #77
Open
opened 2023-01-11 06:47:09 +00:00 by 0xmuralik
·
3 comments
No Branch/Tag Specified
main
zach/prefix
roy/rm-hardcoded-records
roy/graphql-to-ipld
roy/qol-improvements
murali/gql
murali/update-fork
murali/record-attributes
aleem/fix-lint-errors
murali/CIDFromJSONBytes
update-validator-doc-v0.8.0
feature_test_record_types
aleem/25-wasmd
release-v0.8.0
nameservice_tests_github
auction_tests
all_test_stuff
fix_cid_generation
run_tests_github_action
0-7-0-upgrade-guide
murali/sdk-integration-tests
murali/quick-fix
dboreham/sdk-integration-test
console_release
release-v0.3.1-dev
release-v0.6.0
anil/lint
murali/to_ipld_prime
docs
release-v0.2.0-dev
ian/smt
v0.8.0
v0.7.0
v0.6.0
v0.3.0-dev
v0.2.1-dev
v0.2.0-dev
v0.1.0-dev
Labels
Clear labels
C:CLI
C:Crypto
C:Encoding
C:Proto
C:Types
Status: Stale
Type: ADR
Type: Build
Type: CI
Type: Docs
Type: Tests
bug
dependencies
docker
documentation
duplicate
enhancement
go
good first issue
help wanted
high priority
in progress
invalid
javascript
low priority
medium priority
question
urgent
wontfix
Copied from Github
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Something isn't working
Pull requests that update a dependency file
Pull requests that update Docker code
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Pull requests that update Go code
Good for newcomers
Extra attention is needed
currently working on
This doesn't seem right
Pull requests that update Javascript code
Further information is requested
Top priority issue
This will not be worked on
An issue or PR manually copied from GitHub.
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
Reviewed
Confirmed
Issue has been confirmed
Reviewed
Duplicate
This issue or pull request already exists
Reviewed
Invalid
Invalid issue
Reviewed
Won't Fix
This issue won't be fixed
Status
Abandoned
Somebody has started to work on this but abandoned work
Status
Blocked
Something is blocking this issue or pull request
Status
Need More Info
Feedback is required to reproduce issue or to continue work
No labels
low priority
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cerc-io/laconicd-deprecated#77
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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
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
Next steps: Decide on a EIP155 chain id
@AFDudley @i-norden
@AFDudley @i-norden any updates on this?