-
Notifications
You must be signed in to change notification settings - Fork 98
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
verify coin #1595
base: master
Are you sure you want to change the base?
verify coin #1595
Conversation
d452f72
to
37e2560
Compare
pact/coin-contract/v5/coin-v5.pact
Outdated
@@ -545,6 +547,7 @@ | |||
|
|||
(validate-account sender) | |||
(validate-account receiver) | |||
(enforce (!= sender receiver) "sender and receiver should differ") |
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.
aha but they can be the same! Just, they should exist on different chains, which we have no means of expressing in the current system.
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.
this property is requested by the transfer-crosschain
of the fungible-v2
interface, see https://github.com/kadena-io/chainweb-node/blob/master/pact/coin-contract/v2/fungible-v2.pact#L94
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.
fungible-v2
has an invalid property then 😞
6dac690
to
e09749c
Compare
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 discussed off-band, we'll not want a fungible-v3
, but rather we'll want to modify fungible-v2
to replace the offending models with the "correct" ones so that, while on-chain, the old fungible-v2
will remain, but off-chain, people will be able to cargo-cult the fixed interface. Concretely, my proposal is this:
fungible-v3
should be renamed tofungible-v2
, and replace the currentfungible-v2
i the main repo.- The on-chain (i.e. old)
fungible-v2
should be moved to its own directory, including a note (say, CAVEAT.md), which details the discrepancy and why there are two, plus how to distinguish between them. - We scope any potential changes to
coin
for the next release, which will include more than just what we spoke about. It will include changes such as shutting off account creation for non-principals, and removingrotate
.
see kadena-io/pact#1124 for the reason we need to assert a valid miner in the first
step
.Additionally, the
conserves-mass
property is not applicable in this case (defpact
), as it has to be true for allstep
.