Repository: coinbase/rosetta-cli (go)

Issue:
Unable to use online node to fetch metadata for Construction API
Hi there! :wave:

**Describe the bug**
When testing our implementation of the rosetta Construction API, we had the `offline_url` of our construction config point to a node running in offline mode (so it has no peers and cannot sync). We use the `/construction/metadata` endpoint to fetch the correct chain state to construct a valid transaction (i.e: account nonce). However, upon tx submission, we saw a nonce too low error. And when inspecting the offline node's logs, we saw that the `/construction/metadata` was called:
```
2020-10-13 01:23:02 Rosetta: POST /network/status 7.7785ms
2020-10-13 01:23:13 Rosetta: POST /network/options 2.8427ms
2020-10-13 01:23:41 Rosetta: POST /construction/derive 2.1652ms
2020-10-13 01:23:41 Rosetta: POST /construction/preprocess 1.6202ms
2020-10-13 01:23:41 Rosetta: POST /construction/metadata 20.4031ms
2020-10-13 01:23:41 Rosetta: POST /construction/payloads 1.9367ms
2020-10-13 01:23:41 Rosetta: POST /construction/parse 2.512ms
2020-10-13 01:23:41 Rosetta: POST /construction/combine 1.8065ms
2020-10-13 01:23:41 Rosetta: POST /construction/parse 1.9807ms
2020-10-13 01:23:41 Rosetta: POST /construction/hash 176.8µs
```

**To Reproduce**
Steps to reproduce the behavior:
1) Set up any 2 implementations of the Rosetta construction API on any network (say.. eth), where one is offline and one is online. 
2) Create a construction config and set `offline_url` to the offline node.
3) Run the construction check, i.e:
```
rosetta-cli check:construction --configuration-file ./examples/configuration/ethereum.json
```
4) Inspect the endpoint calls on the offline node.

