Ledger Implications of Upgrading CorDapps
When upgrading a CorDapp you should consider the following implications for the ledger:
Contract
The contract code executed during contract verification of new transactions always uses the contract of the current CPI. The verification rule for the contract upgrade may differ from the previous one. You must ensure that newer contracts can continue to verify states, created with an older version of the contract, that already exist on the ledger.
State
State upgrades have specific requirements. To ensure smooth functioning across different versions of states within a CPI, you must serialize states using AMQP serialization. For information about how to make your states serializable across versions, see Default Class Evolution. Neglecting this guideline can cause deserialization issues when attempting to access states from the vault by querying with the API, retrieving from the transaction, or accessing in contract code.
Ledger Service API
The retrieved states from APIs use the state class of the current CPI.
Backchain
The backchain is designed to work seamlessly with transactions from various versions, ensuring compatibility across different versions.
Was this page helpful?
Thanks for your feedback!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.
We're sorry this page wasn't helpful. Let us know how we can make it better!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Create an issue
Create a new GitHub issue in this repository - submit technical feedback, draw attention to a potential documentation bug, or share ideas for improvement and general feedback.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.