Skip to content

Commit

Permalink
Delete Rosetta
Browse files Browse the repository at this point in the history
Rosetta support within chainweb-node has been deprecated now for one major version. 

Change-Id: Id00000004a575fb52362d549c988c70d928afb06
  • Loading branch information
edmundnoble committed Jan 3, 2025
1 parent d065476 commit 97b529f
Show file tree
Hide file tree
Showing 19 changed files with 8 additions and 6,009 deletions.
10 changes: 0 additions & 10 deletions chainweb.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,6 @@ library
, Chainweb.RestAPI.NodeInfo
, Chainweb.RestAPI.Orphans
, Chainweb.RestAPI.Utils
, Chainweb.Rosetta.Internal
, Chainweb.Rosetta.RestAPI
, Chainweb.Rosetta.RestAPI.Client
, Chainweb.Rosetta.RestAPI.Server
, Chainweb.Rosetta.Utils
, Chainweb.SPV
, Chainweb.SPV.CreateProof
, Chainweb.SPV.EventProof
Expand Down Expand Up @@ -440,7 +435,6 @@ library
, primitive >= 0.7.1.0
, random >= 1.2
, rocksdb-haskell-kadena >= 1.1.0
, rosetta >= 1.0
, safe-exceptions >= 0.1
, scheduler >= 1.4
, semigroupoids >= 5.3.7
Expand Down Expand Up @@ -568,7 +562,6 @@ library chainweb-test-utils
, resourcet >= 1.3
, retry >= 0.7
, rocksdb-haskell-kadena >= 1.1.0
, rosetta >= 1.0
, safe-exceptions >= 0.1
, servant >= 0.20.1
, servant-client >= 0.18.2
Expand Down Expand Up @@ -660,8 +653,6 @@ test-suite chainweb-tests
Chainweb.Test.Pact5.SPVTest
Chainweb.Test.Pact5.TransactionExecTest
Chainweb.Test.RestAPI
Chainweb.Test.Rosetta
Chainweb.Test.Rosetta.RestAPI
Chainweb.Test.Roundtrips
Chainweb.Test.SPV
Chainweb.Test.SPV.EventProof
Expand Down Expand Up @@ -731,7 +722,6 @@ test-suite chainweb-tests
, random >= 1.2
, resource-pool >= 0.4
, resourcet >= 1.3
, rosetta >= 1.0
, safe-exceptions >= 0.1
, scheduler >= 1.4
, servant-client >= 0.18.2
Expand Down
41 changes: 1 addition & 40 deletions rosetta/README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,3 @@
# Rosetta Kadena

## Testing with rosetta-cli
To validate Kadena's rosetta implementation, install [rosetta-cli](https://github.com/coinbase/rosetta-cli#install) and run one of the following commands:

1. This command validates that the Data API information in the testnet network is correct. It also ensures that the implementation does not miss any balance-changing operations.
```
rosetta-cli check:data --configuration-file rosetta-cli-conf/testnet/chain0/configTestnetChain0.json
```

2. This command validates the blockchain’s construction, signing, and broadcasting.
See `rosetta-cli-conf/testnet/chain0/testnet-chain00.ros` for an example of the types of operations supported.
_Only k:accounts transfers are currently available._
```
rosetta-cli check:construction --configuration-file rosetta-cli-conf/testnet/chain0/configTestnetChain0.json
```

3. This command validates that the Data API information in the mainnet network is correct. It also ensures that the implementation does not miss any balance-changing operations.
```
rosetta-cli check:data --configuration-file rosetta-cli-conf/mainnet/chain0/configMainnetChain0.json
```


A couple of things to note:
- The configuration files included here assume testing on chain “0”.
- To run these `rosetta-cli` commands on another chain (valid chains are chains “0” through “19”), change sub_network_identifier.network from “0” to the chain id of your choice. Chain id is expected as a string not a number.
- Replace `localhost` in the `online_url` and `offline_url` fields with the IP address of the testing node that has rosetta enabled for the network (e.g. testnet or mainnet) you’re testing.
- `testnet04` refers to tesnet, and `mainnet01` refers to mainnet.

## Funding Accounts
As part of the testing workflow of the Construction API, accounts need to be funded.

The testnet faucet for chain 1 can be found here: https://faucet.testnet.chainweb.com/

In order to fund accounts using these pre funded accounts, we suggest using https://github.com/kadena-io/kda-exchange-integration and to follow the withdrawal example.

Some clarifications on this example:
```
processWithdraw('coin', EXCHANGE_KACCOUNT, EXCHANGE_PRIVKEY, customerAddress, 10, "13").then((res) => console.log(res))
```
- `10` refers to the amount to be transferred
- `“13”` refers to the chain id where the “customerAddress” is located
chainweb-node no longer provides an implementation of the rosetta API.
52 changes: 0 additions & 52 deletions rosetta/mainnet/chain0/configMainnetChain0.json

This file was deleted.

59 changes: 0 additions & 59 deletions rosetta/testnet/chain0/configTestnetChain0.json

This file was deleted.

Loading

0 comments on commit 97b529f

Please sign in to comment.