About the Construction API category

Questions about the Rosetta Construction API.

I met a problem when run the check:construction .I have successfully created an account before this.Then I want to create account ,and transfer 。Here are logs, and my configuration files
loaded configuration file: ontology-construction2.json
badger 2020/10/20 08:30:18 INFO: All 1 tables opened in 1ms
badger 2020/10/20 08:30:18 INFO: Replaying file id: 0 at offset: 4072207
badger 2020/10/20 08:30:18 INFO: Replay took: 3µs
2020/10/20 08:30:18 construction tester initialized with 1 accounts
2020/10/20 08:30:18 0 Balances Updated
2020/10/20 08:30:18 check:construction status server running on port 9090
2020/10/20 08:30:18 Added &{Index:13770181 Hash:3f10b86cafafc2c006243f4b3f865e83420160d2f845be4e20fee1127dbbd600} to cache
2020/10/20 08:30:18 Added &{Index:13770180 Hash:ce7b5cbb22b3e7e8a5b5e070d6d4b8867739fada0de2cc5e6564d757055ab332} to cache
2020/10/20 08:30:18 Added &{Index:13770179 Hash:403c48fb3961b98056c4b95471825baa438052ba5d13746e4247f1897423c229} to cache
2020/10/20 08:30:18 Added &{Index:13770178 Hash:08eef8db14dbfde851fc8db719ec67f10e1e63320a9b7bd9f2444d49366b2c64} to cache
2020/10/20 08:30:18 Added &{Index:13770177 Hash:c03fd1389ae396bf4e0c3f786bb9fe8e0dd0444f89a0419f255d28cf9ec692ba} to cache
2020/10/20 08:30:18 Added &{Index:13770176 Hash:25751f3fa81292918f66f32a3ee127c65d1370d20cca4281597006c272147898} to cache
2020/10/20 08:30:18 Added &{Index:13770175 Hash:f1ebd5a06c134a7fe14716f26566603b6ec3fde4089953548821503b27506bb7} to cache
2020/10/20 08:30:18 Added &{Index:13770174 Hash:91d14da97d309d4977257177d4de5174fe47e440cef8e0d9f510fcd5ebd403a6} to cache
2020/10/20 08:30:18 Added &{Index:13770173 Hash:8bcc06d050962bd5d10e44b4e17c39ed8a90fe238afca3d7f9bfa879196c8759} to cache
2020/10/20 08:30:18 Added &{Index:13770172 Hash:ff705dfbad1154e8e90e532cd318c56c0d57e8abfa02b32c02922aa2a5ee59d8} to cache
2020/10/20 08:30:18 Added &{Index:13770171 Hash:53429d1e72e729c7b323f309863d9b887336d0179fce880ed797c86fd459af08} to cache
2020/10/20 08:30:18 Added &{Index:13770170 Hash:f116f25e98cdfaa3b50cda70efbf9309e0f4a94f6539e3d2bb1334d565ceadc2} to cache
2020/10/20 08:30:18 Added &{Index:13770169 Hash:ce5cfb28dc53f5aca5456ba1f94282ced35035c8466e3aa3599a8333b5483050} to cache
2020/10/20 08:30:18 Added &{Index:13770168 Hash:df6b08c0e9ab4cbf1925164b1a2ef995f6fda63a539f54df9bb6eb41828ef329} to cache
2020/10/20 08:30:18 Added &{Index:13770167 Hash:d84be30147d6030b7459e78ae17ed6d29a09e1951c93ccc1b4c808e96e169f6f} to cache
2020/10/20 08:30:18 Added &{Index:13770166 Hash:2e9ce334dba6c8b683663adedf76062852236a826c7c1eab11b9504b614bb4f1} to cache
2020/10/20 08:30:18 Added &{Index:13770165 Hash:5a1429003c24ca36b8d3dbb5efc02371b06344da79ee561ed548d03299f813c6} to cache
2020/10/20 08:30:18 Added &{Index:13770164 Hash:a148efa55ab39e72279af1b68410b4b2701d412ddf0cabac81def6dd29f35126} to cache
2020/10/20 08:30:18 Added &{Index:13770163 Hash:b7bce7f59b227fae56a6a377a3ee914c27a0db107517cb0a39dc3aa170d30b78} to cache
2020/10/20 08:30:18 Added &{Index:13770162 Hash:1101464d66feccbde3530f9494688e88b0b8a2881fb43719e5ff84cf83505fdb} to cache
2020/10/20 08:30:18 processing workflow “request_funds” for job “1”
2020/10/20 08:30:18 looking for balance {“value”:“1”,“currency”:{“symbol”:“ONT”,“decimals”:0}} on account {“address”:“APLpn6hT4mbinmhWCsTPb7XUAyx6PpoAgD”}
2020/10/20 08:30:18 processing workflow “transfer”
2020/10/20 08:30:18 looking for balance {“value”:“1”,“currency”:{“symbol”:“ONT”,“decimals”:0}}
processing stalled
2020/10/20 08:30:18 check:construction status server shutting down
[MEMORY] Heap: 1104.142876MB Stack: 0.531250MB System: 1257.597893MB GCs: 5

