Skip to content

Commit

Permalink
Add mixhash to eth_getBlockByNumber and eth_getBlockByHash examples (#…
Browse files Browse the repository at this point in the history
…494)

* Update changelog link

Signed-off-by: Tim Beiko <t.beiko23@gmail.com>

* Add mixhash to eth_getBlockByNumber and eth_getBlockByHash

Signed-off-by: Tim Beiko <t.beiko23@gmail.com>

Co-authored-by: MadelineMurray <43356962+MadelineMurray@users.noreply.github.com>
  • Loading branch information
timbeiko and MadelineMurray authored Aug 19, 2020
1 parent 50edb18 commit 5c8545b
Showing 1 changed file with 39 additions and 37 deletions.
76 changes: 39 additions & 37 deletions docs/Reference/API-Methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -2340,13 +2340,13 @@ block.
=== "curl HTTP"

```bash
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0x16b69965a5949262642cfb5e86368ddbbe57ab9f17d999174a65fd0e66580d8f", false],"id":53}' http://127.0.0.1:8545
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false],"id":53}' http://127.0.0.1:8545
```

=== "wscat WS"

```bash
{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0x16b69965a5949262642cfb5e86368ddbbe57ab9f17d999174a65fd0e66580d8f", false],"id":53}
{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false],"id":53}
```

=== "JSON result"
Expand All @@ -2356,25 +2356,26 @@ block.
"jsonrpc" : "2.0",
"id" : 53,
"result" : {
"number" : "0x7",
"hash" : "0x16b69965a5949262642cfb5e86368ddbbe57ab9f17d999174a65fd0e66580d8f",
"parentHash" : "0xe9bd4b277983580ef0eabad6011891f8b6aff9381a78bd1c4faca374a48b3e09",
"nonce" : "0x46acb59e85b5bb6d",
"number" : "0x68b3",
"hash" : "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
"mixHash" : "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
"parentHash" : "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
"nonce" : "0x378da40ff335b070",
"sha3Uncles" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"logsBloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"transactionsRoot" : "0x7aa0913c235f272eb6ed6ab74ba5a057e0a62c1c1d1dbccfd971221e6b6e83a3",
"stateRoot" : "0xfaf6520d6e3d24107a4309855593341ab87a1744dbb6eea4e709b92e9c9107ca",
"receiptsRoot" : "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2",
"miner" : "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
"difficulty" : "0x5",
"totalDifficulty" : "0x10023",
"extraData" : "0x",
"size" : "0x270",
"gasLimit" : "0x1000000",
"gasUsed" : "0x5208",
"timestamp" : "0x5bbbe99f",
"logsBloom" : "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
"transactionsRoot" : "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
"stateRoot" : "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
"receiptsRoot" : "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
"miner" : "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
"difficulty" : "0x66e619a",
"totalDifficulty" : "0x1e875d746ae",
"extraData" : "0xd583010502846765746885676f312e37856c696e7578",
"size" : "0x334",
"gasLimit" : "0x47e7c4",
"gasUsed" : "0x37993",
"timestamp" : "0x5835c54d",
"uncles" : [ ],
"transactions" : [ "0x2cc6c94c21685b7e0f8ddabf277a5ccf98db157c62619cde8baea696a74ed18e" ]
"transactions" : [ "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc", "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d" ]
}
}
```
Expand Down Expand Up @@ -2466,13 +2467,13 @@ block.
=== "curl HTTP"

```bash
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x64", true],"id":1}' http://127.0.0.1:8545
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x68B3", true],"id":1}' http://127.0.0.1:8545
```

=== "wscat WS"

```bash
{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x64", true],"id":1}
{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x68B3", true],"id":1}
```

=== "JSON result"
Expand All @@ -2482,23 +2483,24 @@ block.
"jsonrpc" : "2.0",
"id" : 1,
"result" : {
"number" : "0x64",
"hash" : "0xdfe2e70d6c116a541101cecbb256d7402d62125f6ddc9b607d49edc989825c64",
"parentHash" : "0xdb10afd3efa45327eb284c83cc925bd9bd7966aea53067c1eebe0724d124ec1e",
"nonce" : "0x37129c7f29a9364b",
"number" : "0x68b3",
"hash" : "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
"mixHash" : "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
"parentHash" : "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
"nonce" : "0x378da40ff335b070",
"sha3Uncles" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"logsBloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"transactionsRoot" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"stateRoot" : "0x90c25f6d7fddeb31a6cc5668a6bba77adbadec705eb7aa5a51265c2d1e3bb7ac",
"receiptsRoot" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"miner" : "0xbb7b8287f3f0a933474a79eae42cbca977791171",
"difficulty" : "0x42be722b6",
"totalDifficulty" : "0x19b5afdc486",
"extraData" : "0x476574682f4c5649562f76312e302e302f6c696e75782f676f312e342e32",
"size" : "0x21e",
"gasLimit" : "0x1388",
"gasUsed" : "0x0",
"timestamp" : "0x55ba43eb",
"logsBloom" : "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
"transactionsRoot" : "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
"stateRoot" : "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
"receiptsRoot" : "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
"miner" : "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
"difficulty" : "0x66e619a",
"totalDifficulty" : "0x1e875d746ae",
"extraData" : "0xd583010502846765746885676f312e37856c696e7578",
"size" : "0x334",
"gasLimit" : "0x47e7c4",
"gasUsed" : "0x37993",
"timestamp" : "0x5835c54d",
"uncles" : [ ],
"transactions" : [ ]
}
Expand Down

0 comments on commit 5c8545b

Please sign in to comment.