Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field "chain" is used twice with different meaning/definition #2373

Open
kopeboy opened this issue Mar 7, 2023 · 6 comments
Open

Field "chain" is used twice with different meaning/definition #2373

kopeboy opened this issue Mar 7, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@kopeboy
Copy link

kopeboy commented Mar 7, 2023

I would clarify what does "chain" mean, given that we have "parent.chain" that has a different definition.
Since the latter is dependent on / specific to this repository and doesn't have a correspondence on a on-chain value (EIPs are off-chain right?), I would consolidate to the former and make a clear definition of what is it.
There are irregularities currently on the "chain" field values, examples:

  • Capitalized/UPPERCASE/lowercase (ETH/ETH vs Evmos/evmos)
  • equal to the symbol of the native currency vs. to the name or shortname of the chain (ETH vs Solana vs evmos)
  • is it a unique representation of the parent chain or parent native currency (by slip44 maybe?)? Seems so with children of Ethereum but not otherwise, like Aurora-NEAR, Avalanche-AVAX, etc..

In general, I would add comments to
https://github.com/ethereum-lists/chains/blob/master/model/src/main/kotlin/org/ethereum/lists/chains/model/Chain.kt
to help listers provide consistent values.

@ligi
Copy link
Member

ligi commented Mar 7, 2023

true - this is inconsistent
I think we just remove the "chain" in the root and keep it in parent
"chain" in the root is kinda redundant to "name" anyway

@ligi ligi added the enhancement New feature or request label Mar 7, 2023
@ligi
Copy link
Member

ligi commented Mar 7, 2023

migration path:

  • we remove it in all files from _data
  • the processor adds it again for the legacy API
  • in API v2 it is not added (API v2  #1889)

@kopeboy
Copy link
Author

kopeboy commented Mar 7, 2023

Excuse me? How would I index to the parent chain if the value of "parent.chain" is NOT on the parent?!
Either you add a field holding the "EIP155-X" like values at the higher level,
OR you define the parent.chain by an existing identifier for the chain, like chainID or shortname..

@ligi
Copy link
Member

ligi commented Mar 7, 2023

the filename is CAIP2 and the values of chain fields in parent is CAIP2

@kopeboy
Copy link
Author

kopeboy commented Mar 7, 2023

They would need to be "eip155:1" instead of "eip155-1" for CAIP2.
Anyway, why would you want someone to parse github folders for file names when you can have everything in a single json that is already the list? Can't we override either "chain" or "parent.chain" with the same chosen id to make the list file sufficient?

@95HenryFong95
Copy link

from the feedback have you like that we need to do the old behind and welcome new

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants
@ligi @kopeboy @95HenryFong95 and others