Error: processing stalled

±-------------------------±-------------------------------±------+
| CHECK:CONSTRUCTION STATS | DESCRIPTION | VALUE |
±-------------------------±-------------------------------±------+
| Addresses Created | # of addresses created | 1 |
±-------------------------±-------------------------------±------+
| Transactions Created | # of transactions created | 0 |
±-------------------------±-------------------------------±------+
| Stale Broadcasts | # of broadcasts missing after | 0 |
| | stale depth | |
±-------------------------±-------------------------------±------+
| Transactions Confirmed | # of transactions seen | 0 |
| | on-chain | |
±-------------------------±-------------------------------±------+
| Failed Broadcasts | # of transactions that | 0 |
| | exceeded broadcast limit | |
±-------------------------±-------------------------------±------+
±-----------------------------±------+
| CHECK:CONSTRUCTION WORKFLOWS | COUNT |
±-----------------------------±------+
| create_account | 1 |
±-----------------------------±------+
| transfer | 0 |
±-----------------------------±------+

Error: processing stalled
Usage:
rosetta-cli check:construction [flags]

Flags:
-h, --help help for check:construction

Global Flags:
–configuration-file string Configuration file that provides connection and test settings.
If you would like to generate a starter configuration file (populated
with the defaults), run rosetta-cli configuration:create.

                                Any fields not populated in the configuration file will be populated with
                                default values.
  --cpu-profile string          Save the pprof cpu profile in the specified file
  --mem-profile string          Save the pprof mem profile in the specified file

Command Failed: processing stalled

{
“network”: {
“blockchain”: “ont”,
“network”: “testnet”
},
“online_url”: “http://localhost:8080”,
“data_directory”: “./ont-data”,
“http_timeout”: 200,
“max_retries”: 5,
“retry_elapsed_time”: 0,
“max_online_connections”: 120,
“max_sync_concurrency”: 64,
“tip_delay”: 300,
“log_configuration”: false,
“construction”: {
“offline_url”: “”,
“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,
“constructor_dsl_file”: “ontology.ros”,
“end_conditions”: {
“create_account”: 100,
“transfer”: 10
}
},
“data”: {
“active_reconciliation_concurrency”: 0,
“inactive_reconciliation_concurrency”: 0,
“inactive_reconciliation_frequency”: 0,
“log_blocks”: false,
“log_transactions”: false,
“log_balance_changes”: false,
“log_reconciliations”: false,
“ignore_reconciliation_error”: false,
“exempt_accounts”: “”,
“bootstrap_balances”: “”,

“interesting_accounts”: “”,
“reconciliation_disabled”: false,
“inactive_discrepency_search_disabled”: false,
“balance_tracking_disabled”: false,
“coin_tracking_disabled”: false,
“end_conditions”: {
“reconciliation_coverage”: {
“coverage”:0.95,
“from_tip”: true
}
},
“results_output_file”: “./result.json”
}
}

ontology.ros:

create_account(1){
create{
network = {“network”:“testnet”, “blockchain”:“ont”};
key = generate_key({“curve_type”: “secp256k1”});
account = derive({
“network_identifier”: {{network}},
“public_key”: {{key.public_key}}
});
print_message({“account”:{{account.account_identifier}}});

// If the account is not saved, the key will be lost!
save_account({
  "account_identifier": {{account.account_identifier}},
  "keypair": {{key}}
});
    print_message("saveAccount success!!!");

}
}
transfer(10){
transfer{
transfer.network = {“network”:“testnet”, “blockchain”:“ont”};
currency = {“symbol”:“ONT”, “decimals”:0};
sender = find_balance({
“minimum_balance”:{
“value”: “1”,
“currency”: {{currency}}
}
});

// Set the recipient_amount as some value <= sender.balance-max_fee
// max_fee = "84000000000000";
available_amount = {{sender.balance.value}}};
recipient_amount = random_number({"minimum": "1", "maximum": {{available_amount}}});
print_message({"recipient_amount":{{recipient_amount}}});

// Find recipient and construct operations
sender_amount = 0 - {{recipient_amount}};
recipient = find_balance({
  "not_account_identifier":[{{sender.account_identifier}}],
  "minimum_balance":{
    "value": "0",
    "currency": {{currency}}
  },
  "create_limit": 100,
  "create_probability": 50
});
transfer.confirmation_depth = "1";
transfer.operations = [
  {
    "operation_identifier":{"index":0},
    "type":"transfer",
    "account":{{sender.account_identifier}},
    "amount":{
      "value":{{sender_amount}},
      "currency":{{currency}}
    }
  },
  {
    "operation_identifier":{"index":1},
    "type":"transfer",
    "account":{{recipient.account_identifier}},
    "amount":{
      "value":{{recipient_amount}},
      "currency":{{currency}}
    }
  }
];

}
}