This change improves discovery behavior in small networks. Very small
networks would often fail to bootstrap because all member nodes were
dropping table content due to findnode failure. The check is now changed
to avoid dropping nodes on findnode failure when their bucket is almost
empty. It also relaxes the liveness check requirement for FINDNODE/v4
response nodes, returning unverified nodes as results when there aren't
any verified nodes yet.
The "findnode failed" log now reports whether the node was dropped
instead of the number of results. The value of the "results" was
always zero by definition.
Co-authored-by: Felix Lange <fjl@twurst.com>
# Conflicts:
# p2p/discover/v4_udp.go
* metrics: zero temp variable in updateMeter
Previously the temp variable was not updated properly after summing it to count.
This meant we had astronomically high metrics, now we zero out the temp whenever we
sum it onto the snapshot count
* metrics: move temp variable to be aligned, unit tests
Moves the temp variable in MeterSnapshot to be 64-bit aligned because of the atomic bug.
Adds a unit test, that catches the previous bug.
* Cut down the stateGrowth generation
* Fix NPE
* Fix for lastTimestamp
* Adjust to the current state
* Potential fix
* Fix for shorter keys in the state
* Extract code
* Iterate over code
* First
* More on SA interpreter
* Fixup
* Add cfg action to hack binary that invokes the SaInterpreter. Added an operation handler for PUSH1
* refactor cfg tests into separate file
* Move cfg tests into separate file
* More refactoring into new file
* dataflow interpreter
* work on cfg0
* finish cfg0
* df works on base examples
* refactor into dataflow spec
* add bounded stack
* add harder example
* fix switch pass thru
* fix switch pass thru
* bug fix, and better printing
* manual merge
* restore call to test gencfg
* abstract interpretation based cfg analysis
* fix post signature
* use uint256 instead uint64, add post function
* preprocess stmts
* initial implementation of resolve
* fix resolve
* fix resolve
* print stmts for edges
* print stmts for edges
* print states
* print states
* bug fixes, debugging
* fix jumpi dest - first working impl
* reachability analysis to filter out dead edges
* add all transfer functions
* larger contract bytecodes from solc compiler
* simple solidity contract goes thru
* add deposit contract bytecode
* rename deposit contract test
* fix new contract arg
* Address non-determinism leading to imprecise results
* improve debugging output
* improve debugging output
* improve debugging output
* fix for bug causing incorrect analysis results
* fix for bug causing incorrect analysis results
* fix for bug causing incorrect analysis results
* add more test cases
* fix coverage bug
* debugging for non-termination
* fix bad fixpoint check
* fix data inference
* fix transfer function for halting stmts
* switch to deposit contract test, disable debugging
* add anly counter to viz, fix stmt.valid check
* show all preds, adjust anlycounter behavior
* dfs instead of bfs to fail earlier
* viz improvements
* add worklist size to viz
* add test case for private functions
* valueset analysis
* add more checks to fail earlier in the analysis to help debugging, improve debugging output, catch additional bad jumps
* delete old code
* delete old code
* delete old code
* fix up minor changes to jump table
* copy over comments from cgf-1 branch
* remove minor diffs
* add recompiled deposit contract
* graph viz
* cleanup/refactoring
* initial impl of viz
* script to run cfg anly and generate dot file
* div example
* accept bytecode from cmd line
* add minimal deposit contract example
* replace valueset analysis with stackset analysis
* get in sync with master
* sync with master
* fix linting
* fix linting
* fix linting
* reformatting
* fix linting
* fix linting
* fix linting
* fix linting
* fix linting
* fix linting
* fix linting
Co-authored-by: Alexey Akhunov <akhounov@gmail.com>
* v0
* more docs, less customization
* more docs, less customization
* more docs, less customization
* don't store db reference
* rely on fact that lmdb key/value valid until end of transaction
* clean
* clean
* Update Supported JSON-RPC calls in README
* Fix Hyperlinks
* Update list
* Include net / net_version
* Rename net.go to net_api.go
* Fix hyperlink for renamed net_api.go file