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

Clarification on a few specification terms #23

Open
sambacha opened this issue Jul 3, 2020 · 3 comments
Open

Clarification on a few specification terms #23

sambacha opened this issue Jul 3, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@sambacha
Copy link

sambacha commented Jul 3, 2020

I have a few questions/requests for clarification as to your specification

Amount.yaml

Amount is described as:

Amount is some Value of a Currency

Can it be changed to:

Amount is some Unit of Account

currency has legal implications, and strictly speaking, this is not entirely accurate for EVM chains as gas is the unit of account for EVM chains (typically) whereas ethereum

Account Identifier

currently reads:

  • The account_identifier uniquely identifies an account within a network.

can it be expanded to fit a more approximate meaning of the word, as you can have a chain that uses the same derivation path in both instances but have assets in different addresses.

Also, can this be explicit in what it means as to what constitutes an "account"? Is it only EOA - Externally owned accounts only or can smart contract addresses be included with no distinction?

informative ref: eip1191.

example:

const hexChecksumChain = (name: string, coinType: number, chainId?: number) => ({
  coinType,	  coinType,
  decoder: decodeChecksummedHex,	  decoder: makeChecksummedHexDecoder(chainId),
  encoder: encodeChecksummedHex,	  encoder: makeChecksummedHexEncoder(chainId),
  name,	  name,
});	});

example ref: ensdomains/address-encoder/commit/5bf53b13fa014646ea28c9e5f937361dc9b40590

Network Identifer.yaml

The network_identifier specifies which network a particular object is associated with.

"If a blockchain has a specific chain-id or network identifier, it
should go in this field."

Can we also provide an (optional) direct link to a repository containing the genesis file? This would be the least ambiguous as to
** Informative ** ethereum-listss/chains

Additional references and sources can be made available. A Java SDK would be trivial, I just would like to not have to make awkward choices if possible, these are the ones just most apparent.

Thank you.

@sambacha sambacha added the enhancement New feature or request label Jul 3, 2020
@sambacha
Copy link
Author

I am at a loss as to the incredible lack of any sort of response from Coinbase on this, why should anyone devote any sort of serious time to this?

I have seen projects on SourceForge with better response times.

@patrick-ogrady
Copy link
Contributor

patrick-ogrady commented Jul 24, 2020

👋 @sambacha sorry for the delay on responding here! We are still working on our processes for tracking incoming requests and this one slipped by.

Amount is described as:

Amount is some Value of a Currency

Can it be changed to:

Amount is some Unit of Account

currency has legal implications, and strictly speaking, this is not entirely accurate for EVM chains as gas is the unit of account for EVM chains (typically) whereas ethereum

I chose the term Value and Currency here because the Amount (https://www.rosetta-api.org/docs/models/Amount.html) model contains both a Value and Currency field:

{
    "value": "1238089899992",
    "currency": {
        "symbol": "BTC",
        "decimals": 8
    }
}

I'd prefer not to change this description unless we changed the name of the fields in the model (which would be a pretty large breaking change) but something we could consider for V2.

Account Identifier
currently reads:

The account_identifier uniquely identifies an account within a network.
can it be expanded to fit a more approximate meaning of the word, as you can have a chain that uses the same derivation path in both instances but have assets in different addresses.

Could you elaborate on what you mean here and provide an example?

Also, can this be explicit in what it means as to what constitutes an "account"? Is it only EOA - Externally owned accounts only or can smart contract addresses be included with no distinction?

informative ref: eip1191.

example:

const hexChecksumChain = (name: string, coinType: number, chainId?: number) => ({
coinType, coinType,
decoder: decodeChecksummedHex, decoder: makeChecksummedHexDecoder(chainId),
encoder: encodeChecksummedHex, encoder: makeChecksummedHexEncoder(chainId),
name, name,
}); });
example ref: ensdomains/address-encoder/commit/5bf53b13fa014646ea28c9e5f937361dc9b40590

Great question! AccountIdentifier can be used to identify any address on the blockchain (both "EOA" and "smart contract addresses" in the terminology you used).

Network Identifer.yaml
The network_identifier specifies which network a particular object is associated with.

"If a blockchain has a specific chain-id or network identifier, it
should go in this field."

Can we also provide an (optional) direct link to a repository containing the genesis file? This would be the least ambiguous as to
** Informative ** ethereum-listss/chains

You could populate the NetworkIdentifier.Network with the hash of this genesis file and then provide a link to it in your README. I'd be concerned with putting a raw URL in the identifier in case it changes for some reason (then the NetworkIdentifier clients are using to access your implementation will no longer be accurate).

I invite you to make PRs directly with your suggestions as it is sometimes easier to discuss. Here is an example: #26

@sambacha
Copy link
Author

sambacha commented Aug 1, 2020

Hey 👋 Patrick, thank you for answering my questions, I appreciate the clarification on 'currency' terminology especially.

I will make a PR specifically for dealing with the genesis/networkID.

As for the account derivation path, you can use the same derivation path as ethereum and have the same account addresses, they won't obviously have the same balances as you are starting from a raw state (e.g. think of forking the network at block 0, you have the same address but no transactions). This is how our network works and many others (e.g.. EWT).

Appreciate the help, 💯👍

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

No branches or pull requests

2 participants