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
Add minimum tx fee to rosetta construction/metadata #8170
Add minimum tx fee to rosetta construction/metadata #8170
Conversation
New format as suggested by Matthew and Brandon is {
"metadata": {
"sender": "B62qnzbXmRNo9q32n4SNu2mpB8e7FYYLH8NmaX6oFCBYjjQ8SbD7uzV",
"nonce": "0",
"token_id": "1"
},
"suggested_fee": [
{
"value": "250000000",
"currency": {
"symbol": "CODA",
"decimals": 9
},
"metadata": {
"minimum_fee": {
"value": "1000000",
"currency": {
"symbol": "CODA",
"decimals": 9
}
}
}
}
]
} |
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.
Great!
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.
OCaml master
Getting there... and thanks to help from Matthew and Omer. |
!approved-for-mainnet |
!ci-build-me |
This PR adds the minimum tx fee to the rosetta
construction/metadata
response so that clients can prevent users from creating transactions that would fail to be accepted. The minimum fee is obtained from the compile-time configMina_compile_config.minimum_user_command_fee
For compatibility with the Rosetta specification we've added the additional
"minimum_fee"
information to the metadata property like soTesting
This can be tested with
mina_ledger_wallet send-payment
andsrc/app/rosetta/test-curl/con_metadata.sh
. Prior to this change the"minimum_fee"
component will not be present in the JSON response. After this change it should be present and contain the value found insrc/config/amount_defaults/realistic.mlh
.Checklist:
Closes #8086