-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds Rosetta readme * Update REAME.md * move rosetta readme to its on sub-directory
- Loading branch information
1 parent
494b934
commit dc5cd93
Showing
5 changed files
with
475 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,3 +49,4 @@ TAGS | |
*.hie | ||
.DS_Store | ||
.vscode/* | ||
rosetta/logs/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"network": { | ||
"blockchain": "kadena", | ||
"network": "mainnet01", | ||
"sub_network_identifier": { | ||
"network": "0" | ||
} | ||
}, | ||
"online_url": "http://localhost:1848/chainweb/0.0/mainnet01/rosetta", | ||
"data_directory": "logs/chain0", | ||
"http_timeout": 10, | ||
"max_retries": 5, | ||
"retry_elapsed_time": 0, | ||
"max_online_connections": 120, | ||
"max_sync_concurrency": 64, | ||
"tip_delay": 300, | ||
"max_reorg_depth": 100, | ||
"log_configuration": false, | ||
"compression_disabled": false, | ||
"memory_limit_disabled": false, | ||
"error_stack_trace_enabled": false, | ||
"construction": null, | ||
"data": { | ||
"active_reconciliation_concurrency": 16, | ||
"inactive_reconciliation_concurrency": 4, | ||
"inactive_reconciliation_frequency": 250, | ||
"log_blocks": true, | ||
"log_transactions": false, | ||
"log_balance_changes": false, | ||
"log_reconciliations": false, | ||
"ignore_reconciliation_error": false, | ||
"exempt_accounts": "", | ||
"bootstrap_balances": "", | ||
"interesting_accounts": "", | ||
"reconciliation_disabled": false, | ||
"reconciliation_drain_disabled": false, | ||
"inactive_discrepancy_search_disabled": false, | ||
"balance_tracking_disabled": false, | ||
"coin_tracking_disabled": false, | ||
"status_port": 9090, | ||
"results_output_file": "", | ||
"pruning_disabled": false, | ||
"initial_balance_fetch_disabled": false, | ||
"end_conditions": { | ||
"reconciliation_coverage": { | ||
"coverage": 0.95, | ||
"from_tip": true, | ||
"tip": true | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"network": { | ||
"blockchain": "kadena", | ||
"network": "testnet04", | ||
"sub_network_identifier": { | ||
"network": "0" | ||
} | ||
}, | ||
"online_url": "http://localhost:1848/chainweb/0.0/testnet04/rosetta", | ||
"data_directory": "logs/testnet/chain0", | ||
"http_timeout": 10, | ||
"max_retries": 5, | ||
"retry_elapsed_time": 0, | ||
"max_online_connections": 120, | ||
"max_sync_concurrency": 64, | ||
"tip_delay": 300, | ||
"max_reorg_depth": 100, | ||
"log_configuration": false, | ||
"compression_disabled": false, | ||
"memory_limit_disabled": false, | ||
"error_stack_trace_enabled": false, | ||
"construction": { | ||
"offline_url": "http://localhost:1848/chainweb/0.0/testnet04/rosetta", | ||
"constructor_dsl_file": "testnet-chain00.ros", | ||
"end_conditions": { | ||
"create_account": 10, | ||
"transfer": 20 | ||
} | ||
}, | ||
"data": { | ||
"active_reconciliation_concurrency": 16, | ||
"inactive_reconciliation_concurrency": 4, | ||
"inactive_reconciliation_frequency": 250, | ||
"log_blocks": true, | ||
"log_transactions": false, | ||
"log_balance_changes": false, | ||
"log_reconciliations": false, | ||
"ignore_reconciliation_error": false, | ||
"exempt_accounts": "", | ||
"bootstrap_balances": "", | ||
"interesting_accounts": "", | ||
"reconciliation_disabled": false, | ||
"reconciliation_drain_disabled": false, | ||
"inactive_discrepancy_search_disabled": false, | ||
"balance_tracking_disabled": false, | ||
"coin_tracking_disabled": false, | ||
"status_port": 9090, | ||
"results_output_file": "", | ||
"pruning_disabled": false, | ||
"initial_balance_fetch_disabled": false, | ||
"end_conditions": { | ||
"reconciliation_coverage": { | ||
"coverage": 0.95, | ||
"from_tip": true, | ||
"tip": true | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.