diff --git a/rosetta-cli-conf/mainnet/config.json b/rosetta-cli-conf/mainnet/config.json index be17d0a..dfbbfce 100644 --- a/rosetta-cli-conf/mainnet/config.json +++ b/rosetta-cli-conf/mainnet/config.json @@ -3,7 +3,7 @@ "blockchain": "Bitcoin", "network": "Mainnet" }, - "data_directory": "bitcoin-mainnet-data", + "data_directory": "cli-data", "http_timeout": 300, "max_retries": 5, "retry_elapsed_time": 0, @@ -11,351 +11,6 @@ "max_sync_concurrency": 0, "tip_delay": 1800, "log_configuration": false, - "construction": { - "max_offline_connections": 0, - "stale_depth": 0, - "broadcast_limit": 0, - "ignore_broadcast_failures": false, - "clear_broadcasts": false, - "broadcast_behind_tip": false, - "block_broadcast_limit": 0, - "rebroadcast_all": false, - "workflows": [ - { - "name": "request_funds", - "concurrency": 1, - "scenarios": [ - { - "name": "find_account", - "actions": [ - { - "input": "{\"symbol\":\"BTC\", \"decimals\":8}", - "type": "set_variable", - "output_path": "currency" - }, - { - "input": "{\"minimum_balance\":{\"value\": \"0\", \"currency\": {{currency}}}, \"create_limit\":1}", - "type": "find_balance", - "output_path": "random_account" - } - ] - }, - { - "name": "request", - "actions": [ - { - "input": "{\"account_identifier\": {{random_account.account_identifier}}, \"minimum_balance\":{\"value\": \"1000000\", \"currency\": {{currency}}}}", - "type": "find_balance", - "output_path": "loaded_account" - } - ] - } - ] - }, - { - "name": "create_account", - "concurrency": 1, - "scenarios": [ - { - "name": "create_account", - "actions": [ - { - "input": "{\"network\":\"Mainnet\", \"blockchain\":\"Bitcoin\"}", - "type": "set_variable", - "output_path": "network" - }, - { - "input": "{\"curve_type\": \"secp256k1\"}", - "type": "generate_key", - "output_path": "key" - }, - { - "input": "{\"network_identifier\": {{network}}, \"public_key\": {{key.public_key}}}", - "type": "derive", - "output_path": "account" - }, - { - "input": "{\"account_identifier\": {{account.account_identifier}}, \"keypair\": {{key}}}", - "type": "save_account" - } - ] - } - ] - }, - { - "name": "transfer", - "concurrency": 10, - "scenarios": [ - { - "name": "transfer_dry_run", - "actions": [ - { - "input": "{\"network\":\"Mainnet\", \"blockchain\":\"Bitcoin\"}", - "type": "set_variable", - "output_path": "transfer_dry_run.network" - }, - { - "input": "{\"symbol\":\"BTC\", \"decimals\":8}", - "type": "set_variable", - "output_path": "currency" - }, - { - "input": "\"600\"", - "type": "set_variable", - "output_path": "dust_amount" - }, - { - "input": "\"1200\"", - "type": "set_variable", - "output_path": "max_fee_amount" - }, - { - "input": "{\"operation\":\"addition\", \"left_value\": {{dust_amount}}, \"right_value\": {{max_fee_amount}}}", - "type": "math", - "output_path": "send_buffer" - }, - { - "input": "\"2400\"", - "type": "set_variable", - "output_path": "reserved_amount" - }, - { - "input": "{\"require_coin\":true, \"minimum_balance\":{\"value\": {{reserved_amount}}, \"currency\": {{currency}}}}", - "type": "find_balance", - "output_path": "sender" - }, - { - "input": "{\"operation\":\"subtraction\", \"left_value\": {{sender.balance.value}}, \"right_value\": {{send_buffer}}}", - "type": "math", - "output_path": "available_amount" - }, - { - "input": "{\"minimum\": {{dust_amount}}, \"maximum\": {{available_amount}}}", - "type": "random_number", - "output_path": "recipient_amount" - }, - { - "input": "{\"recipient_amount\":{{recipient_amount}}}", - "type": "print_message" - }, - { - "input": "{\"operation\":\"subtraction\", \"left_value\": {{sender.balance.value}}, \"right_value\": {{recipient_amount}}}", - "type": "math", - "output_path": "total_change_amount" - }, - { - "input": "{\"operation\":\"subtraction\", \"left_value\": {{total_change_amount}}, \"right_value\": {{max_fee_amount}}}", - "type": "math", - "output_path": "change_amount" - }, - { - "input": "{\"change_amount\":{{change_amount}}}", - "type": "print_message" - }, - { - "input": "{\"operation\":\"subtraction\", \"left_value\": \"0\", \"right_value\":{{sender.balance.value}}}", - "type": "math", - "output_path": "sender_amount" - }, - { - "input": "{\"not_account_identifier\":[{{sender.account_identifier}}], \"not_coins\":[{{sender.coin}}], \"minimum_balance\":{\"value\": \"0\", \"currency\": {{currency}}}, \"create_limit\": 100, \"create_probability\": 50}", - "type": "find_balance", - "output_path": "recipient" - }, - { - "input": "\"1\"", - "type": "set_variable", - "output_path": "transfer_dry_run.confirmation_depth" - }, - { - "input": "\"true\"", - "type": "set_variable", - "output_path": "transfer_dry_run.dry_run" - }, - { - "input": "[{\"operation_identifier\":{\"index\":0},\"type\":\"INPUT\",\"account\":{{sender.account_identifier}},\"amount\":{\"value\":{{sender_amount}},\"currency\":{{currency}}}, \"coin_change\":{\"coin_action\":\"coin_spent\", \"coin_identifier\":{{sender.coin}}}},{\"operation_identifier\":{\"index\":1},\"type\":\"OUTPUT\",\"account\":{{recipient.account_identifier}},\"amount\":{\"value\":{{recipient_amount}},\"currency\":{{currency}}}}, {\"operation_identifier\":{\"index\":2},\"type\":\"OUTPUT\",\"account\":{{sender.account_identifier}},\"amount\":{\"value\":{{change_amount}},\"currency\":{{currency}}}}]", - "type": "set_variable", - "output_path": "transfer_dry_run.operations" - }, - { - "input": "{{transfer_dry_run.operations}}", - "type": "print_message" - } - ] - }, - { - "name": "transfer", - "actions": [ - { - "input": "{\"currency\":{{currency}}, \"amounts\":{{transfer_dry_run.suggested_fee}}}", - "type": "find_currency_amount", - "output_path": "suggested_fee" - }, - { - "input": "{\"operation\":\"subtraction\", \"left_value\": {{total_change_amount}}, \"right_value\": {{suggested_fee.value}}}", - "type": "math", - "output_path": "change_amount" - }, - { - "input": "{\"operation\":\"subtraction\", \"left_value\": {{change_amount}}, \"right_value\": {{dust_amount}}}", - "type": "math", - "output_path": "change_minus_dust" - }, - { - "input": "{{change_minus_dust}}", - "type": "assert" - }, - { - "input": "{\"network\":\"Mainnet\", \"blockchain\":\"Bitcoin\"}", - "type": "set_variable", - "output_path": "transfer.network" - }, - { - "input": "\"1\"", - "type": "set_variable", - "output_path": "transfer.confirmation_depth" - }, - { - "input": "[{\"operation_identifier\":{\"index\":0},\"type\":\"INPUT\",\"account\":{{sender.account_identifier}},\"amount\":{\"value\":{{sender_amount}},\"currency\":{{currency}}}, \"coin_change\":{\"coin_action\":\"coin_spent\", \"coin_identifier\":{{sender.coin}}}},{\"operation_identifier\":{\"index\":1},\"type\":\"OUTPUT\",\"account\":{{recipient.account_identifier}},\"amount\":{\"value\":{{recipient_amount}},\"currency\":{{currency}}}}, {\"operation_identifier\":{\"index\":2},\"type\":\"OUTPUT\",\"account\":{{sender.account_identifier}},\"amount\":{\"value\":{{change_amount}},\"currency\":{{currency}}}}]", - "type": "set_variable", - "output_path": "transfer.operations" - }, - { - "input": "{{transfer.operations}}", - "type": "print_message" - } - ] - } - ] - }, - { - "name": "return_funds", - "concurrency": 10, - "scenarios": [ - { - "name": "transfer_dry_run", - "actions": [ - { - "input": "{\"network\":\"Mainnet\", \"blockchain\":\"Bitcoin\"}", - "type": "set_variable", - "output_path": "transfer_dry_run.network" - }, - { - "input": "{\"symbol\":\"BTC\", \"decimals\":8}", - "type": "set_variable", - "output_path": "currency" - }, - { - "input": "\"1200\"", - "type": "set_variable", - "output_path": "max_fee_amount" - }, - { - "input": "\"1800\"", - "type": "set_variable", - "output_path": "reserved_amount" - }, - { - "input": "{\"require_coin\":true, \"minimum_balance\":{\"value\": {{reserved_amount}}, \"currency\": {{currency}}}}", - "type": "find_balance", - "output_path": "sender" - }, - { - "input": "{\"operation\":\"subtraction\", \"left_value\": {{sender.balance.value}}, \"right_value\": {{max_fee_amount}}}", - "type": "math", - "output_path": "recipient_amount" - }, - { - "input": "{\"recipient_amount\":{{recipient_amount}}}", - "type": "print_message" - }, - { - "input": "{\"operation\":\"subtraction\", \"left_value\": \"0\", \"right_value\":{{sender.balance.value}}}", - "type": "math", - "output_path": "sender_amount" - }, - { - "input": "\"1\"", - "type": "set_variable", - "output_path": "transfer_dry_run.confirmation_depth" - }, - { - "input": "\"true\"", - "type": "set_variable", - "output_path": "transfer_dry_run.dry_run" - }, - { - "input": "{\"address\": \"mkHS9ne12qx9pS9VojpwU5xtRd4T7X7ZUt\"}", - "type": "set_variable", - "output_path": "recipient" - }, - { - "input": "[{\"operation_identifier\":{\"index\":0},\"type\":\"INPUT\",\"account\":{{sender.account_identifier}},\"amount\":{\"value\":{{sender_amount}},\"currency\":{{currency}}}, \"coin_change\":{\"coin_action\":\"coin_spent\", \"coin_identifier\":{{sender.coin}}}},{\"operation_identifier\":{\"index\":1},\"type\":\"OUTPUT\",\"account\":{{recipient}},\"amount\":{\"value\":{{recipient_amount}},\"currency\":{{currency}}}}]", - "type": "set_variable", - "output_path": "transfer_dry_run.operations" - }, - { - "input": "{{transfer_dry_run.operations}}", - "type": "print_message" - } - ] - }, - { - "name": "transfer", - "actions": [ - { - "input": "{\"currency\":{{currency}}, \"amounts\":{{transfer_dry_run.suggested_fee}}}", - "type": "find_currency_amount", - "output_path": "suggested_fee" - }, - { - "input": "{\"operation\":\"subtraction\", \"left_value\": {{sender.balance.value}}, \"right_value\": {{suggested_fee.value}}}", - "type": "math", - "output_path": "recipient_amount" - }, - { - "input": "\"600\"", - "type": "set_variable", - "output_path": "dust_amount" - }, - { - "input": "{\"operation\":\"subtraction\", \"left_value\": {{recipient_amount}}, \"right_value\": {{dust_amount}}}", - "type": "math", - "output_path": "recipient_minus_dust" - }, - { - "input": "{{recipient_minus_dust}}", - "type": "assert" - }, - { - "input": "{\"network\":\"Mainnet\", \"blockchain\":\"Bitcoin\"}", - "type": "set_variable", - "output_path": "transfer.network" - }, - { - "input": "\"1\"", - "type": "set_variable", - "output_path": "transfer.confirmation_depth" - }, - { - "input": "[{\"operation_identifier\":{\"index\":0},\"type\":\"INPUT\",\"account\":{{sender.account_identifier}},\"amount\":{\"value\":{{sender_amount}},\"currency\":{{currency}}}, \"coin_change\":{\"coin_action\":\"coin_spent\", \"coin_identifier\":{{sender.coin}}}},{\"operation_identifier\":{\"index\":1},\"type\":\"OUTPUT\",\"account\":{{recipient}},\"amount\":{\"value\":{{recipient_amount}},\"currency\":{{currency}}}}]", - "type": "set_variable", - "output_path": "transfer.operations" - }, - { - "input": "{{transfer.operations}}", - "type": "print_message" - } - ] - } - ] - } - ], - "end_conditions": { - "create_account": 10, - "transfer": 10 - } - }, "data": { "active_reconciliation_concurrency": 0, "inactive_reconciliation_concurrency": 0, diff --git a/rosetta-cli-conf/testnet/config.json b/rosetta-cli-conf/testnet/config.json index c73810f..e0e649c 100644 --- a/rosetta-cli-conf/testnet/config.json +++ b/rosetta-cli-conf/testnet/config.json @@ -3,7 +3,7 @@ "blockchain": "Bitcoin", "network": "Testnet3" }, - "data_directory": "bitcoin-testnet-data", + "data_directory": "cli-data", "http_timeout": 300, "max_retries": 5, "retry_elapsed_time": 0,