diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-06-07 02:04:40 +0800 |
---|---|---|
committer | Alex Browne <stephenalexbrowne@gmail.com> | 2018-06-07 03:41:15 +0800 |
commit | b933946f335fe10f029d785b3a7bf64be1929557 (patch) | |
tree | 10e092c7b24490bb8537d8c27c8e25a5bc69aca0 /packages | |
parent | 5d2f9d7a33c4494b06098f13fca487613fe83c73 (diff) | |
download | dexon-sol-tools-b933946f335fe10f029d785b3a7bf64be1929557.tar.gz dexon-sol-tools-b933946f335fe10f029d785b3a7bf64be1929557.tar.zst dexon-sol-tools-b933946f335fe10f029d785b3a7bf64be1929557.zip |
Document debug_increaseTime method and fix typo in devnet README
Diffstat (limited to 'packages')
-rw-r--r-- | packages/devnet/README.md | 37 |
1 files changed, 36 insertions, 1 deletions
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 |