This topic explains why you need to convert coins as a pre-required step right after upgrading the app to the latest version (v4.5.0) to be able to see your assets’ balances as well as highlights the main breaking changes introduced in Privacy version 2. A primer and some-what high-level introduction has been given in this series of posts.
Why do you need to convert coins?
When the first time you open the app (v4.5.0) on your phone, you may see all balances are zero in the assets tab, don’t be freaked out, this is just because your coins are still in V1 and they must be converted to V2 to be shown correctly as before.
For more details of the conversion, please look into the topic which explains what a conversion transaction is and how to convert coins by using Incognito app or CLI tool.
Big changes
New Base58 Encoding
With Privacy V2, you will see that your keyset will be slightly different in its representation due to the change in the base58 encoding algorithm. This change is for compatibility with other library implementations. The blockchain accepts both of the encoding algorithms, so users DO NOT have to worry about their old key being unusable.
Payment Address
For a transaction of version 2, users MUST use payment addresses of the new version. For example, the old payment address
12RpL8rXcD78Qc8sD3FBdDafpH6oCUyTv5Zx79H9tYHYsKzLwto8h8wM9gpHrKb1SSuZfBrQR6FhRjdyi1U1zeUw8oxVTDnm4gPMixm
should be replaced by the new (longer in size)
12saz5eCUAiWowYdWnwwsnSgs8rt68GGwjxrYfaGKj54C6BUo7ZBYdfLM9gLUwYGLbn5z7HHa3uRYRF9Yhy3T65e1f1KXUb9sksUJAojavdeJLhuyaFPGNKfjQokYQ1yepRMCb5GSAr9sqDN3KeR
both of which are generated from the private key
1111111Cp1sVYpn5RMCh3PzC467CzFFub3YRB4CuGQ39vjSn3FscaWfLe7JnfGGBMLoMkbph81ArwZvhXCsUSD7gEZTAPmzc8woPWWE3N1B
More about this can be found at this post.
pDEX Metadata Disabled
Some of the pDEX metadata types will no longer be supported after the Privacy V2 checkpoint takes effect. Here is a summary of them.
Before V2 BreakPoint | After V2 Break Point | |
---|---|---|
TradeReqs | 91, 205 | 205 |
ContributionReqs | 90, 204 | 204 |
TradeRPCs | handleCreateAndSendTxWithPRVTradeReq, handleCreateAndSendTxWithPTokenTradeReq, handleCreateAndSendTxWithPRVCrossPoolTradeReq, handleCreateAndSendTxWithPTokenCrossPoolTradeReq | handleCreateAndSendTxWithPRVCrossPoolTradeReq, handleCreateAndSendTxWithPTokenCrossPoolTradeReq |
ContributionRPCs | handleCreateAndSendTxWithPRVContribution, handleCreateAndSendTxWithPTokenContribution, handleCreateAndSendTxWithPRVContributionV2, handleCreateAndSendTxWithPTokenContributionV2 | handleCreateAndSendTxWithPRVContributionV2, handleCreateAndSendTxWithPTokenContributionV2 |
See more RPC examples here.
Outcoins
-
The RPC
listoutputcoins
should be replaced bylistoutputcoinsfromcache
to make use of the full-node’s cache. The latter can return output coins v2, while the prior cannot. See more about this at here, and here. -
The output coins returned by the
listoutputcoins
orlistoutputcoinsfromcache
have their structure changed from
type OutCoin struct {
PublicKey string `json:"PublicKey"`
CoinCommitment string `json:"CoinCommitment"`
SNDerivator string `json:"SNDerivator"`
SerialNumber string `json:"SerialNumber"`
Randomness string `json:"Randomness"`
Value string `json:"Value"`
Info string `json:"Info"`
CoinDetailsEncrypted string `json:"CoinDetailsEncrypted"`
}
to
type OutCoin struct {
Version string `json:"Version"`
Index string `json:"Index"`
PublicKey string `json:"PublicKey"`
Commitment string `json:"Commitment"`
SNDerivator string `json:"SNDerivator"`
KeyImage string `json:"KeyImage"`
Randomness string `json:"Randomness"`
Value string `json:"Value"`
Info string `json:"Info"`
SharedRandom string `json:"SharedRandom"`
SharedConcealRandom string `json:"SharedConcealRandom"`
TxRandom string `json:"TxRandom"`
CoinDetailsEncrypted string `json:"CoinDetailsEncrypted"`
AssetTag string `json:"AssetTag"`
}
Notice the JSON tag CoinCommitment
is changed to Commitment
, and SerialNumber
is changed to KeyImage
.
More about the differences between an output coin v1 and v2 can be found here.
- For full-node owners or anyone who wants to check output coins and balances via full-node, it is RECOMMENDED that you submit your OTAKey to the full-nodes BEFORE any output coins v2 arrives. This means BEFORE the first conversion transaction, or BEFORE anyone sends you an output coin v2, or maybe RIGHT AFTER you read this note. This inconvenience is because the Privacy V2 does let the full-nodes record your output coins unless you ask them to do so. The submission is required to make sure your output coins and balances will correctly acknowledged by the full-nodes. In case you forget to do this, you have to perform the submission in an enhanced manner. You can find out more about how to submit keys via these RPC examples.