**Expected behavior**
Since the Construction API spec [here](https://www.rosetta-api.org/docs/construction_api_introduction.html#completely-offline) states that `/construction/metadata` can be used to fetch dynamic information, like an account's nonce, we believe that it should not be requested from the offline node. 

**Additional context**
* Our construction config can be found [here](https://github.com/Daniel-VDM/rosetta-cli/blob/f8a6b805540334d490f6094018d239afc2232ae6/examples/configuration/harmony.json)

* Here are our construction check logs from rosetta-cli
```
2020/10/12 19:47:27 construction tester initialized with 1 accounts
2020/10/12 19:47:27 Setting account one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3 balance to 8690739416626963184046359690 &{Symbol:ONE Decimals:18 Metadata:map[]}
2020/10/12 19:47:27 1 Balances Updated
2020/10/12 19:47:27 check:construction status server running on port 9090
2020/10/12 19:47:27 cleared 0 broadcasts
2020/10/12 19:47:27 Syncing 81
2020/10/12 19:47:28 processing workflow "transfer"
2020/10/12 19:47:28 looking for balance {"value":"10000000000000000","currency":{"symbol":"ONE","decimals":18}}
2020/10/12 19:47:28 looking for balance {"value":"0","currency":{"symbol":"ONE","decimals":18}} != to accounts [{"address":"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3","metadata":{"hex_address":"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34"}}]
2020/10/12 19:47:28 processing workflow "create_account"
2020/10/12 19:47:28 REQUEST /construction/derive network_identifier:{"blockchain":"Harmony","network":"Testnet","sub_network_identifier":{"network":"shard 0","metadata":{"is_beacon":true}}} public_key:{"hex_bytes":"0318616aa8f47c1115cd46a786a8176d7eb8c6752fbea6de2e4174ad21ee4e57e0","curve_type":"secp256k1"} metadata:null
2020/10/12 19:47:28 RESPONSE /construction/derive account_identifier:{"address":"one13dtqnwh23766ndf50vw9qufz2h3an490e87ehl","metadata":{"hex_address":"0x8b5609bAea8fb5A9B5347B1c50712255e3d9d4AF"}} metadata:null
2020/10/12 19:47:28 processed workflow "create_account" for job "0"
2020/10/12 19:47:28 processing workflow "transfer"
2020/10/12 19:47:28 looking for balance {"value":"10000000000000000","currency":{"symbol":"ONE","decimals":18}}
2020/10/12 19:47:28 looking for balance {"value":"0","currency":{"symbol":"ONE","decimals":18}} != to accounts [{"address":"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3","metadata":{"hex_address":"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34"}}]
2020/10/12 19:47:28 processing workflow "create_account"
2020/10/12 19:47:28 REQUEST /construction/derive network_identifier:{"blockchain":"Harmony","network":"Testnet","sub_network_identifier":{"network":"shard 0","metadata":{"is_beacon":true}}} public_key:{"hex_bytes":"03f519d50b1ff5af99ea5ad6e93f371342100c8bde79726a0df27433b4a0e458f6","curve_type":"secp256k1"} metadata:null
2020/10/12 19:47:28 RESPONSE /construction/derive account_identifier:{"address":"one1nst5e6dcs45ec83wewj5nqu5nzf9t2qpnh45sw","metadata":{"hex_address":"0x9C174ce9B885699C1e2ecBA5498394989255a801"}} metadata:null
2020/10/12 19:47:28 processed workflow "create_account" for job "1"
2020/10/12 19:47:28 processing workflow "transfer"
2020/10/12 19:47:28 looking for balance {"value":"10000000000000000","currency":{"symbol":"ONE","decimals":18}}
2020/10/12 19:47:28 looking for balance {"value":"0","currency":{"symbol":"ONE","decimals":18}} != to accounts [{"address":"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3","metadata":{"hex_address":"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34"}}]
2020/10/12 19:47:28 processing workflow "create_account"
2020/10/12 19:47:28 REQUEST /construction/derive network_identifier:{"blockchain":"Harmony","network":"Testnet","sub_network_identifier":{"network":"shard 0","metadata":{"is_beacon":true}}} public_key:{"hex_bytes":"0238747ade67a7e0d7342ef09884416b2dee6c74b9475209ec6bda01bdb5e4a3ff","curve_type":"secp256k1"} metadata:null
2020/10/12 19:47:28 RESPONSE /construction/derive account_identifier:{"address":"one1snvtzgfrjfpa7ryxwc49gm2ywv2zp4ntt0k8ua","metadata":{"hex_address":"0x84D8B121239243DF0C86762a546D44731420D66B"}} metadata:null
2020/10/12 19:47:28 processed workflow "create_account" for job "2"
2020/10/12 19:47:28 processing workflow "transfer"
2020/10/12 19:47:28 looking for balance {"value":"10000000000000000","currency":{"symbol":"ONE","decimals":18}}
2020/10/12 19:47:28 looking for balance {"value":"0","currency":{"symbol":"ONE","decimals":18}} != to accounts [{"address":"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3","metadata":{"hex_address":"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34"}}]
2020/10/12 19:47:28 processing workflow "create_account"
2020/10/12 19:47:28 REQUEST /construction/derive network_identifier:{"blockchain":"Harmony","network":"Testnet","sub_network_identifier":{"network":"shard 0","metadata":{"is_beacon":true}}} public_key:{"hex_bytes":"03c0c6c0629f7e8a983d25e744ff6019fae9e6bca12dac5f96132318ab51abcb24","curve_type":"secp256k1"} metadata:null
2020/10/12 19:47:28 RESPONSE /construction/derive account_identifier:{"address":"one1m4xneklse7yuqwjxnw6h926wunge9nrttth5mv","metadata":{"hex_address":"0xdd4d3CdBf0cf89c03A469bb572aB4eE4D192cC6b"}} metadata:null
2020/10/12 19:47:28 processed workflow "create_account" for job "3"
2020/10/12 19:47:28 processing workflow "transfer"
2020/10/12 19:47:28 looking for balance {"value":"10000000000000000","currency":{"symbol":"ONE","decimals":18}}
2020/10/12 19:47:28 looking for balance {"value":"0","currency":{"symbol":"ONE","decimals":18}} != to accounts [{"address":"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3","metadata":{"hex_address":"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34"}}]
2020/10/12 19:47:28 processing workflow "create_account"
2020/10/12 19:47:28 REQUEST /construction/derive network_identifier:{"blockchain":"Harmony","network":"Testnet","sub_network_identifier":{"network":"shard 0","metadata":{"is_beacon":true}}} public_key:{"hex_bytes":"03014bbd11905a93dc90ca9c07935b6981aa8f2cf951ab288ad3346e6f37f29013","curve_type":"secp256k1"} metadata:null
2020/10/12 19:47:28 RESPONSE /construction/derive account_identifier:{"address":"one15ws7gjzdud9n358049jqrtng05z8ynx9ppq89w","metadata":{"hex_address":"0xa3a1e4484dE34b38d0efA96401AE687d04724CC5"}} metadata:null
2020/10/12 19:47:28 processed workflow "create_account" for job "4"
2020/10/12 19:47:28 processing workflow "transfer"
2020/10/12 19:47:28 looking for balance {"value":"10000000000000000","currency":{"symbol":"ONE","decimals":18}}
2020/10/12 19:47:28 looking for balance {"value":"0","currency":{"symbol":"ONE","decimals":18}} != to accounts [{"address":"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3","metadata":{"hex_address":"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34"}}]
2020/10/12 19:47:28 REQUEST /construction/preprocess network_identifier:{"blockchain":"Harmony","network":"Testnet","sub_network_identifier":{"network":"shard 0","metadata":{"is_beacon":true}}} intent:[{"operation_identifier":{"index":0},"type":"Transfer","status":"","account":{"address":"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3","metadata":{"hex_address":"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34"}},"amount":{"value":"-204050090605710200071380416","currency":{"symbol":"ONE","decimals":18}}},{"operation_identifier":{"index":1},"related_operations":[{"index":0}],"type":"Transfer","status":"","account":{"address":"one13dtqnwh23766ndf50vw9qufz2h3an490e87ehl","metadata":{"hex_address":"0x8b5609bAea8fb5A9B5347B1c50712255e3d9d4AF"}},"amount":{"value":"204050090605710200071380416","currency":{"symbol":"ONE","decimals":18}}}] metadata:null
2020/10/12 19:47:28 RESPONSE /construction/preprocess options:{"operation_type":"Transfer","transaction_metadata":{}} required_public_keys:[{"address":"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3","metadata":{"hex_address":"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34"}}]
2020/10/12 19:47:28 REQUEST /construction/metadata network_identifier:{"blockchain":"Harmony","network":"Testnet","sub_network_identifier":{"network":"shard 0","metadata":{"is_beacon":true}}} metadata:{"operation_type":"Transfer","transaction_metadata":{}} public_keys:[{"hex_bytes":"035511a8279528f916b85b875cc69bbee575110221c473de8c16e83bcf802e76ec","curve_type":"secp256k1"}]
2020/10/12 19:47:28 RESPONSE /construction/metadata metadata:{"gas_limit":21000,"gas_price":1000000000,"nonce":0,"transaction_metadata":{}} suggested_fee:[{"value":"21000000000000","currency":{"symbol":"ONE","decimals":18}}]
2020/10/12 19:47:28 REQUEST /construction/payloads network_identifier:{"blockchain":"Harmony","network":"Testnet","sub_network_identifier":{"network":"shard 0","metadata":{"is_beacon":true}}} intent:[{"operation_identifier":{"index":0},"type":"Transfer","status":"","account":{"address":"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3","metadata":{"hex_address":"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34"}},"amount":{"value":"-204050090605710200071380416","currency":{"symbol":"ONE","decimals":18}}},{"operation_identifier":{"index":1},"related_operations":[{"index":0}],"type":"Transfer","status":"","account":{"address":"one13dtqnwh23766ndf50vw9qufz2h3an490e87ehl","metadata":{"hex_address":"0x8b5609bAea8fb5A9B5347B1c50712255e3d9d4AF"}},"amount":{"value":"204050090605710200071380416","currency":{"symbol":"ONE","decimals":18}}}] public_keys:[{"hex_bytes":"035511a8279528f916b85b875cc69bbee575110221c473de8c16e83bcf802e76ec","curve_type":"secp256k1"}]
2020/10/12 19:47:28 RESPONSE /construction/payloads unsigned_transaction:"{\"rlp_bytes\":\"8ICEO5rKAIJSCICAlItWCbrqj7WptTR7HFBxIlXj2dSvi6jJSZOXY2Jgfd3AgICAgA==\",\"is_staking\":false,\"from\":{\"address\":\"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3\",\"metadata\":{\"hex_address\":\"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34\"}}}" payloads:[{"address":"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3","hex_bytes":"ee657083a1d41278ebdee56420b6e26079aafdb5707720be9e3723a08d99186e","account_identifier":{"address":"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3","metadata":{"hex_address":"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34"}},"signature_type":"ecdsa_recovery"}]
2020/10/12 19:47:28 REQUEST /construction/parse network_identifier:{"blockchain":"Harmony","network":"Testnet","sub_network_identifier":{"network":"shard 0","metadata":{"is_beacon":true}}} signed:false transaction:"{\"rlp_bytes\":\"8ICEO5rKAIJSCICAlItWCbrqj7WptTR7HFBxIlXj2dSvi6jJSZOXY2Jgfd3AgICAgA==\",\"is_staking\":false,\"from\":{\"address\":\"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3\",\"metadata\":{\"hex_address\":\"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34\"}}}"
2020/10/12 19:47:28 RESPONSE /construction/parse operations:[{"operation_identifier":{"index":0},"type":"Gas","status":"","account":{"address":"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3","metadata":{"hex_address":"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34"}},"amount":{"value":"-21000000000000","currency":{"symbol":"ONE","decimals":18}}},{"operation_identifier":{"index":1},"related_operations":[{"index":0}],"type":"Transfer","status":"","account":{"address":"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3","metadata":{"hex_address":"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34"}},"amount":{"value":"-204050090605710200071380416","currency":{"symbol":"ONE","decimals":18}}},{"operation_identifier":{"index":2},"related_operations":[{"index":1}],"type":"Transfer","status":"","account":{"address":"one13dtqnwh23766ndf50vw9qufz2h3an490e87ehl","metadata":{"hex_address":"0x8b5609bAea8fb5A9B5347B1c50712255e3d9d4AF"}},"amount":{"value":"204050090605710200071380416","currency":{"symbol":"ONE","decimals":18}}}] signers:null metadata:null
2020/10/12 19:47:28 REQUEST /construction/combine network_identifier:{"blockchain":"Harmony","network":"Testnet","sub_network_identifier":{"network":"shard 0","metadata":{"is_beacon":true}}} unsigned_transaction:"{\"rlp_bytes\":\"8ICEO5rKAIJSCICAlItWCbrqj7WptTR7HFBxIlXj2dSvi6jJSZOXY2Jgfd3AgICAgA==\",\"is_staking\":false,\"from\":{\"address\":\"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3\",\"metadata\":{\"hex_address\":\"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34\"}}}" signatures:[{"hex_bytes":"376281ba02c7ee57a7261dd93694c5c65cbd5001983f6d3c456812b51ba83bff3a51becb3667baf376f8936df1588750f06fe08f8e122c4d7509c30b75eaa58601","signing_payload":{"address":"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3","hex_bytes":"ee657083a1d41278ebdee56420b6e26079aafdb5707720be9e3723a08d99186e","account_identifier":{"address":"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3","metadata":{"hex_address":"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34"}},"signature_type":"ecdsa_recovery"},"public_key":{"hex_bytes":"035511a8279528f916b85b875cc69bbee575110221c473de8c16e83bcf802e76ec","curve_type":"secp256k1"},"signature_type":"ecdsa_recovery"}]
2020/10/12 19:47:28 RESPONSE /construction/combine network_transaction:"{\"rlp_bytes\":\"+HCAhDuaygCCUgiAgJSLVgm66o+1qbU0exxQcSJV49nUr4uoyUmTl2NiYH3dwIAooDdigboCx+5XpyYd2TaUxcZcvVABmD9tPEVoErUbqDv/oDpRvss2Z7rzdviTbfFYh1Dwb+CPjhIsTXUJwwt16qWG\",\"is_staking\":false,\"from\":{\"address\":\"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3\",\"metadata\":{\"hex_address\":\"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34\"}}}"
2020/10/12 19:47:28 REQUEST /construction/parse network_identifier:{"blockchain":"Harmony","network":"Testnet","sub_network_identifier":{"network":"shard 0","metadata":{"is_beacon":true}}} signed:true transaction:"{\"rlp_bytes\":\"+HCAhDuaygCCUgiAgJSLVgm66o+1qbU0exxQcSJV49nUr4uoyUmTl2NiYH3dwIAooDdigboCx+5XpyYd2TaUxcZcvVABmD9tPEVoErUbqDv/oDpRvss2Z7rzdviTbfFYh1Dwb+CPjhIsTXUJwwt16qWG\",\"is_staking\":false,\"from\":{\"address\":\"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3\",\"metadata\":{\"hex_address\":\"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34\"}}}"
2020/10/12 19:47:28 RESPONSE /construction/parse operations:[{"operation_identifier":{"index":0},"type":"Gas","status":"","account":{"address":"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3","metadata":{"hex_address":"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34"}},"amount":{"value":"-21000000000000","currency":{"symbol":"ONE","decimals":18}}},{"operation_identifier":{"index":1},"related_operations":[{"index":0}],"type":"Transfer","status":"","account":{"address":"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3","metadata":{"hex_address":"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34"}},"amount":{"value":"-204050090605710200071380416","currency":{"symbol":"ONE","decimals":18}}},{"operation_identifier":{"index":2},"related_operations":[{"index":1}],"type":"Transfer","status":"","account":{"address":"one13dtqnwh23766ndf50vw9qufz2h3an490e87ehl","metadata":{"hex_address":"0x8b5609bAea8fb5A9B5347B1c50712255e3d9d4AF"}},"amount":{"value":"204050090605710200071380416","currency":{"symbol":"ONE","decimals":18}}}] signers:[{"address":"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3","metadata":{"hex_address":"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34"}}] metadata:null
2020/10/12 19:47:28 REQUEST /construction/hash network_identifier:{"blockchain":"Harmony","network":"Testnet","sub_network_identifier":{"network":"shard 0","metadata":{"is_beacon":true}}} network_transaction:"{\"rlp_bytes\":\"+HCAhDuaygCCUgiAgJSLVgm66o+1qbU0exxQcSJV49nUr4uoyUmTl2NiYH3dwIAooDdigboCx+5XpyYd2TaUxcZcvVABmD9tPEVoErUbqDv/oDpRvss2Z7rzdviTbfFYh1Dwb+CPjhIsTXUJwwt16qWG\",\"is_staking\":false,\"from\":{\"address\":\"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3\",\"metadata\":{\"hex_address\":\"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34\"}}}"
2020/10/12 19:47:28 RESPONSE /construction/hash transaction_identifier:{"hash":"0x0ddce2bea9b06b924ac8d0fe5f81ee68b77f9649d26eced7af6138c14b43e1e0"}
2020/10/12 19:47:28 QUEUE /construction/submit network_identifier:{"blockchain":"Harmony","network":"Testnet","sub_network_identifier":{"network":"shard 0","metadata":{"is_beacon":true}}} intent:[{"operation_identifier":{"index":0},"type":"Transfer","status":"","account":{"address":"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3","metadata":{"hex_address":"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34"}},"amount":{"value":"-204050090605710200071380416","currency":{"symbol":"ONE","decimals":18}}},{"operation_identifier":{"index":1},"related_operations":[{"index":0}],"type":"Transfer","status":"","account":{"address":"one13dtqnwh23766ndf50vw9qufz2h3an490e87ehl","metadata":{"hex_address":"0x8b5609bAea8fb5A9B5347B1c50712255e3d9d4AF"}},"amount":{"value":"204050090605710200071380416","currency":{"symbol":"ONE","decimals":18}}}] transaction_identifier:{"hash":"0x0ddce2bea9b06b924ac8d0fe5f81ee68b77f9649d26eced7af6138c14b43e1e0"} network_transaction:"{\"rlp_bytes\":\"+HCAhDuaygCCUgiAgJSLVgm66o+1qbU0exxQcSJV49nUr4uoyUmTl2NiYH3dwIAooDdigboCx+5XpyYd2TaUxcZcvVABmD9tPEVoErUbqDv/oDpRvss2Z7rzdviTbfFYh1Dwb+CPjhIsTXUJwwt16qWG\",\"is_staking\":false,\"from\":{\"address\":\"one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3\",\"metadata\":{\"hex_address\":\"0xA5241513DA9F4463F1d4874b548dFBAC29D91f34\"}}}"
2020/10/12 19:47:28 created transaction "0x0ddce2bea9b06b924ac8d0fe5f81ee68b77f9649d26eced7af6138c14b43e1e0" for job "5"
2020/10/12 19:47:28 processed workflow "transfer" for job "5"
2020/10/12 19:47:28 request failed: /construction/submit {Code:3 Message:transaction submission error Retriable:true Details:map[message:nonce too low node_version:Harmony (C) 2020. harmony, version v6359-v2.3.6-11-gffd3ab3f-dirty (danielvdm@ 2020-10-12T19:39:56-0700) rosetta_version:0.4.4 trace:File: construction_submit.go  Function: github.com/harmony-one/harmony/rosetta/services.(*ConstructAPI).ConstructionSubmit Line: 78]}: unable to broadcast transaction: unable to broadcast transaction 0x0ddce2bea9b06b924ac8d0fe5f81ee68b77f9649d26eced7af6138c14b43e1e0
```


Pull request description:
[BUG] Call online node for construction metadata
Fixes #158.

### Motivation
The Construction API spec [here](https://www.rosetta-api.org/docs/construction_api_introduction.html#completely-offline) states that we can use the `/construction/metadata` endpoint to fetch dynamic information (such as account nonce). Therefore, I believe that we should request the metadata from the online node.

### Solution
Use the CoordinatorHelper's `onlineFetcher` instead of `offlineFetcher` for `CoordinatorHelper.Metadata`.


Patch:
diff --git a/cmd/root.go b/cmd/root.go
index f0f9ee0..7e7e4c7 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -217,6 +217,6 @@ var versionCmd = &cobra.Command{
 	Use:   "version",
 	Short: "Print rosetta-cli version",
 	Run: func(cmd *cobra.Command, args []string) {
-		fmt.Println("v0.5.9")
+		fmt.Println("v0.5.8")
 	},
 }
diff --git a/configuration/types.go b/configuration/types.go
index d0ec97c..902f52d 100644
--- a/configuration/types.go
+++ b/configuration/types.go
@@ -172,7 +172,7 @@ type ReconciliationCoverage struct {
 
 	// Index is an int64 indicating the height that must be
 	// reached before reconciliation coverage is considered valid.
-	Index *int64 `json:"index,omitempty"`
+	Index *int64 `json:"height,omitempty"`
 
 	// AccountCount is an int64 indicating the number of accounts
 	// that must be observed before reconciliation coverage is considered
diff --git a/pkg/processor/coordinator_helper.go b/pkg/processor/coordinator_helper.go
index a252e28..10dd75c 100644
--- a/pkg/processor/coordinator_helper.go
+++ b/pkg/processor/coordinator_helper.go
@@ -204,7 +204,7 @@ func (c *CoordinatorHelper) Metadata(
 		arg{argMetadata, metadataRequest},
 		arg{argPublicKeys, publicKeys},
 	)
-	metadata, suggestedFee, fetchErr := c.offlineFetcher.ConstructionMetadata(
+	metadata, suggestedFee, fetchErr := c.onlineFetcher.ConstructionMetadata(
 		ctx,
 		networkIdentifier,
 		metadataRequest,


Test patch:
diff --git a/pkg/tester/data.go b/pkg/tester/data.go
index a790b13..09a9f0e 100644
--- a/pkg/tester/data.go
+++ b/pkg/tester/data.go
@@ -436,10 +436,7 @@ func (t *DataTester) EndReconciliationCoverage( // nolint:gocognit
 			return
 
 		case <-tc.C:
-			headBlock, err := t.blockStorage.GetBlock(ctx, nil)
-			if errors.Is(err, storage.ErrHeadBlockNotFound) {
-				continue
-			}
+			atTip, blockIdentifier, err := t.blockStorage.AtTip(ctx, t.config.TipDelay)
 			if err != nil {
 				log.Printf(
 					"%s: unable to evaluate syncer height or if at tip",
@@ -448,10 +445,7 @@ func (t *DataTester) EndReconciliationCoverage( // nolint:gocognit
 				continue
 			}
 
-			blockIdentifier := headBlock.BlockIdentifier
-			atTip := utils.AtTip(t.config.TipDelay, headBlock.Timestamp)
-
-			// Check if we are at tip and set tip height if fromTip is true.
+			// Only check coverage if we are at tip.
 			if reconciliationCoverage.Tip || reconciliationCoverage.FromTip {
 				// If we fall behind tip, we must reset the firstTipIndex.
 				if !atTip {