Commit Graph

63 Commits

Author SHA1 Message Date
Dan Laine fde0ce7327 add isBootstrapped method to info API 2020-06-24 18:21:09 -04:00
Dan Laine 3ca3a7377a return 503 rather than 500 when unhealthy 2020-06-24 12:28:16 -04:00
StephenButtolph 737430af26 merged 2020-06-23 17:48:02 -04:00
Dan Laine fc40ad802f lock, mem and CPU profiles write to a fixed filename 2020-06-22 13:18:14 -04:00
StephenButtolph 32812e5375 re-added the admin API calls to be backwards compatible 2020-06-19 18:36:45 -04:00
Dan Laine 979f4e2759 GET to ext/health returns 200 if heathy, else 500 2020-06-19 14:05:11 -04:00
Dan Laine 27bdba4776 GET to /ext/health returns a 200 and no body, per Fabio's request 2020-06-19 13:44:57 -04:00
StephenButtolph 3eb9788976 formatting changes 2020-06-17 23:29:30 -04:00
StephenButtolph 0e16d298ae merged 2020-06-17 15:54:55 -04:00
Stephen Buttolph 284d0ee765
Merge branch 'master' into codec-upgrade 2020-06-16 00:45:20 -04:00
Gabriel Cardona aa5422696e Set helpers to Debug log level. 2020-06-15 21:14:54 -07:00
Gabriel Cardona ec953d6ec3 Fix log level. 2020-06-15 15:08:03 -07:00
Gabriel Cardona ef0b9bfb1e Merge branch 'master' into log-level-and-format 2020-06-15 15:07:44 -07:00
Stephen Buttolph 91852fe932
nit 2020-06-15 17:08:25 -04:00
Stephen Buttolph 413ff7b0b4
Merge branch 'master' into patch-1 2020-06-15 17:06:43 -04:00
Dan Laine 18c0b0a65b move codec to utils 2020-06-15 13:20:30 -04:00
Gabriel Cardona f59f45a20f Make all RPC call logs `Info` level. 2020-06-15 09:35:41 -07:00
Gabriel Cardona d85ef87695 * Use Debug log level for all RPC calls
* Use convention: [vm/api: function_name called...]. Ex: "Platform: SampleValidators called...
2020-06-13 11:06:32 -07:00
Aaron Buchwald 2fb88906cc
Add testing for avm API ImportKey 2020-06-12 15:10:39 -04:00
Aaron Buchwald 64b2df39b5
Split admin api into admin and info apis 2020-06-10 16:47:31 -04:00
StephenButtolph 6a8e831af6 Added version to admin api 2020-06-10 03:15:03 -04:00
StephenButtolph f29bee1944 Merge branch 'master' into network-upgrade 2020-06-07 19:22:02 -04:00
Stephen Buttolph 6aff92f622
Merge pull request #57 from ava-labs/alias-default-chain-logs
Switch to using primary alias instead as base instead of full chain id
2020-06-07 14:39:32 -04:00
tbrunain fca752f3c8 fix: Add test for empty username case 2020-06-07 11:09:42 +02:00
tbrunain 4d7067c28e fix: Add a check on username in importUser 2020-06-07 11:01:25 +02:00
StephenButtolph 26b11ef29f Cleaned up admin/service.go 2020-06-06 11:52:16 -04:00
Aaron Buchwald 6c09e449e0 Switch to using primary alias instead as base instead of full chain id 2020-06-05 16:36:56 -04:00
Shashank 311ce90977
Fixed go format 2020-06-03 19:47:39 +05:30
Shashank 6dc67bbf70
Updated fix for issue 195
https://github.com/ava-labs/gecko/issues/195
2020-06-03 14:08:57 +05:30
Shashank 8e8dd7529b
Fix for KeyStore DoS vulnerability
https://github.com/ava-labs/gecko/issues/195
2020-06-02 22:47:02 +05:30
Aaron Buchwald 647b443822
Add get network name call to admin 2020-06-01 13:52:07 -04:00
StephenButtolph 72f203fa0e Added more information to the admin.peers rpc 2020-05-30 14:23:08 -04:00
StephenButtolph 40cb65ed8f merged 2020-05-23 17:19:16 -04:00
Stephen Buttolph b333fbe2a5
Merge branch 'master' into TS_health 2020-05-23 14:03:24 -04:00
Stephen Buttolph 18f43ee406
Merge branch 'master' into rpc-host 2020-05-23 13:42:07 -04:00
Tyler Smith 26fc63429c
CLEANUP: Fix godoc string. 2020-05-19 11:18:02 -07:00
Tyler Smith 99aa6d3724
BUGFIX: Use atomic reads/writes for heartbeats. 2020-05-19 11:07:48 -07:00
Tyler Smith 14daa76e92
TWEAK: Rename getHealth to getLiveness.
This enables a future getReady that has different checks.
2020-05-19 11:07:48 -07:00
Tyler Smith fcd13e7d90
FEATURE: Add Health API. 2020-05-19 11:07:48 -07:00
Collin Montag e2ba60d3ac added importuser test 2020-05-18 15:07:23 -04:00
Collin Montag f655592a1c standard password error 2020-05-18 14:36:37 -04:00
Collin Montag b2a85ccecd ks importuser fix 2020-05-18 14:19:15 -04:00
Collin Montag e9218c733b ks importuser password check 2020-05-18 12:18:48 -04:00
StephenButtolph b4306585a4 Switched to a pure go networking stack 2020-05-17 23:47:43 -04:00
Alex Willmer b9ceddd052 api: add --http-host to restrict RPC bind address
± ./build/ava --http-host localhost --public-ip <redacted>
  ___       ________               __            ___
 / _ \_/\  /  _____/  ____   ____ |  | ______   / _ \_/\
 \/ \___/ /   \  ____/ __ \_/ ___\|  |/ /  _ \  \/ \___/
          \    \_\  \  ___/\  \___|    <  <_> )
           \______  /\___  >\___  >__|_ \____/
                  \/     \/     \/     \/
