-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
docs(adr): ADR-050 SIGN_MODE_TEXTUAL #10701
Conversation
Ethereum is working on a similar EIP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent ADR @AmauryM 👏
|
||
- if a string is too long, show it on multiple screens, | ||
- break line between the `key` and `value` from #3, | ||
- never allow line breaks on a number or a coin value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if there is a big number, how a user will know the value if we can't scroll and can't break lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
up, this is still a concern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed. The proposed way is to do best effort:
- if small number, no problem
- if big number, then show it on separate line
- if huge number (rare case), show it on multiple screens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can have an exponential notation? For example, instead 12300000000000000
we write 1.23e18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's another thread with scientific notation. My opinion:
- it's IMO not known enough by people with non-scientific background. You never see this notation in bank/finance for example.
1234567890
would be written as1,23456789e9
, which is actually longer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. I studied math and CS and consider this e
notation unreadable in any financial context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to have some shortcuts. For common Ethereum based coins (with 1e18 base) it will be difficult to read even if we use _
or '
every 3 or 6 digits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we have display respresentations to solve this such that amounts are dispplayed in ETH instead of Wei anyways?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the concern here is that we always display in the display denom, even if it doesn't make sense.
Take 20Wei, and the display denom is ETH. Textual will display 0.00000000000000002 ETH
, even though 20 Wei
is way more readable.
Maybe an idea is to display in the denom with the shortest string length.
I think all comments have been addressed! Is anyone willing to give a second approval, and then I'll merge this? We can still iterate as part of the WG. cc @webmaster128 @zmanian @JimLarson @jleni @robert-zaremba |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pre-approving. left few additional comments.
Co-authored-by: Robert Zaremba <[email protected]>
Co-authored-by: Robert Zaremba <[email protected]>
|
||
### `google.protobuf.Timestamp` | ||
|
||
Rendered as either ISO8601 (`2021-01-01T12:00:00Z`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm working on the implementation of Timestamp now.
I think what we want is RFC 3339. ISO8601 is a superset of that which does way too much for our needs. It does fun stuff like PT24H which is now until 24 hours later.
Also it is important to perseve nanosecond precision. Otherwise we loose information. Some more detail on how fractional seconds are displayed would be useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think RFC3339 doesn't deal with nanos, right? I found an informal RFC3339Nano in Golang, which is RFC3339+ns support, but no official spec. That seems like exactly what we want though.
The next superset seems to be ISO8601 itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are various mentions of "fraction" in RFC3339. The grammar time-secfrac = "." 1*DIGIT
means at least one digit after a period. My understanding so far has been that any precision is supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see! OK that's nice, I'll update the ADR and add an example with fractional seconds.
Rendered ADR
Description
Closes: #6513
Support documents:
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change