How to Disable Complex Checks
Overview
Before you test your Rosetta API implementation, we recommend that you disable balance tracking and reconciliation. Balance tracking checks that the balance for an address does not go below zero. Reconciliation ensures that the balance that you calculated matches the balance returned by the /account/balance endpoint.
Reminder: After you have completed testing your Rosetta API implementation, you need to enable these complex checks again! Your Rosetta API implementation is complete when these complex checks pass the rosetta-cli tool testing.
You can manage balance tracking with the balance_tracking_disabled field. To manage reconciliation, edit the value of the reconciliation_disabled field. These fields are part of the data object of the Rosetta API configuration file.
Disabling and Enabling Complex Checks
To disable and enable balance tracking and reconciliation, perform the following steps:
- Disable balance tracking and reconciliation in your Rosetta API implementation (the
configfile). Set the values for thereconciliation_disabledandbalance_tracking_disabledfields totrue. - Run the
check:dataandcheck:constructiontests with therosetta-clitool. (Read our How to Test your Rosetta API Implementation documentation.) - Enable balance tracking and reconciliation in your Rosetta API implementation by setting the values of the
reconciliation_disabledandbalance_tracking_disabledfields tofalse. - Run the
check:dataandcheck:constructiontests again.
Your Rosetta API implementation is now complete.
Sample configurations
Checks disabled
{
"network":{
"blockchain":"Ethereum",
"network":"Ropsten"
},
"online_url":"http://localhost:8080",
"data_directory":"",
"http_timeout":10,
"tip_delay":300,
"data":{
"historical_balance_disabled":true,
"reconciliation_disabled":true,
"inactive_discrepancy_search_disabled":true,
"balance_tracking_disabled":true,
"end_conditions":{
"tip":true
}
}
}
Checks enabled
{
"network":{
"blockchain":"Ethereum",
"network":"Ropsten"
},
"online_url":"http://localhost:8080",
"data_directory":"",
"http_timeout":10,
"tip_delay":300,
"data":{
"historical_balance_disabled":false,
"reconciliation_disabled":false,
"inactive_discrepancy_search_disabled":true,
"balance_tracking_disabled":false,
"end_conditions":{
"tip":true
}
}
}