...
INFO [05-14|21:09:54] /api/server.go#53: API server listening on
"localhost:9650"
INFO [05-14|21:09:54] /api/server.go#106: adding route
/ext/vm/jvYyfQTxGMJLuGWa55kdP2p2zSUYsQ5Raupu4TW34ZAUBAbtq
...

The node continues to partcipate in consensus, but RPC calls are
restricted to the localhost interface

$ ss -lnt | grep 965
LISTEN  0        4096           127.0.0.1:9650           0.0.0.0:*
LISTEN  0        10               0.0.0.0:9651           0.0.0.0:*

$ curl -X POST --data '{
>     "id": '$(date +%s)',
>     "jsonrpc": "2.0",
>     "method": "admin.getNodeID",
>     "params":{}
> }' -H 'content-type:application/json;' 127.0.0.1:9650/ext/admin
{"jsonrpc":"2.0","result":{"nodeID":"2iEwniZihec5S2anxDpKGenZB7Cs112Ap"},"id":1589486853}

$ curl -X POST --data '{
>     "id": '$(date +%s)',
>     "jsonrpc": "2.0",
>     "method": "admin.getNodeID",
>     "params":{}
> }' -H 'content-type:application/json;' 192.168.43.60:9650/ext/admin
curl: (7) Failed to connect to 192.168.43.60 port 9650: Connection
refused
2020-05-14 21:12:33 +01:00
Anil Dasari deb71d519c remove keyvalue slice 2020-05-12 10:15:33 +05:30
Anil Dasari 59e38e369c error descrption fix 2020-05-12 10:10:46 +05:30
Anil Dasari 4ba3a9fd8c review comment: delete prefix db data 2020-05-12 03:19:16 +05:30
Anil Dasari 8c2b71e00b refactoring and styling fix 2020-05-12 00:46:26 +05:30
Anil Dasari 8b83cb5175 review comments: remove from all dbs 2020-05-12 00:41:04 +05:30