You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: condor/migration-guide.md
+63-58Lines changed: 63 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,75 +1,78 @@
1
1
# Casper 2.0 Migration Guide for Crypto Exchanges
2
2
3
-
The Casper Network is in the process of upgrading to Casper 2.0, which introduces breaking changes to the node software, the protocol and the interfaces associated with interacting with the network. In order to maintain compatibility with Casper Network after the upgrade of mainnet, tentatively scheduled for March 2025, crypto exchanges that offer $CSPR pairs, allow for $CSPR deposits and withdrawals and/or allow their users to stake $CSPR, may need to upgrade their integration with Casper Network. This migration guide will help you determine whether, and if so - how, to migrate your integration in prepartion for the network upgrade.
3
+
The Casper Network is in the process of upgrading to Casper 2.0, which introduces breaking changes to the node software, the protocol, and the API Interfaces.
4
4
5
-
More information about the specific changes in, and features introduced by Casper 2.0 can be found here (LINK).
5
+
In order to maintain compatibility with Casper Network after the upgrade of Mainnet, which is tentatively scheduled for end of March/mid-April 2025, crypto exchanges that offer $CSPR pairs, allow for $CSPR deposits and withdrawals and/or allow their users to stake $CSPR, may need to upgrade their integration with Casper Network. This migration guide will help you determine whether, and if so - how to update your integration in preparation for the network upgrade.
6
6
7
-
This migration guide aims at listing down the key information required for exchanges to make the necessary changes on their side to become Casper 2.0 ready.
7
+
This guide will help you assess whether any changes are needed on your end and, if so, how to update your integration to ensure compatibility with Casper 2.0.
8
8
9
-
## Should I migrate my integration?
9
+
## Should I update my integration?
10
10
11
-
Exchanges have different levels of integration with Casper Network, and offer different subsets of functionality relating to $CSPR to their user base. Depending on the specifics of your integration, you may or may not have to migrate your integration prior to the mainnet launch of Casper 2.0. The table below helps you determine your next steps, if any.
11
+
Exchanges integrate with Casper Network at different levels, offering varying $CSPR functionalities.
|**Indirect**| Some exchanges do not integrate with Casper Network directly but leverage liquidity provided by other exchanges through their APIs | No migration required (assuming the downstream exchange migrates on time, if needed) |
16
-
|**[Run own node](#)**| Some exchanges run their own node and interface with its RPC methods | Exchange needs to upgrade the node software, and participate in the network upgrade process. Additionally, exchange needs to ensure the RPC methods they rely on are either still supported in 2.0 or migrate to new RPC methods |
17
-
|**[RPC integration](#)**| Some exchanges use public node infrastructure and interface with those via RPC | Exchange needs to ensure the RPC methods they rely on are either still supported in 2.0, or migrate to new RPC methods |
18
-
|**[SDK integration](#)**| Some exchanges use the publicly available Casper SDKs (e.g. JavaScript SDK, C#.NET SDK, Go SDK, etc.) | Depending on the SDK language (e.g. JS, Go) and the methods you use, you may or may not need to migrate prior to mainnet launch |
13
+
Whether you need to migrate before Casper 2.0’s Mainnet launch depends on your integration. The table below can help you determine your next steps.
19
14
20
-
## Integration-specific Migration Documentation
15
+
| Integration Type | Required actions |
16
+
|---------------------|-------------|
17
+
|**Indirect integration via 3rd party Partner [<sup>ⓘ<sup>](a"Exchanges that don’t directly integrate with Casper Network but use liquidity from other exchanges via APIs.")**| No migration required, assuming the partner updates their integration.|
18
+
|**[Running your own node](#)[<sup>ⓘ<sup>](a"Exchanges that run their own node and interface with its RPC methods")**| Node software upgrade is required |
19
+
|**[Direct RPC API Integration](#)[<sup>ⓘ<sup>](a"Exchanges that use public node infrastructure and interface with those via RPC")**| Adjustments to new response structures is required. Deprecated methods should be replaced with their newer alternatives |
20
+
|**[SDK Integration](#)[<sup>ⓘ<sup>](a"Exchanges that use the publicly available Casper SDKs(e.g. JavaScript SDK, C#.NET SDK, Go SDK, etc.)")**| Depending on the SDK language (e.g. JS, Go) and the methods you use, upgrade to a Casper 2.0 compatible version is required|
21
21
22
-
### Running our own node
23
-
If you run your own node, your migration experience will likely involve two distinct paths.
22
+
More information about the specific changes in, and features introduced by Casper 2.0 can be found [here](https://docs.casper.network/condor/index).
24
23
25
-
On the one hand, as a node operator you will participate in the actual mainnet upgrade of Casper Network, which will take place a specific date and time (you will have a number of days to stage the upgrade in advance of the activation point), while on the other hand you will have to possibly migrate the method by which you interface with your own node. Continue with the migration details provided for exchanges with direct RPC integration or SDK integration, depending on which applies to you.
24
+
## Integration Types
26
25
27
-
### RPC Integration
26
+
### Running your own node
27
+
If you run your own node, your migration experience will likely involve two distinct paths.
28
28
29
-
**Casper Sidecar**
29
+
On the one hand, as a node operator you will participate in the actual Mainnet upgrade of Casper Network, which will take place a specific date and time (you will have a number of days to stage the upgrade in advance of the activation point), while on the other hand you will have to possibly migrate the method by which you interface with your own node. Continue with the migration details provided for exchanges with direct RPC integration or SDK integration, depending on which applies to you.
30
30
31
-
One of the major changes in the **Casper 2.0** upgrade is the introduction of **[casper-sidecar](https://github.com/casper-network/condor-info/blob/a7af985d60aa719454cbd219d4982bd5c79eee84/articles/034-sidecar.md)**.
31
+
### Direct RPC API Integration
32
32
33
-
The **sidecar** runs as a dedicated process, bound to a node’s **binary port** and/or **SSE port**. It takes full responsibility for running the **JSON-RPC server**and exposing **JSON-RPC endpoints** to the internet.
33
+
In Casper 2.0, the JSON RPC API is moved from the node to an accompanying software called [Casper Sidecar](https://github.com/casper-network/casper-sidecar). The sidecar communicates with the node via a binary protocol and exposes a familiar JSONRPC interface to the end users. It's still possible to fetch information directly from the node using the binary protocol; however, at this moment, the required libraries exist only for the Rust language.
34
34
35
-
As a result, the **node software itself no longer exposes a JSON-RPC API** to consumers—this function is now handled exclusively by the **sidecar**.
35
+
The sidecar could be run on the same machine as the node or on a separate instance. Multiple sidecars could be run against one node to increase availability.
36
36
37
-
**Node Binary Port**
37
+
SSE API users can optionally configure the sidecar to store the SSE events in an external database. The current options are SQLite or PostgreSQL.
38
38
39
-
The Casper 2.0 Node now exposes a pure Binary Port API, which allows connection over TCP/IP and pure binary serialization for your remote procedure calls. Depending on your use case, you may be interested in considering this option for interacting with Casper v2.0.
39
+
More information about the sidecar configuration can be found in the [corresponding documentation](https://github.com/casper-network/casper-sidecar). Also, before the Mainnet upgrade, the Casper team will provide the upgrade instructions to the node operators with reasonable default configuration options.
40
40
41
-
-**Key Considerations:**</br>
41
+
**Recommended Key Considerations:**</br>
42
42
- Enabling Binary Port for Forward-Facing APIs
43
43
- Sidecar Dependency: In Casper 2.0, the JSON-RPC service is moved to the casper-sidecar, which forwards requests to the node’s binary RPC port.
44
44
- Operators who need a public-facing API must enable the binary port on the node (the sidecar is a consumer of this service)
45
45
- Binary Port doesn't need to be a public port (it only needs to be exposed to sidecar)
46
46
47
-
**SSE (Server Side Events) Server**
48
-
49
-
Casper 2.0 introduces a realtime API of events, emitted by the node when processing blocks and/or transactions.
50
-
51
47
52
48
**Transactions in Casper 2.0**
53
49
54
50
Transactions are a higher-order concept that encapsulate both **Deploys** and **V1 transactions**.
55
51
56
52
A **Transaction** is a polymorphic data structure that, for now, can be either:
57
53
- A **Deploy**, which remains compliant with the **1.x definition**.
58
-
- A **V1 transaction**, representing the new standard moving forward.
54
+
- A **TransactionV1**, representing the new type of transaction, introduced alongside the `Deploy` type.
59
55
60
56
Secondly, Casper 2.0 includes new methods, renamed methods and methods with a change in response format.
61
57
62
58
At the same time, Casper 1.x deploys will continue to be accepted by Casper 2.0, hence if your entire integration comprises only the submission of Deploys (such as transfers in and out of accounts), you may want to take into account the below considerations prior to Mainnet activation of Casper 2.0.
63
59
64
-
### Preparing for Casper 2.0: Compatibility Considerations
Contents/details about list of changes in the RPC protocol divided into two parts:
65
62
66
-
Exchanges **may not need to make immediate changes** before the mainnet activation of **Casper 2.0**; however, this depends on how they interact with the network.
63
+
- Change in types with correspondences between the semantically identical types (Deploy and TransactionV1, Block and BlockV2)
64
+
- Changes in the RPC methods that clearly describe which methods are deprecated and what are their newer alternatives.
65
+
<Placeholder>
67
66
68
-
While the **account-put-deploy** JSON-RPC method continues to accept the same input structure as in **1.x**, the response format of **info_get_deploy** is **not backwards compatible** with **1.x**.
67
+
**Preparing for Casper 2.0: Compatibility Considerations**
69
68
70
-
If an exchange relies on the results of **info_get_deploy**, updates will be required to handle the new response format properly.
69
+
- Exchanges **may not need to make immediate changes** before the Mainnet activation of **Casper 2.0**; however, this depends on how they interact with the network.
71
70
72
-
Using 1.x Deploys in a 2.x Node:
71
+
- While the **account-put-deploy** JSON-RPC method continues to accept the same input structure as in **1.x**, the response format of **info_get_deploy** is **not backwards compatible** with **1.x**.
72
+
73
+
- If an exchange relies on the results of **info_get_deploy**, updates will be required to handle the new response format properly.
74
+
75
+
- Using 1.x Deploys in a 2.x Node:
73
76
74
77
- Casper 2.0 introduces a new Transaction model (replacing the old “Deploy”), but it will continue to accept and execute valid 1.x deploys for now.
75
78
@@ -91,40 +94,42 @@ Therefore, Exchanges should review how they retrieve deploys/transactions and be
91
94
92
95
#### **Action Required**
93
96
94
-
➡️ Exchanges should review their integration and assess whether their systems depend on **info_get_deploy** results. If so, necessary updates must be made to ensure compatibility with **Casper 2.0**.
97
+
-➡️ Exchanges should review their integration and assess whether their systems depend on **info_get_deploy** results. If so, necessary updates must be made to ensure compatibility with **Casper 2.0**.
95
98
96
-
➡️ To assess your next steps, please evaluate your integration against the 1.x -> 2.0 JSON RPC changes detailed in the link [here](https://docs.casper.network/condor/jsonrpc#json-rpc-schema-definitions).
99
+
-➡️ To assess your next steps, please evaluate your integration against the 1.x -> 2.0 JSON RPC changes detailed in the link [here](https://docs.casper.network/condor/jsonrpc#json-rpc-schema-definitions).
97
100
98
101
Please refer to this [page](https://docs.casper.network/condor/jsonrpc) for more details on **casper-sidecar** and **JSON RPC** changes.
99
102
100
103
### SDK Integration
101
-
Depending on which SDK language (e.g. JavaScript, Go) you use, and which methods you interface with, you might not have to immediately migrate your integration. However, in order to be safe and future-proof, it is strongly recommended to upgrade your SDK to the latest version applicable to your stack. For most languages, this can be done immediately, as the SDKs maintain both forward (2.x) and backward (1.x) compatibility at the same time.
104
+
Casper 2.0 introduces changes essential for the network’s future evolution, which also include modifications to data structures that impact API responses. Since historical blockchain data cannot be altered due to cryptographic signatures, both legacy and new data structures will coexist in Casper 2.0 and be returned by the API.
102
105
103
-
While it may not be strictly necessary to upgrade your integration if all you do is submit Deploys to the network (e.g. transfers in and out of accounts), it is STRONGLY RECOMMENDED to upgrade to the new SDK now, to experience a seamless upgrade to Casper 2.0 and beyond.
104
-
105
-
>[!IMPORTANT]
106
-
> **Addressable Entity is not enabled in Casper 2.0.**
107
-
>
108
-
> Updating to a Casper 2.0-compatible SDK will be necessary when the **addressable entity** is enabled.
109
-
>
110
-
> Once the **addressable entity** is enabled, exchanges will be required to use an SDK compatible with the Entity.
106
+
To simplify the transition for developers, we prepared new backward and forward-compatible Casper SDKs that provide a uniform data interface across both Casper 1.5.x and Casper 2.0. This ensures that developers can work with consistent data types, regardless of the network version in which the data was created.
111
107
108
+
Upgrading to a new version of Casper SDKs makes it possible to have one integration that guarantees future compatibility with Casper 2.0 while maintaining the existing compatibility with Casper 1.5. The network upgrade will require no changes in the consumer code, ensuring no disruption in the service.
112
109
113
110
Please see instructions below for your specific SDK language:
114
111
115
-
| SDK | Instructions |
116
-
|---------------------|-------------|
117
-
|**JavaScript**| The appropriate SDK to upgrade to is the latest v5.x release can be found [here](https://github.com/casper-ecosystem/casper-js-sdk/releases). |
118
-
|| Common use case examples (connect to RPC, send a transfer, etc.) can be found in [Casper JS SDK 5.0 README](https://github.com/casper-ecosystem/casper-js-sdk/tree/feat-5.0.0?tab=readme-ov-file#usage-examples)|
119
-
||To upgrade your integration, follow the detailed [V2 to V5 Migration Guide](https://github.com/casper-ecosystem/casper-js-sdk/blob/feat-5.0.0/resources/migration-guide-v2-v5.md)|
120
-
|**#C .NET**| The appropriate SDK to upgrade to is the latest v3.x release can be found [here](https://github.com/make-software/casper-net-sdk/releases).|
121
-
|| Typical use case examples (connect to RPC, send a transfer, etc.) can be found in [the Examples folder](https://github.com/make-software/casper-net-sdk/tree/casper-2.0.0/Docs/Examples). |
122
-
||To upgrade your integration, follow the document [Migration from Casper .NET SDK v2.x to v3.0](https://github.com/make-software/casper-net-sdk/blob/casper-2.0.0/Docs/Articles/Casper20MigrationGuide.md)|
123
-
|**Go**| The appropriate SDK to upgrade to is the latest v2.x release found [here](https://github.com/make-software/casper-go-sdk/releases).|
124
-
||Typical use case examples (connect to RPC, send a transfer, etc.) can be found in the [README](https://github.com/make-software/casper-go-sdk/blob/master/README.md). |
125
-
|**Java**| The appropriate SDK to upgrade to is the latest v2.x release can be found [here](https://github.com/casper-network/casper-java-sdk/releases).|
126
-
||Casper Java SDK in Maven Repository can be found in the link [here](https://central.sonatype.com/artifact/network.casper/casper-java-sdk/2.7.0-BETA.4/overview). |
127
-
|**Other**| If you are using an SDK not listed in this chapter, please contact the Casper Exchange Support Team.|
112
+
**JavaScript:**
113
+
- The appropriate SDK to upgrade to is the latest v5.x release can be found [here](https://github.com/casper-ecosystem/casper-js-sdk/releases)
114
+
- Common use case examples (connect to RPC, send a transfer, etc.) can be found in [Casper JS SDK 5.0 README](https://github.com/casper-ecosystem/casper-js-sdk/tree/feat-5.0.0?tab=readme-ov-file#usage-examples)
115
+
- To upgrade your integration, follow the detailed [V2 to V5 Migration Guide](https://github.com/casper-ecosystem/casper-js-sdk/blob/feat-5.0.0/resources/migration-guide-v2-v5.md)
116
+
117
+
**C# / .NET:**
118
+
- The appropriate SDK to upgrade to is the latest v3.x release can be found [here](https://github.com/make-software/casper-net-sdk/releases).
119
+
- Typical use case examples (connect to RPC, send a transfer, etc.) can be found in [the Examples folder](https://github.com/make-software/casper-net-sdk/tree/casper-2.0.0/Docs/Examples).
120
+
- To upgrade your integration, follow the document [Migration from Casper .NET SDK v2.x to v3.0](https://github.com/make-software/casper-net-sdk/blob/casper-2.0.0/Docs/Articles/Casper20MigrationGuide.md).
121
+
122
+
**Go:**
123
+
- The appropriate SDK to upgrade to is the latest v2.x release found [here](https://github.com/make-software/casper-go-sdk/releases).
124
+
- Typical use case examples (connect to RPC, send a transfer, etc.) can be found in the [README](https://github.com/make-software/casper-go-sdk/blob/master/README.md).
125
+
126
+
**Java:**
127
+
- The appropriate SDK to upgrade to is the latest v2.x release can be found [here](https://github.com/casper-network/casper-java-sdk/releases).
128
+
- Casper Java SDK in Maven Repository can be found in the link [here](https://central.sonatype.com/artifact/network.casper/casper-java-sdk/2.7.0-BETA.4/overview).
129
+
130
+
**Other:**
131
+
- If you are using an SDK not listed in this chapter, please contact the Casper Exchange Support Team.
132
+
128
133
129
134
## Important changes/updates in Casper 2.0(Placeholder - Core Team input required)
Casper 2.0 is coming to mainnet in the very foreseeable future, and we're honored and excited that you and your user community are part of this massively consequential event in the history of the Casper blockchain. In order to make sure you and your users are prepared for the mainnet activation of Casper 2.0, please follow these steps:
187
+
Casper 2.0 is coming to Mainnet in the very foreseeable future, and we're honored and excited that you and your user community are part of this massively consequential event in the history of the Casper blockchain. In order to make sure you and your users are prepared for the Mainnet activation of Casper 2.0, please follow these steps:
183
188
184
189
Determine your [current type of integration](https://docs.make.software/exchange-migration-draft#should-i-migrate-my-integration) with Casper Network
0 commit comments