From b933946f335fe10f029d785b3a7bf64be1929557 Mon Sep 17 00:00:00 2001 From: Alex Browne Date: Wed, 6 Jun 2018 11:04:40 -0700 Subject: Document debug_increaseTime method and fix typo in devnet README --- packages/devnet/README.md | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'packages/devnet') diff --git a/packages/devnet/README.md b/packages/devnet/README.md index 6dfffeae7..f0b165cbd 100644 --- a/packages/devnet/README.md +++ b/packages/devnet/README.md @@ -34,7 +34,7 @@ the name of the currently running container). ### Configuration -The devnet network only has a single node and using PoA instead of PoW. That +The devnet network only has a single node and uses PoA instead of PoW. That means that one node, called the "sealer", is the ultimate authority for validating transactions and adding new blocks to the chain. Since there is no PoW it also means that mining does not require significant computational @@ -51,6 +51,41 @@ There are also a number of other addresses that have hard-coded starting balances for testing purposes. You can see the details in the **genesis.json** file. All of these accounts are also unlocked by default. +### Additional JSON RPC Methods + +In addition to the +[standard JSON RPC methods](https://github.com/ethereum/wiki/wiki/JSON-RPC) and +the +[Geth Management API](https://github.com/ethereum/go-ethereum/wiki/Management-APIs) +The devnet node supports some additional JSON RPC methods: + +#### debug_increaseTime + +Increases the timestamp of the next mined block. + +##### Parameters + +`Number` - The number of seconds by which to increase the time offset. + +##### Returns + +`Number` - The total number of seconds by which the time offset has been +increased (this includes all calls to `debug_increaseTime`). + +##### Example + +```js +// Request +curl -X POST --data '{"jsonrpc":"2.0","method":"debug_increaseTime","params":[100],"id":67}' + +// Result +{ + "id":67, + "jsonrpc": "2.0", + "result": "5000" +} +``` + ### Mining The node will automatically (nearly instantly) mine a block whenever new -- cgit v1.2.3