poanetwork / poa-ballot-stats

Read POA voting records and rank voters by how many ballots they missed.
GNU Lesser General Public License v3.0
7 stars 6 forks source link

(Bug) After a second launch of the tool is not collecting events on Core #10

Closed igorbarinov closed 6 years ago

igorbarinov commented 6 years ago
master ~/r/poa-ballot-stats> cargo run -- -c contracts/core.json https://core.poa.network -v
    Finished dev [unoptimized + debuginfo] target(s) in 0.28 secs
     Running `target/debug/poa-ballot-stats -c contracts/core.json 'https://core.poa.network' -v`
Collecting events…
thread 'main' panicked at 'count votes: Error(NoEventsFound, State { next_error: None, backtrace: None })', libcore/result.rs:945:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
exit 101
afck commented 6 years ago

For me, results with https://core.poa.network are completely unpredictable: https://github.com/poanetwork/poa-ballot-stats/issues/4

The query seems to sometimes return incomplete and sometimes empty results.

igorbarinov commented 6 years ago

@phahulin let's test in on each individual node @afck can we make an option to do not check SSL certs? under Load Balancers nodes are with self signed certs

afck commented 6 years ago

It looks like the web3 crate doesn't support configuring that. But if the problem was related to the certificate, wouldn't the connection fail entirely? It seems like it succeeds making the connection and making the query but then gets wrong results (without an error).

Edit: I'm happy to try and get SSL options added into the web3 crate. It would make sense to make the Http transport more configurable.

igorbarinov commented 6 years ago

I was thinking to test individual nodes in the load balancer to figure out what's going on. They have self-signed certificates and the tool returns an error

master ~/r/poa-ballot-stats> cargo run -- -c contracts/core.json https://poa.jp -v
    Finished dev [unoptimized + debuginfo] target(s) in 0.22 secs
     Running `target/debug/poa-ballot-stats -c contracts/core.json 'https://poa.jp' -v`
thread 'main' panicked at 'get latest block: Error(Transport("Io(Custom { kind: Other, error: Error { code: -67843, message: \"The certificate was not trusted.\" } })"), State { next_error: None, backtrace: None })', libcore/result.rs:945:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
exit 101