Closed igorbarinov closed 6 years ago
Are you using https://core.poa.network? For me, it works fine with Sokol, as well as with a fully synchronized local core
node with --pruning=archive --no-warp
.
See https://github.com/poanetwork/poa-ballot-stats/issues/4.
Good point. I will try on a local node.
On a local synchronized Core
node I have
master ~/r/poa-ballot-stats> cargo run -- -c contracts/core.json http://localhost:8545 -v
Finished dev [unoptimized + debuginfo] target(s) in 0.39 secs
Running `target/debug/poa-ballot-stats -c contracts/core.json 'http://localhost:8545' -v`
Collecting events…
• InitiateChange { parent_hash: 0x0b70…9caa, new_set: [0xcf26…4cb0, 0x3ab9…f64f] }
• InitiateChange { parent_hash: 0xd3db…6a55, new_set: [0xcf26…4cb0, 0x3ab9…f64f, 0x8e6c…6b61] }
• InitiateChange { parent_hash: 0x4c1b…5f85, new_set: [0xcf26…4cb0, 0x3ab9…f64f, 0x8e6c…6b61, 0x7a6a…d32e] }
Missed Voting key Mining key Name
master ~/r/poa-ballot-stats>
Did you run Parity with --pruning=archive --no-warp
?
No, I've used parity --chain /Users/igor/c/poa/poa-chain-spec/spec.json --bootnodes enode://b103d5443f02cc79f28ca79a9dbece155f40dccd528999fc8b517719f8f5f36ac51a2a39584ab3e14974dd1c6661706ce68ed38b78fc0b4c6f69f8e3f5287611@54.175.117.236:30303 --reserved-peers /Users/igor/c/poa/core-bootnodes.txt -d /Users/igor/c/poa/data_folder --jsonrpc-port 8545 ui
How does --pruning=archive --no-warp
affect node behavior?
I'm not entirely sure about this yet (and about whether both options are needed), but I think if the node isn't running in "full" mode, is pruning old parts of the blockchain or is skipping block content (if I understand correctly, "warp" mode first downloads only the headers, and probably considers the node to be fully synced even if it doesn't have the full blockchain yet), then it doesn't have all the event logs. And it seems that it doesn't return an error in those cases: it just returns empty or incomplete query results.
The results for Core seems wrong. For Sokol they look normal https://gist.github.com/igorbarinov/9ba8c7dc831837ba17cff3c67f224199
Can you give me your thoughts on the topic @rstormsf ?