| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
snapshot (#19312)
* swarm/network/simulation: test cases refactored
* swarm/pss: minor refactoring
* swarm/simulation: UploadSnapshot updated
* swarm/network: style fix
* swarm/pss: bugfix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* cmd/swarm, p2p, swarm: Enable ENR in binary/execadapter
* cmd/p2p/swarm: Remove comments + config.Enode nomarshal
* p2p/simulations: Remove superfluous error check
* p2p/simulation: Move init enode comment
* swarm/api: Check error in config test
* swarm, p2p/simulations, cmd/swarm: Use nodekey in binary record sign
* cmd/swarm: Make nodekey available for swarm api config
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* travis: remove verbose from Swarm race tests
By removing -v our output will be cleaner, but the Travis job still
won't be terminated - due to 'no output for 10 minutes' - as keepalive
.sh produces a log line every 5 minutes.
* travis: extend Swarm race detection to p2p subpackages
As p2p/protocols, p2p/simulations and p2p/testing packages mostly
belong to the Swarm team.
|
| |
|
|
|
|
|
|
| |
* les: fixed peer id format
* les: fixed peer reply error handling
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* contracts/ens: update public resolver solidity code
* contracts/ens: update public resolver, update go bindings
* update build
* fix ens.sol
* contracts/ens: change contract interface
* contracts/ens: implement public resolver changes
* contracts/ens: added ENSRegistry contract
* contracts/ens: reinstate old contract code
* contracts/ens: update README.md
* contracts/ens: added test coverage for fallback contract
* contracts/ens: added support for fallback contract
* contracts/ens: removed unused contract code
* contracts/ens: add todo and decode multicodec stub
* add encode
* vendor: add ipfs cid libraries
* contracts/ens: cid sanity tests
* contracts/ens: more cid sanity checks
* contracts/ens: wip integration
* wip
* Revert "vendor: add ipfs cid libraries"
This reverts commit 29d9b6b294ded903a1065d96c8149119713cfd12.
* contracts/ens: removed multiformats dependencies
* contracts/ens: added decode tests
* contracts/ens: added eip spec test, minor changes to exiting tests
* contracts/ens: moved cid decoding to own file
* contracts/ens: added unit test to encode hash to content hash
* contracts/ens: removed unused code
* contracts/ens: fix ens tests to use cid decode and encode
* contracts/ens: adjust swarm multicodecs after pr merge
* contracts/ens: fix linter error
* constracts/ens: address PR comments
* cmd, contracts: make peoples lives easier
* contracts/ens: fix linter error
* contracts/ens: address PR comments
|
| |
|
|\
| |
| | |
les, light: verbose errors on state retrieval issues
|
|/ |
|
|
|
|
|
|
| |
* dashboard: fix github alerts
* dashboard: run go generate
|
| |
|
|
|
|
| |
Updates to match EIP1767
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* swarm/pss: fixed bug in pss.process, test added
* swarm/pss: test case updated
* swarm/pss: WaitTillSnapshotRecreated() func added
* swarm/pss: snapshot test updated
* swarm/pss: WaitTillSnapshotLoaded() fixed
* swarm/pss: gofmt applied
* swarm/pss: refactoring, file renamed
* swarm/pss: input data fixed
* swarm/pss: race condition fixed
* swarm/pss: test timeout increased
* swarm/pss: eliminated the global variables
* swarm/pss: tests added
* swarm/pss: comments added
* swarm/pss: comment fixed
* swarm/pss: refactored according to review
* swarm/pss: style fix
* swarm/pss: increased timeout
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* swarm/api, swarm/network, p2p/simulations: Prerequisites for handshake remove
* swarm, p2p: Add full sim node configs for protocoltester
* swarm/network: Make stream package pass tests
* swarm/network: Extract peer and addr types out of protocol file
* p2p, swarm: Make p2p/protocols tests pass + rename types.go
* swarm/network: Deactivate ExecAdapter test until binary ENR prep
* swarm/api: Remove comments
* swarm/network: Uncomment bootnode record load
|
|
|
|
|
|
| |
* cmd/swarm: dont connect to bootnodes in tests
* cmd/utils: check for empty string when parsing enode
|
|
|
|
|
|
| |
* cmd, core, eth, trie: get rid of trie cache generations
* core, trie: get rid of remainder of cache gen boilerplate
|
|\
| |
| | |
bind: Static byte arrays should be right-padded
|
| | |
|
|/
|
|
|
| |
Per https://solidity.readthedocs.io/en/v0.5.3/abi-spec.html:
"bytes<M>: enc(X) is the sequence of bytes in X padded with trailing zero-bytes to a length of 32 bytes"
|
| |
|
|
|
| |
graphql: fix typo in file name
|
| |
|
|
|
|
|
|
| |
* dashboard, p2p: visualize peers
* dashboard: change scale to green to red
|
|\
| |
| | |
core: use headers only where blocks are unnecessary
|
| | |
|
|\ \
| |/
|/| |
README: Mention go 1.10 as minumum - context #19246
|
| | |
|
|\ \
| | |
| | | |
ethdb: tiny API tidy-up from the database rework pr
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* core/vm: remove function call for stack validation from evm runloop
* core/vm: separate gas calc into static + dynamic
* core/vm: optimize push1
* core/vm: reuse pooled bigints for ADDRESS, ORIGIN and CALLER
* core/vm: use generic error message for jump/jumpi, to avoid string interpolation
* testdata: fix tests for new error message
* core/vm: use 64-bit memory calculations
* core/vm: fix error in memory calculation
* core/vm: address review concerns
* core/vm: avoid unnecessary use of big.Int:BitLen()
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* swarm/storage/localstore: most basic database
* swarm/storage/localstore: fix typos and comments
* swarm/shed: add uint64 field Dec and DecInBatch methods
* swarm/storage/localstore: decrement size counter on ModeRemoval update
* swarm/storage/localstore: unexport modeAccess and modeRemoval
* swarm/storage/localstore: add WithRetrievalCompositeIndex
* swarm/storage/localstore: add TestModeSyncing
* swarm/storage/localstore: fix test name
* swarm/storage/localstore: add TestModeUpload
* swarm/storage/localstore: add TestModeRequest
* swarm/storage/localstore: add TestModeSynced
* swarm/storage/localstore: add TestModeAccess
* swarm/storage/localstore: add TestModeRemoval
* swarm/storage/localstore: add mock store option for chunk data
* swarm/storage/localstore: add TestDB_pullIndex
* swarm/storage/localstore: add TestDB_gcIndex
* swarm/storage/localstore: change how batches are written
* swarm/storage/localstore: add updateOnAccess function
* swarm/storage/localhost: add DB.gcSize
* swarm/storage/localstore: update comments
* swarm/storage/localstore: add BenchmarkNew
* swarm/storage/localstore: add retrieval tests benchmarks
* swarm/storage/localstore: accessors redesign
* swarm/storage/localstore: add semaphore for updateGC goroutine
* swarm/storage/localstore: implement basic garbage collection
* swarm/storage/localstore: optimize collectGarbage
* swarm/storage/localstore: add more garbage collection tests cases
* swarm/shed, swarm/storage/localstore: rename IndexItem to Item
* swarm/shed: add Index.CountFrom
* swarm/storage/localstore: persist gcSize
* swarm/storage/localstore: remove composite retrieval index
* swarm/shed: IterateWithPrefix and IterateWithPrefixFrom Index functions
* swarm/storage/localstore: writeGCSize function with leveldb batch
* swarm/storage/localstore: unexport modeSetRemove
* swarm/storage/localstore: update writeGCSizeWorker comment
* swarm/storage/localstore: add triggerGarbageCollection function
* swarm/storage/localstore: call writeGCSize on DB Close
* swarm/storage/localstore: additional comment in writeGCSizeWorker
* swarm/storage/localstore: add MetricsPrefix option
* swarm/storage/localstore: fix a typo
* swamr/shed: only one Index Iterate function
* swarm/storage/localstore: use shed Iterate function
* swarm/shed: pass a new byte slice copy to index decode functions
* swarm/storage/localstore: implement feed subscriptions
* swarm/storage/localstore: add more subscriptions tests
* swarm/storage/localsore: add parallel upload test
* swarm/storage/localstore: use storage.MaxPO in subscription tests
* swarm/storage/localstore: subscription of addresses instead chunks
* swarm/storage/localstore: lock item address in collectGarbage iterator
* swarm/storage/localstore: fix TestSubscribePull to include MaxPO
* swarm/storage/localstore: improve subscriptions
* swarm/storage/localstore: add TestDB_SubscribePull_sinceAndUntil test
* swarm/storage/localstore: adjust pull sync tests
* swarm/storage/localstore: remove writeGCSizeDelay and use literal
* swarm/storage/localstore: adjust subscriptions tests delays and comments
* swarm/storage/localstore: add godoc package overview
* swarm/storage/localstore: fix a typo
* swarm/storage/localstore: update package overview
* swarm/storage/localstore: remove repeated index change
* swarm/storage/localstore: rename ChunkInfo to ChunkDescriptor
* swarm/storage/localstore: add comment in collectGarbageWorker
* swarm/storage/localstore: replace atomics with mutexes for gcSize and tests
* swarm/storage/localstore: protect addrs map in pull subs tests
* swarm/storage/localstore: protect slices in push subs test
* swarm/storage/localstore: protect chunks in TestModePutUpload_parallel
* swarm/storage/localstore: fix a race in TestDB_updateGCSem defers
* swarm/storage/localstore: remove parallel flag from tests
* swarm/storage/localstore: fix a race in testDB_collectGarbageWorker
* swarm/storage/localstore: remove unused code
* swarm/storage/localstore: add more context to pull sub log messages
* swarm/storage/localstore: BenchmarkPutUpload and global lock option
* swarm/storage/localstore: pre-generate chunks in BenchmarkPutUpload
* swarm/storage/localstore: correct useGlobalLock in collectGarbage
* swarm/storage/localstore: fix typos and update comments
* swarm/storage/localstore: update writeGCSize comment
* swarm/storage/localstore: global batch write lock
* swarm/storage/localstore: remove global lock option
* swarm/storage/localstore: simplify DB.Close
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
dummyHook's fields were concurrently written by nodes and read by
the test. The simplest solution is to protect all fields with a mutex.
Enable: TestMultiplePeersDropSelf, TestMultiplePeersDropOther as they
seemingly accidentally stayed disabled during a refactor/rewrite
since 1836366ac19e30f157570e61342fae53bc6c8a57.
resolves ethersphere/go-ethereum#1286
|
| |
| |
| |
| |
| |
| | |
* swarm/storage: add comparison towards leveldb.ErrNotFound
* swarm/storage: wrap leveldb ErrNotFound
|
| |
| |
| |
| |
| |
| |
| |
| | |
* swarm/network: propagate span with ctx
* swarm/network: try to stop stream.send.request spans on time
* swarm/storage: add chunk ref as a log to netstore.fetcher span
|
| |
| |
| |
| |
| |
| | |
* cmd/swarm/swarm-smoke: better logs for debug functionality;
* cmd/swarm/swarm-smoke: fixup
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
eth/downloader: fix nil droppeer in state sync
|
| | | |
|
| | |
| | |
| | |
| | | |
Although current two implementations(ledgerDriver, trezorDriver) of interface driver.Close do not actually return any error. Instead, they only return nil.
But since the declaration of Close function returns error, it is better to check the returned error in case in future some new implementation of Close function returns error and we may forget to modify the function which invokes Close function at that time.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This PR will will break existing UIs, since it changes all calls like ApproveSignTransaction to be on the form ui_approveSignTransaction.
This is to make it possible for the UI to reuse the json-rpc library from go-ethereum, which uses this convention.
Also, this PR removes some unused structs, after import/export were removed from the external api (so no longer needs internal methods for approval)
One more breaking change is introduced, removing passwords from the ApproveSignTxResponse and the likes. This makes the manual interface more like the rulebased interface, and integrates nicely with the credential storage. Thus, the way it worked before, it would be tempting for the UI to implement 'remember password' functionality. The way it is now, it will be easy instead to tell clef to store passwords and use them.
If a pw is not found in the credential store, the user is prompted to provide the password.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These tests never run as the build tag excluded them from the CI
execution. As a results the (dead) code got out of sync with other
parts of Swarm and now they would not even compile. => Removed.
resolves ethersphere/go-ethereum#1238
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
* swarm/network/stream: fixed timing issues
* swarm/network/stream: only count first iteration of subscriptions
* swarm/network/stream/: fix linter errors
|
|\ \
| | |
| | | |
all: clean up and properly abstract database accesses
|
| | | |
|
| | |
| | |
| | | |
p2p/protocols: Fix race condition in TestAccountingSimulation
|
|\ \ \
| |/ /
|/| | |
consensus/clique: fix test copy paste error, test what's documented
|
|/ / |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* p2p/simulations: increased snapshot load timeout for debugging
* swarm/network/stream: less nodes for snapshot longrunning tests
* swarm/network: fixed longrunning tests
* swarm/network/stream: store kademlia in bucket
* swarm/network/stream: disabled healthy check in delivery tests
* swarm/network/stream: longer SyncUpdateDelay for longrunning tests
* swarm/network/stream: more debug output
* swarm/network/stream: reduced longrunning snapshot tests to 64 nodes
* swarm/network/stream: don't WaitTillHealthy in SyncerSimulation
* swarm/network/stream: cleanup for PR
|
| | |
|
|\ \
| | |
| | | |
build: add clef to alltools and deb
|
| | | |
|
|/ / |
|
| |
| |
| | |
This reverts commit 460d206f309fc0884c666bd191a1b6a4b63462fc.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* swarm/shed, swarm/storage/localstore: add LastPullSubscriptionChunk
* swarm/shed: fix comments
* swarm/shed: fix TestIncByteSlice test
* swarm/storage/localstore: fix TestDB_LastPullSubscriptionChunk
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
build/deb: fix PPA env var setting
|
|/ / |
|
|\ \
| | |
| | | |
build/deb: use custom cache for PPA builder
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
crypto/bn256/cloudflare: pull in upstream fix for Go 1.12 R18
|
| | | |
|
|\ \ \
| |/ /
|/| | |
core/types: fix receipt legacy decoding
|
|/ / |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* p2p/discover: remove unused function
* p2p/enode: use localItemKey for local sequence number
I added localItemKey for this purpose in #18963, but then
forgot to actually use it. This changes the database layout
yet again and requires bumping the version number.
|
| | |
| | |
| | |
| | |
| | |
| | | |
I added localItemKey for this purpose in #18963, but then
forgot to actually use it. This changes the database layout
yet again and requires bumping the version number.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* node: require LocalAppData variable
This avoids path inconsistencies on Windows XP.
Hat tip to @MicahZoltu for catching this so quickly.
* node: fix typo
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* swarm/network: WIP consider all nodes for healthy iteration
* swarm/network/simulation: extend TestWaitTillHealthy to really check kads are healthy
* cmd/swarm/swarm-snapshot: fixed bugs in snapshot creation binary
* swarm/network/simulation: addressed PR comments
* swarm/network/simulation: defer sim.Clsoe()
* swarm/network/simulation: fixed wrong sim.Close()
* swarm/network/simulation: addressed PR comments
* cmd/swarm/swarm-snapshot: reducing default to 8 nodes, more to 4
* cmd/swarm/swarm-snapshot: extended timeout to 3 mins, or 256 nodes snapshot times out
* swarm/network/simulation: More PR comments
|
|\ \ \
| | | |
| | | | |
Upgrade to Go 1.12
|
| | | | |
|
|/ / / |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* travis, build: switch to NDK 19b, fix gomobile builds
* travis, build: move NDK into its final bundle location
* travis: disable Android build on PRs once again
|
|\ \ \
| | | |
| | | | |
containers/docker: nuke per the 1.8.0 deprecation note
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This change
- implements concurrent LES request serving even for a single peer.
- replaces the request cost estimation method with a cost table based on
benchmarks which gives much more consistent results. Until now the
allowed number of light peers was just a guess which probably contributed
a lot to the fluctuating quality of available service. Everything related
to request cost is implemented in a single object, the 'cost tracker'. It
uses a fixed cost table with a global 'correction factor'. Benchmark code
is included and can be run at any time to adapt costs to low-level
implementation changes.
- reimplements flowcontrol.ClientManager in a cleaner and more efficient
way, with added capabilities: There is now control over bandwidth, which
allows using the flow control parameters for client prioritization.
Target utilization over 100 percent is now supported to model concurrent
request processing. Total serving bandwidth is reduced during block
processing to prevent database contention.
- implements an RPC API for the LES servers allowing server operators to
assign priority bandwidth to certain clients and change prioritized
status even while the client is connected. The new API is meant for
cases where server operators charge for LES using an off-protocol mechanism.
- adds a unit test for the new client manager.
- adds an end-to-end test using the network simulator that tests bandwidth
control functions through the new API.
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
build: bump PPA builders to Go 1.11
|
| | | | | |
|
|/ / / / |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* swarm/pss: fix data race on HandshakeController.symKeyIndex
The HandshakeController.symKeyIndex map was accessed concurrently.
Since insufficient test coverage the race is not detected every time.
However, running TestClientHandshake a 100 times seems to be enough to
reproduce the race.
Note: I've chosen HandshakeController.lock to protect
HandshakeController.symKeyIndex as that was already protected in a few
functions by that lock.
Additionally:
- removed unused testStore
- enabled tests in handshake_test.go as they pass
- removed code duplication by adding getSymKey()
* swarm/pss: fix a data race on HandshakeController.keyC
* swarm/pss: fix data races with on Pss.symKeyPool
|
| | | | |
|
|/ / /
| | |
| | | |
Prevents reallocation, improves performance
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* swarm/storage/mock: implement listings methods for mem and rpc stores
* swarm/storage/mock/rpc: add comments and newTestStore helper function
* swarm/storage/mock/mem: add missing comments
* swarm/storage/mock: add comments to new types and constants
* swarm/storage/mock/db: implement listings for mock/db global store
* swarm/storage/mock/test: add comments for MockStoreListings
* swarm/storage/mock/explorer: initial implementation
* cmd/swarm/global-store: add chunk explorer
* cmd/swarm/global-store: add chunk explorer tests
* swarm/storage/mock/explorer: add tests
* swarm/storage/mock/explorer: add swagger api definition
* swarm/storage/mock/explorer: not-zero test values for invalid addr and key
* swarm/storage/mock/explorer: test wildcard cors origin
* swarm/storage/mock/db: renames based on Fabio's suggestions
* swarm/storage/mock/explorer: add more comments to testHandler function
* cmd/swarm/global-store: terminate subprocess with Kill in tests
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* swarm/storage/localstore: close localstore in two tests
* swarm/storage/localstore: fix a possible deadlock in tests
* swarm/storage/localstore: re-enable pull subs tests for travis race
* swarm/storage/localstore: stop sending to errChan on context done in tests
* swarm/storage/localstore: better want check in readPullSubscriptionBin
* swarm/storage/localstore: protect chunk put with addr lock in tests
* swamr/storage/localstore: wait for gc and writeGCSize workers on Close
* swarm/storage/localstore: more correct testDB_collectGarbageWorker
* swarm/storage/localstore: set DB Close timeout to 5s
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* core: remove unnecessary fields in log
* core: bump blockchain database version
* core, les: remove unnecessary fields in txlookup
* eth: print db version explicitly
* core/rawdb: drop txlookup entry struct wrapper
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* blockchain: more tests for sidechain import, fixes #19105
* core/blockchain: rework import of pruned canon blocks and canon-prepended sidechains
* core/blockchain: minor clarity change
* core/blockchain: remove unused method
|
| | |
| | |
| | |
| | |
| | | |
(#19141)
cast limit.Cur (int64) to uint64, fix test and compilation error
|
| | |
| | |
| | |
| | |
| | |
| | | |
The current loop continuation condition is always true as a uint8
is always being checked whether it is less than 255 (its maximum
value). Since the loop starts with the value 1, the loop termination
can be guarranteed to exit once the value overflows to 0.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* swarm/storage: increase mget timeout in common_test.go
TestDbStoreCorrect_1k sometimes timed out with -race on Travis.
--- FAIL: TestDbStoreCorrect_1k (24.63s)
common_test.go:194: testStore failed: timed out after 10s
* swarm: remove unused vars from TestSnapshotSyncWithServer
nodeCount and chunkCount is returned from setupSim and those values
we use.
* swarm: move race/norace helpers from stream to testutil
As we will need to use the flag in other packages, too.
* swarm: refactor TestSwarmNetwork case
Extract long running test cases for better visibility.
* swarm/network: skip TestSyncingViaGlobalSync with -race
As panics on Travis.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7e351b]
* swarm: run TestSwarmNetwork with fewer nodes with -race
As otherwise we always get test failure with `network_test.go:374:
context deadline exceeded` even with raised `Timeout`.
* swarm/network: run TestDeliveryFromNodes with fewer nodes with -race
Test on Travis times out with 8 or more nodes if -race flag is present.
* swarm/network: smaller node count for discovery tests with -race
TestDiscoveryPersistenceSimulationSimAdapters failed on Travis with
`-race` flag present. The failure was due to extensive memory usage,
coming from the CGO runtime. Using a smaller node count resolves the
issue.
=== RUN TestDiscoveryPersistenceSimulationSimAdapter
==7227==ERROR: ThreadSanitizer failed to allocate 0x80000 (524288) bytes of clock allocator (error code: 12)
FATAL: ThreadSanitizer CHECK failed: ./gotsan.cc:6976 "((0 && "unable to mmap")) != (0)" (0x0, 0x0)
FAIL github.com/ethereum/go-ethereum/swarm/network/simulations/discovery 804.826s
* swarm/network: run TestFileRetrieval with fewer nodes with -race
Otherwise we get a failure due to extensive memory usage, as the CGO
runtime cannot allocate more bytes.
=== RUN TestFileRetrieval
==7366==ERROR: ThreadSanitizer failed to allocate 0x80000 (524288) bytes of clock allocator (error code: 12)
FATAL: ThreadSanitizer CHECK failed: ./gotsan.cc:6976 "((0 && "unable to mmap")) != (0)" (0x0, 0x0)
FAIL github.com/ethereum/go-ethereum/swarm/network/stream 155.165s
* swarm/network: run TestRetrieval with fewer nodes with -race
Otherwise we get a failure due to extensive memory usage, as the CGO
runtime cannot allocate more bytes ("ThreadSanitizer failed to
allocate").
* swarm/network: skip flaky TestGetSubscriptionsRPC on Travis w/ -race
Test fails a lot with something like:
streamer_test.go:1332: Real subscriptions and expected amount don't match; real: 0, expected: 20
* swarm/storage: skip TestDB_SubscribePull* tests on Travis w/ -race
Travis just hangs...
ok github.com/ethereum/go-ethereum/swarm/storage/feed/lookup 1.307s
keepalive
keepalive
keepalive
or panics after a while.
Without these tests the race detector job is now stable. Let's
invetigate these tests in a separate issue:
https://github.com/ethersphere/go-ethereum/issues/1245
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* swarm/newtork: WIP Span request span until delivery and put
* swarm/storage: Introduce new trace across single fetcher lifespan
* swarm/network: Put span ids for sendpriority in context value
* swarm: Add global span store in tracing
* swarm/tracing: Add context key constants
* swarm/tracing: Add comments
* swarm/storage: Remove redundant fix for filestore
* swarm/tracing: Elaborate constants comments
* swarm/network, swarm/storage, swarm:tracing: Minor cleanup
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* swarm/network: Logline to see handshake addr
* swarm/network: Replace remote ip in handshake uaddr
* swarm/network: Add test for enode uaddr rewrite method
* swarm/network: Remove redundance pointer return from sanitize
* swarm/network: Obeying the linting machine
* swarm/network: Add panic comment
(travis trigger take 1)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* swarm/network/stream: fix a goroutine leak in Registry
* swarm/network, swamr/network/stream: Kademlia close addr count and depth change chans
* swarm/network/stream: rename close channel to quit
* swarm/network/stream: fix sync between NewRegistry goroutine and Close method
|
| | | |
|
| | | |
|
|\ \ \ |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Simplifies the transaction presense check to use a function to
determine if the transaction is present in the block provided
to trace, which originally had a redundant parenthesis and used
a `exist` flag to dictate control flow.
|
| | | | |
|
| | | | |
|
| | | | |
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Package crypto works with or without cgo, which is great. However, to make it
work without cgo required setting the build tag `nocgo`. It's common to disable
cgo by instead just setting the environment variable `CGO_ENABLED=0`. Setting
this environment variable does _not_ implicitly set the build tag `nocgo`. So
projects that try to build the crypto package with `CGO_ENABLED=0` will fail. I
have done this myself several times. Until today, I had just assumed that this
meant that this package requires cgo.
But a small build tag change will make this case work. Instead of using `nocgo`
and `!nocgo`, we can use `!cgo` and `cgo`, respectively. The `cgo` build tag is
automatically set if cgo is enabled, and unset if it is disabled.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This changes default location of the data directory to use the LOCALAPPDATA
environment variable, resolving issues with remote home directories an improving
compatibility with Cygwin.
Fixes #2239
Fixes #2237
Fixes #16437
|
| | |
| | |
| | |
| | | |
This corrects the previous change which broke the build and
was pushed by accident.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
* swarm: Reinstate Pss Protocol add call through swarm service
* swarm: Even less self
|
|/ / |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* cmd/swarm/swarm-smoke: first version trigger has-chunks on timeout
* cmd/swarm/swarm-smoke: finalize trigger to chunk debug
* cmd/swarm/swarm-smoke: fixed httpEndpoint for trigger
* cmd/swarm/swarm-smoke: port
* cmd/swarm/swarm-smoke: ws not rpc
* cmd/swarm/swarm-smoke: added debug output
* cmd/swarm/swarm-smoke: addressed PR comments
* cmd/swarm/swarm-smoke: renamed track-timeout and track-chunks
|
|\ \
| | |
| | | |
vendor: update bigcache
|
| | | |
|
| | | |
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* swarm/network: DRY out repeated giga comment
I not necessarily agree with the way we wait for event propagation.
But I truly disagree with having duplicated giga comments.
* p2p/simulations: encapsulate Node.Up field so we avoid data races
The Node.Up field was accessed concurrently without "proper" locking.
There was a lock on Network and that was used sometimes to access
the field. Other times the locking was missed and we had
a data race.
For example: https://github.com/ethereum/go-ethereum/pull/18464
The case above was solved, but there were still intermittent/hard to
reproduce races. So let's solve the issue permanently.
resolves: ethersphere/go-ethereum#1146
* p2p/simulations: fix unmarshal of simulations.Node
Making Node.Up field private in 13292ee897e345045fbfab3bda23a77589a271c1
broke TestHTTPNetwork and TestHTTPSnapshot. Because the default
UnmarshalJSON does not handle unexported fields.
Important: The fix is partial and not proper to my taste. But I cut
scope as I think the fix may require a change to the current
serialization format. New ticket:
https://github.com/ethersphere/go-ethereum/issues/1177
* p2p/simulations: Add a sanity test case for Node.Config UnmarshalJSON
* p2p/simulations: revert back to defer Unlock() pattern for Network
It's a good patten to call `defer Unlock()` right after `Lock()` so
(new) error cases won't miss to unlock. Let's get back to that pattern.
The patten was abandoned in 85a79b3ad3c5863f8612d25c246bcfad339f36b7,
while fixing a data race. That data race does not exist anymore,
since the Node.Up field got hidden behind its own lock.
* p2p/simulations: consistent naming for test providers Node.UnmarshalJSON
* p2p/simulations: remove JSON annotation from private fields of Node
As unexported fields are not serialized.
* p2p/simulations: fix deadlock in Network.GetRandomDownNode()
Problem: GetRandomDownNode() locks -> getDownNodeIDs() ->
GetNodes() tries to lock -> deadlock
On Network type, unexported functions must assume that `net.lock`
is already acquired and should not call exported functions which
might try to lock again.
* p2p/simulations: ensure method conformity for Network
Connect* methods were moved to p2p/simulations.Network from
swarm/network/simulation. However these new methods did not follow
the pattern of Network methods, i.e., all exported method locks
the whole Network either for read or write.
* p2p/simulations: fix deadlock during network shutdown
`TestDiscoveryPersistenceSimulationSimAdapter` often got into deadlock.
The execution was stuck on two locks, i.e, `Kademlia.lock` and
`p2p/simulations.Network.lock`. Usually the test got stuck once in each
20 executions with high confidence.
`Kademlia` was stuck in `Kademlia.EachAddr()` and `Network` in
`Network.Stop()`.
Solution: in `Network.Stop()` `net.lock` must be released before
calling `node.Stop()` as stopping a node (somehow - I did not find
the exact code path) causes `Network.InitConn()` to be called from
`Kademlia.SuggestPeer()` and that blocks on `net.lock`.
Related ticket: https://github.com/ethersphere/go-ethereum/issues/1223
* swarm/state: simplify if statement in DBStore.Put()
* p2p/simulations: remove faulty godoc from private function
The comment started with the wrong method name.
The method is simple and self explanatory. Also, it's private.
=> Let's just remove the comment.
|
| |
| |
| |
| |
| |
| |
| |
| | |
* swarm/pss: split pss and keystore
* swarm/pss: moved whisper to keystore
* swarm/pss: goimports fixed
|
| | |
|
| | |
|
|\ \
| | |
| | | |
vendor: pull in upstream syscall fixes for non-linux/arm64
|
| | | |
|
| | | |
|
|/ / |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* swarm/network: new saturation for implementation
* swarm/network: re-added saturation func in Kademlia as it is used elsewhere
* swarm/network: saturation with higher MinBinSize
* swarm/network: PeersPerBin with depth check
* swarm/network: edited tests to pass new saturated check
* swarm/network: minor fix saturated check
* swarm/network/simulations/discovery: fixed renamed RPC call
* swarm/network: renamed to isSaturated and returns bool
* swarm/network: early depth check
|
|\ \
| | |
| | | |
vendor: update syscalls dependency
|
|/ / |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
swarm/network/stream: remove netstore internal wg
swarm/network/stream: run individual tests with t.Run
|
| |
| |
| |
| |
| |
| |
| |
| | |
* clef: implement documentation generation + remove unused struct
* clef: formatting + spelling
* clef: updates to doc
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* swarm/network/stream: newStreamerTester cleanup only if err is nil
* swarm/network/stream: raise newStreamerTester waitForPeers timeout
* swarm/network/stream: fix data races in GetPeerSubscriptions
* swarm/storage: prevent data race on LDBStore.batchesC
https://github.com/ethersphere/go-ethereum/issues/1198#issuecomment-461775049
* swarm/network/stream: fix TestGetSubscriptionsRPC data race
https://github.com/ethersphere/go-ethereum/issues/1198#issuecomment-461768477
* swarm/network/stream: correctly use Simulation.Run callback
https://github.com/ethersphere/go-ethereum/issues/1198#issuecomment-461783804
* swarm/network: protect addrCountC in Kademlia.AddrCountC function
https://github.com/ethersphere/go-ethereum/issues/1198#issuecomment-462273444
* p2p/simulations: fix a deadlock calling getRandomNode with lock
https://github.com/ethersphere/go-ethereum/issues/1198#issuecomment-462317407
* swarm/network/stream: terminate disconnect goruotines in tests
* swarm/network/stream: reduce memory consumption when testing data races
* swarm/network/stream: add watchDisconnections helper function
* swarm/network/stream: add concurrent counter for tests
* swarm/network/stream: rename race/norace test files and use const
* swarm/network/stream: remove watchSim and its panic
* swarm/network/stream: pass context in watchDisconnections
* swarm/network/stream: add concurrent safe bool for watchDisconnections
* swarm/storage: fix LDBStore.batchesC data race by not closing it
|
| |
| |
| |
| | |
functions (#19040)
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* swarm/storage: fix HashExplore concurrency bug ethersphere#1211
* swarm/storage: lock as value not pointer
* swarm/storage: wait for to complete
* swarm/storage: fix linter problems
* swarm/storage: append to nil slice
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* clef: initial implementation of bidirectional RPC communication for the UI
* signer: fix tests to pass + formatting
* clef: fix unused import + formatting
* signer: gosimple nitpicks
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* signer/clef: make use of json-rpc notification
* signer: tidy up output of OnApprovedTx
* accounts/external, signer: implement remote signing of text, make accounts_sign take hexdata
* clef: added basic testscript
* signer, external, api: add clique signing test to debug rpc, fix clique signing in clef
* signer: fix clique interoperability between geth and clef
* clef: rename networkid switch to chainid
* clef: enable chainid flag
* clef, signer: minor changes from review
* clef: more tests for signer
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* common/fdlimit: cap on MacOS file limits, fixes #18994
* common/fdlimit: fix Maximum-check to respect OPEN_MAX
* common/fdlimit: return error if OPEN_MAX is exceeded in Raise()
* common/fdlimit: goimports
* common/fdlimit: check value after setting fdlimit
* common/fdlimit: make comment a bit more descriptive
* cmd/utils: make fdlimit happy path a bit cleaner
|
| |
| |
| |
| |
| |
| |
| |
| | |
* build: use sftp for launchpad uploads
* .travis.yml: configure sftp export
* build: update CI docs
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
core: repro #18977
|
| | | |
|
|/ / |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
ethapi: default to use eip-155 protected transactions
|
| | | |
|
|\ \ \
| | | |
| | | | |
cmd/utils, eth: relinquish GC cache to read cache in archive mode
|
| | | | |
|
| | | | |
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
contracts/*: golint updates for this or self warning
|
| | | | |
|
|/ / / |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* node: close AccountsManager in new Close method
* p2p/simulations, p2p/simulations/adapters: handle node close on shutdown
* node: move node ephemeralKeystore cleanup to stop method
* node: call Stop in Node.Close method
* cmd/geth: close node.Node created with makeFullNode in cli commands
* node: close Node instances in tests
* cmd/geth, node: minor code style fixes
* cmd, console, miner, mobile: proper node Close() termination
|
|/ / |
|
|\ \
| | |
| | | |
cmd/puppeth: handle pre-set Petersburg number, save changed fork rules
|
| | | |
|
|/ / |
|
| |
| |
| |
| |
| |
| | |
* docs: add audit reports
* docs: better filenames
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Named functions and defined a basic EIP191 content type list
* Written basic content type functions
* Added ecRecover method in the clef api
* Updated the extapi changelog and addded indications in the README
* Changed the version of the external API
* Added tests for 0x45
* Implementing UnmarshalJSON() for TypedData
* Working on TypedData
* Solved the auditlog issue
* Changed method to signTypedData
* Changed mimes and implemented the 'encodeType' function for EIP-712
* Polished docstrings, ran goimports and swapped fmt.Errorf with errors.New where possible
* Drafted recursive encodeData
* Ran goimports and gofmt
* Drafted first version of EIP-712, including tests
* Temporarily switched to using common.Address in tests
* Drafted text/validator and and rewritten []byte as hexutil.Bytes
* Solved stringified address encoding issue
* Changed the property type required by signData from bytes to interface{}
* Fixed bugs in 'data/typed' signs
* Brought legal warning back after temporarily disabling it for development
* Added example RPC calls for account_signData and account_signTypedData
* Named functions and defined a basic EIP191 content type list
* Written basic content type functions
* Added ecRecover method in the clef api
* Updated the extapi changelog and addded indications in the README
* Added tests for 0x45
* Implementing UnmarshalJSON() for TypedData
* Working on TypedData
* Solved the auditlog issue
* Changed method to signTypedData
* Changed mimes and implemented the 'encodeType' function for EIP-712
* Polished docstrings, ran goimports and swapped fmt.Errorf with errors.New where possible
* Drafted recursive encodeData
* Ran goimports and gofmt
* Drafted first version of EIP-712, including tests
* Temporarily switched to using common.Address in tests
* Drafted text/validator and and rewritten []byte as hexutil.Bytes
* Solved stringified address encoding issue
* Changed the property type required by signData from bytes to interface{}
* Fixed bugs in 'data/typed' signs
* Brought legal warning back after temporarily disabling it for development
* Added example RPC calls for account_signData and account_signTypedData
* Polished and fixed PR
* Polished and fixed PR
* Solved malformed data panics and also wrote tests
* Solved malformed data panics and also wrote tests
* Added alphabetical sorting to type dependencies
* Added alphabetical sorting to type dependencies
* Added pretty print to data/typed UI
* Added pretty print to data/typed UI
* signer: more tests for typed data
* signer: more tests for typed data
* Fixed TestMalformedData4 errors and renamed IsValid to Validate
* Fixed TestMalformedData4 errors and renamed IsValid to Validate
* Fixed more new failing tests and deanonymised some functions
* Fixed more new failing tests and deanonymised some functions
* Added types to EIP712 output in cliui
* Added types to EIP712 output in cliui
* Fixed regexp issues
* Fixed regexp issues
* Added pseudo-failing test
* Added pseudo-failing test
* Fixed false positive test
* Fixed false positive test
* Added PrettyPrint method
* Added PrettyPrint method
* signer: refactor formatting and UI
* signer: make ui use new message format for signing
* Fixed breaking changes
* Fixed rules_test failing test
* Added extra regexp for reference types
* signer: more hard types
* Fixed failing test, formatted files
* signer: use golang/x keccak
* Fixed goimports error
* clef, signer: address some review concerns
* Implemented latest recommendations
* Fixed comments and uintint256 issue
* accounts, signer: fix mimetypes, add interface to sign data with passphrase
* signer, accounts: remove duplicated code, pass hash preimages to signing
* signer: prevent panic in type assertions, make cliui print rawdata as quotable-safe
* signer: linter fixes, remove deprecated crypto dependency
* accounts: fix goimport
|
| | |
|
| | |
|
| |
| |
| | |
Fixes #16286
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* accounts, eth, clique: implement external backend + move sighash calc to backend
* signer: implement account_Version on external API
* accounts/external: enable ipc, add copyright
* accounts, internal, signer: formatting
* node: go fmt
* flags: disallow --dev in combo with --externalsigner
* accounts: remove clique-specific signing method, replace with more generic
* accounts, consensus: formatting + fix error in tests
* signer/core: remove (test-) import cycle
* clique: remove unused import
* accounts: remove CliqueHash and avoid dependency on package crypto
* consensus/clique: unduplicate header encoding
|
| | |
|
| | |
|
|\ \
| | |
| | | |
cmd, core, params: add support for Goerli
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
New APIs added:
client.RegisterName(namespace, service) // makes service available to server
client.Notify(ctx, method, args...) // sends a notification
ClientFromContext(ctx) // to get a client in handler method
This is essentially a rewrite of the server-side code. JSON-RPC
processing code is now the same on both server and client side. Many
minor issues were fixed in the process and there is a new test suite for
JSON-RPC spec compliance (and non-compliance in some cases).
List of behavior changes:
- Method handlers are now called with a per-request context instead of a
per-connection context. The context is canceled right after the method
returns.
- Subscription error channels are always closed when the connection
ends. There is no need to also wait on the Notifier's Closed channel
to detect whether the subscription has ended.
- Client now omits "params" instead of sending "params": null when there
are no arguments to a call. The previous behavior was not compliant
with the spec. The server still accepts "params": null.
- Floating point numbers are allowed as "id". The spec doesn't allow
them, but we handle request "id" as json.RawMessage and guarantee that
the same number will be sent back.
- Logging is improved significantly. There is now a message at DEBUG
level for each RPC call served.
|
|/ / |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change clears up confusion around the two ways in which nodes
can be added to the table.
When a neighbors packet is received as a reply to findnode, the nodes
contained in the reply are added as 'seen' entries if sufficient space
is available.
When a ping is received and the endpoint verification has taken place,
the remote node is added as a 'verified' entry or moved to the front of
the bucket if present. This also updates the node's IP address and port
if they have changed.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#17321)
* cmd, eth: Added in the flag to step geth once sync based on input
* cmd, eth: 16400 Add an option to stop geth once in sync.
* cmd: 16400 Add an option to stop geth once in sync. WIP
* cmd/geth/main, les/fletcher: added in light mode support
* cmd/geth/main, les/fletcher: Cleaned Comments and code for light mode
* cmd: 16400 Fixed formatting issue and cleaned code
* cmd, eth, les: 16400 Fixed formatting issues
* cmd, eth, les: Performed gofmt to update formatting
* cmd, eth, les: Fixed bugs resulting formatting
* cmd/geth, eth/, les: switched to downloader event
* eth: Fixed styling and gen_config
* eth/: Fix nil error in config file
* cmd/geth: Updated countdown log
* les/fetcher.go: Removed depcreated channel
* eth/downloader.go: Removed deprecated select
* cmd/geth, cmd/utils: Fixed minor issues
* eth: Reverted config files to proper format
* eth: Fixed typo in config file
* cmd/geth, eth/down: Updated code to use header time stamp
* eth/downloader: Changed the time threshold to 10 minutes
* cmd/geth, eth/downloader: Updated downloading event to pass latest header
* cmd/geth: Updated main to use right timer object
* cmd/geth: Removed unused failed event
* cmd/geth: added in correct time field with type assertion
* cmd/geth, cmd/utils: Updated flag to use boolean
* cmd/geth, cmd/utils, eth/downloader: Cleaned up code based on recommendations
* cmd/geth: Removed unneeded import
* cmd/geth, eth/downloader: fixed event field and suggested changes
* cmd/geth, cmd/utils: Updated flag and linting issue
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change resolves multiple issues around handling of endpoint proofs.
The proof is now done separately for each IP and completing the proof
requires a matching ping hash.
Also remove waitping because it's equivalent to sleep. waitping was
slightly more efficient, but that may cause issues with findnode if
packets are reordered and the remote end sees findnode before pong.
Logging of received packets was hitherto done after handling the packet,
which meant that sent replies were logged before the packet that
generated them. This change splits up packet handling into 'preverify'
and 'handle'. The error from 'preverify' is logged, but 'handle' happens
after the message is logged. This fixes the order. Packet logs now
contain the node ID.
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
| |
dput --passive should make repo pushes from Travis work again.
dput --no-upload-log works around an issue I had while uploading locally.
debuild -d says that debuild shouldn't check for build dependencies when
creating the source package. This option is needed to make builds work
in environments where the installed Go version doesn't match the
declared dependency in the source package.
|
| |
|
|
|
|
|
| |
This PR is replacing the metrics.influxdb.host.tag cmd-line flag with metrics.influxdb.tags - a comma-separated key/value tags, that are passed to the InfluxDB reporter, so that we can index measurements with multiple tags, and not just one host tag.
This will be useful for Swarm, where we want to index measurements not just with the host tag, but also with bzzkey and git commit version (for long-running deployments).
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When some of the same messages are redefined anywhere in a Go project,
the protobuf package panics (see
https://github.com/golang/protobuf/issues/178).
Since this package is internal, there is no way to work around it, as
one cannot use it directly, but also cannot define the same messages.
There is no downside in making the package accessible.
|
| |
|
|
|
| |
Also say that cmd/bootnode is not for production use.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This change unbreaks the build and removes racy access to
disableCheckFreq. Even though the field is set while holding
the lock, it was read outside of the protected section.
|
| |
|
| |
|
|
|
|
| |
testLDBStoreRemoveThenCollectGarbage (#18512)
|
|
|
|
|
|
|
| |
When opening the wallet, ask for passphrase as well as for the PIN
and return the relevant error (PIN/passphrase required). Open must then
be called again with either PIN or passphrase to advance the process.
This also updates the console bridge to support passphrase authentication.
|