curl -X 'GET' 'http://testing.mainnet.beacon-api.nimbus.team/eth/v2/debug/beacon/states/finalized' -H 'accept: application/json' --output state.json
jq .data.historical_roots state.json | python3 -c 'import sys, yaml, json; print(yaml.dump(json.loads(sys.stdin.read())))'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Available] EpochAccumulator number 0: 0x5ec1ffb8c3b146f42606c74ced973dc16ec5a107c0345858c343fc94780b4218 | |
[Available] EpochAccumulator number 1: 0xa5364e9a9bc513c4601f0d62e6b46dbdedf3200bbfae54d6350f46f2c7a01938 | |
[Available] EpochAccumulator number 2: 0x98cbd8a95ae7dc9c1ed823156d0eab9aaffa869f6852cab18ff0083063f27d26 | |
[Available] EpochAccumulator number 3: 0xd8b8a40b8cf6818e1bac871d882e772be0b28d1baaf72374946506d9e6fa7d75 | |
[Available] EpochAccumulator number 4: 0x6e3baba7e324b99ed72d98f0255d25ce66832736550f8b971c12280eac2a0bb8 | |
[Available] EpochAccumulator number 5: 0x5cff5a4b7284b1a4a6cebfcc80d876ab0418f71254d03f91d46a9a1fab49fa09 | |
[Not Available] EpochAccumulator number 6: 0x678fb79306f84e9d0a4749323dc29934ca59b852fbc7c8d2890eabe8a0cde282 error: {"code":-32000,"message":"portal_historyRecursiveFindContent raised an exception","data":"Content not found"} | |
[Available] EpochAccumulator number 7: 0xd9bc682bc5bc63b20a8344407ae12cb17e2085d448f438efa6aa5d522b913a20 | |
[Available] EpochAccumulator number 8: 0x12c9605f2d8d47 |
nim-eth Portal Wire implementation first interop tests with ddht and trin.
Similar as in this gist: https://gist.github.com/carver/f3c26d9adb28ea2b4e5d5bbe42b4f4b7
How to use nim-eth portalcli, a quick Portal Wire cli test tool: https://github.com/status-im/nim-eth/tree/master/eth/p2p/portal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ make witti-dev | |
[NimScript] rmDir: /home/deme/repos/nim-beacon-chain/build/eth2-testnets | |
[NimScript] exec: git clone --quiet --depth=1 https://github.com/eth2-clients/eth2-testnets | |
[NimScript] exec: nim c -d:chronicles_log_level=TRACE --verbosity:0 --hints:off -d:usePcreHeader --passL:"-lpcre" -d:release -d:"const_preset=/home/deme/repos/nim-beacon-chain/build/eth2-testnets/shared/witti/config.yaml" -o:"/home/deme/repos/nim-beacon-chain/build/beacon_node_shared_witti" beacon_chain/beacon_node.nim | |
/home/deme/repos/nim-beacon-chain/beacon_chain/spec/datatypes.nim(68, 20) template/generic instantiation of `loadCustomPreset` from here | |
/home/deme/repos/nim-beacon-chain/beacon_chain/spec/presets/custom.nim(179, 15) Warning: /home/deme/repos/nim-beacon-chain/build/eth2-testnets/shared/witti/config.yaml(51) Unrecognized constant in a preset: DEPOSIT_CONTRACT_BLOCK [User] | |
/home/deme/repos/nim-beacon-chain/beacon_chain/spec/datatypes.nim(68, 20) template/generic instantiation of `loadCustomPreset` from here | |
/home/dem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ make witti-dev | |
[NimScript] rmDir: /home/deme/repos/nbc/build/eth2-testnets | |
[NimScript] exec: git clone --quiet --depth=1 https://github.com/eth2-clients/eth2-testnets | |
[NimScript] exec: nim c -d:chronicles_log_level=TRACE --verbosity:0 --hints:off -d:usePcreHeader --passL:"-lpcre" -d:release -d:"chronicles_sinks=textlines,json[file(nbc.log)]" -d:"const_preset=/home/deme/repos/nbc/build/eth2-testnets/shared/witti/config.yaml" -o:"/home/deme/repos/nbc/build/beacon_node_shared_witti" beacon_chain/beacon_node.nim | |
/home/deme/repos/nbc/beacon_chain/spec/datatypes.nim(65, 20) template/generic instantiation of `loadCustomPreset` from here | |
/home/deme/repos/nbc/beacon_chain/spec/presets/custom.nim(179, 15) Warning: /home/deme/repos/nbc/build/eth2-testnets/shared/witti/config.yaml(5) Unrecognized constant in a preset: DEPOSIT_CONTRACT_BLOCK [User] | |
/home/deme/repos/nbc/beacon_chain/spec/datatypes.nim(65, 20) template/generic instantiation of `loadCustomPreset` from here | |
/home/deme/repos/nbc/beacon_chain/spec/presets/c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type AnotherError = object of CatchableError | |
proc thisRaises() {.raises:[AnotherError].} # Works | |
#proc thisRaises() # Error: can raise an unlisted exception: Exception - at line 8 :( | |
proc anotherProc() {.raises:[AnotherError].} = | |
echo "Hoi" | |
thisRaises() | |
proc thisRaises() {.raises:[AnotherError].} = # Whatever is put here doesn't seem to matter, can even omit. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run 1 | |
Setup 100 nodes | |
Sleeping for 60 seconds | |
avg entries per node: 18.67 | |
amount of nodes that contain target 7 | |
Found target in 2 lookups | |
avg entries per node: 18.73 | |
amount of nodes that contain target 39 | |
Not found in max iterations | |
avg entries per node: 31.86 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lvl":"DBG","ts":"2020-02-19 14:57:00+01:00","msg":"Launching beacon node","topics":"beacnde","tid":276843,"cmdParams":["--bootstrap-file=/home/deme/repos/nim-beacon-chain/tests/simulation/data/bootstrap_nodes.txt","--data-dir=/home/deme/repos/nim-beacon-chain/tests/simulation/data/node-1","--node-name=1","--tcp-port=30001","--udp-port=30001","--nat:none","--state-snapshot=/home/deme/repos/nim-beacon-chain/tests/simulation/data/state_snapshot.ssz","--deposit-contract=0x","--verify-finalization=on","--metrics-server=on","--metrics-server-address=127.0.0.1","--metrics-server-port=8009"],"config":{"logLevel":2,"eth1Network":3,"quickStart":false,"dataDir":"/home/deme/repos/nim-beacon-chain/tests/simulation/data/node-1","depositWeb3Url":"","depositContractAddress":"0x","statusBarEnabled":true,"statusBarContents":"peers: $connected_peers; epoch: $epoch, slot: $epoch_slot/$slots_per_epoch ($slot); finalized epoch: $last_finalized_epoch |ETH: $attached_validators_balance","cmd":0,"bootstrapNodes":[],"bootstrapNodesF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/nodejs | |
const Web3 = require('web3'); | |
const web3 = new Web3(Web3.givenProvider || new Web3.providers.HttpProvider('HTTP://127.0.0.1:8545'), null, {}); | |
web3.shh.getVersion() | |
.then(function(result) {console.log("Get Whisper version:", result)}); | |
web3.shh.getInfo() | |
.then(function(result) {console.log("Get Whisper info:", result)}); |
NewerOlder