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
BACK-6974: New schema for EIP712 #171
base: main
Are you sure you want to change the base?
Conversation
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.
Can you please add a description to your PR referencing specs for proper historization ? Thanks!
Adding diff of the schema for clarity:
❯ difft ethereum/eip712.schema.json ethereum/eip712-v2.schema.json back6974
ethereum/eip712-v2.schema.json --- JSON
34 34 "properties": {
.. 35 "assetPath": {
.. 36 "type": "string"
.. 37 },
.. 38 "format": {
.. 39 "enum": [
.. 40 "coin",
.. 41 "amount",
.. 42 "address"
.. 43 ]
.. 44 },
35 45 "label": {
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 believe if we go with option 3 as specified in BACK-6974, the new schema file should replace the old one ?
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.
The option 3 is about the asset file itself, not its schema. I think all schemas should remain in input repositories, and the single asset file should meet all these schema (this is why we cannot authorize to drop or alter field, nor add mandatory fields)
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.
Documents can't pass all schemas, as additionalProperties
is set to false
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.
Change should be applied in all networks
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.
As stated here, these changes are meant to be used by app-eth. Do we really need to impact non-ethereum network?
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.
All these networks are EVMs, handled by the ethereum app
"type": "string" | ||
}, | ||
"format": { | ||
"enum": [ |
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.
We also need a raw
value for unformatted fields, see https://github.com/LedgerHQ/app-ethereum/blob/feat/apa/eip712_improvements/doc/ethapp.adoc#show-raw-field
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.
yes, I missed it since I relied on https://ledgerhq.atlassian.net/wiki/spaces/PTX/pages/4404903999/ARCHI+EIP-712+improvements which does not match the code you show me.
ethereum/eip712-v2.schema.json
Outdated
"enum": [ | ||
"coin", | ||
"amount", | ||
"address" |
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.
address
will not be implemented in this version, let's remove it (see https://github.com/LedgerHQ/app-ethereum/blob/feat/apa/eip712_improvements/doc/ethapp.adoc#eip712-filtering)
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.
ok
ethereum/eip712-v2.schema.json
Outdated
}, | ||
"format": { | ||
"enum": [ | ||
"coin", |
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 suggest we follow the nomenclature defined on the nano app for clarity: https://github.com/LedgerHQ/app-ethereum/blob/feat/apa/eip712_improvements/doc/ethapp.adoc#eip712-filtering
"coin", | |
"token", |
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.
sure
"type": "string" | ||
}, | ||
"format": { | ||
"enum": [ |
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 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.
yes
No description provided.