| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
This should reduce the occurences of travis failures on MacOS
Also fix some linter warnings
|
|
|
| |
Debug traces to investigate a travis issue on MacOS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Package p2p/enode provides a generalized representation of p2p nodes
which can contain arbitrary information in key/value pairs. It is also
the new home for the node database. The "v4" identity scheme is also
moved here from p2p/enr to remove the dependency on Ethereum crypto from
that package.
Record signature handling is changed significantly. The identity scheme
registry is removed and acceptable schemes must be passed to any method
that needs identity. This means records must now be validated explicitly
after decoding.
The enode API is designed to make signature handling easy and safe: most
APIs around the codebase work with enode.Node, which is a wrapper around
a valid record. Going from enr.Record to enode.Node requires a valid
signature.
* p2p/discover: port to p2p/enode
This ports the discovery code to the new node representation in
p2p/enode. The wire protocol is unchanged, this can be considered a
refactoring change. The Kademlia table can now deal with nodes using an
arbitrary identity scheme. This requires a few incompatible API changes:
- Table.Lookup is not available anymore. It used to take a public key
as argument because v4 protocol requires one. Its replacement is
LookupRandom.
- Table.Resolve takes *enode.Node instead of NodeID. This is also for
v4 protocol compatibility because nodes cannot be looked up by ID
alone.
- Types Node and NodeID are gone. Further commits in the series will be
fixes all over the the codebase to deal with those removals.
* p2p: port to p2p/enode and discovery changes
This adapts package p2p to the changes in p2p/discover. All uses of
discover.Node and discover.NodeID are replaced by their equivalents from
p2p/enode.
New API is added to retrieve the enode.Node instance of a peer. The
behavior of Server.Self with discovery disabled is improved. It now
tries much harder to report a working IP address, falling back to
127.0.0.1 if no suitable address can be determined through other means.
These changes were needed for tests of other packages later in the
series.
* p2p/simulations, p2p/testing: port to p2p/enode
No surprises here, mostly replacements of discover.Node, discover.NodeID
with their new equivalents. The 'interesting' API changes are:
- testing.ProtocolSession tracks complete nodes, not just their IDs.
- adapters.NodeConfig has a new method to create a complete node.
These changes were needed to make swarm tests work.
Note that the NodeID change makes the code incompatible with old
simulation snapshots.
* whisper/whisperv5, whisper/whisperv6: port to p2p/enode
This port was easy because whisper uses []byte for node IDs and
URL strings in the API.
* eth: port to p2p/enode
Again, easy to port because eth uses strings for node IDs and doesn't
care about node information in any way.
* les: port to p2p/enode
Apart from replacing discover.NodeID with enode.ID, most changes are in
the server pool code. It now deals with complete nodes instead
of (Pubkey, IP, Port) triples. The database format is unchanged for now,
but we should probably change it to use the node database later.
* node: port to p2p/enode
This change simply replaces discover.Node and discover.NodeID with their
new equivalents.
* swarm/network: port to p2p/enode
Swarm has its own node address representation, BzzAddr, containing both
an overlay address (the hash of a secp256k1 public key) and an underlay
address (enode:// URL).
There are no changes to the BzzAddr format in this commit, but certain
operations such as creating a BzzAddr from a node ID are now impossible
because node IDs aren't public keys anymore.
Most swarm-related changes in the series remove uses of
NewAddrFromNodeID, replacing it with NewAddr which takes a complete node
as argument. ToOverlayAddr is removed because we can just use the node
ID directly.
|
|
|
| |
The argument is inclusive rather than exclusive, according to docs.
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Changes in #15811 broke partial topic filtering. Re-enable it.
|
| |
|
|
|
|
|
|
| |
* keystore, ethash, eth, miner, rpc, whisperv6: tech debt with now defunct set.
* whisperv5: swap out gopkg.in/fatih/set.v0 with supported set
|
| |
|
|
|
|
|
|
|
|
|
|
| |
hardcoded port 30303 (#15687)
Improves test portability by resolving 127.0.0.1:0
to get a random free port instead of the hard coded one. Now
the test works if you have a running node on the same
interface already.
Fixes #15685
|
|
|
|
|
|
| |
ToECDSAPub was unsafe because it returned a non-nil key with nil X, Y in
case of invalid input. This change replaces ToECDSAPub with
UnmarshalPubkey across the codebase.
|
|
|
|
|
| |
(#16757)
Fixes #16756
|
|
|
|
| |
string (#16668)
|
|
|
|
|
|
|
|
| |
* whisper/mailserver: pass init error to the caller
* whisper/mailserver: add returns to fmt.Errorf
* whisper/mailserver: check err in mailserver init test
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
- Fixes #16271. What was appeneded was a pointer to
an object that changes during the iteration.
- The topic is allocated as a 4-byte array, fill partial topics
with 0s. Partial topics are currently disabled, but would
crash as they rely on the presence of byte number 3.
|
|\ |
|
| | |
|
|/
|
|
|
| |
The parameter `rand` is unused in `PrivateKey.Decrypt`. Decryption in
the ECIES encryption scheme is deterministic, so randomness isn't
needed.
|
|
|
|
| |
whisper: final refactoring
|
|\
| |
| | |
whisper: filereader mode introduced to wnode
|
| | |
|
|/ |
|
| |
|
|\
| |
| |
| |
| | |
whisper: message filtering optimization
Only run the message through filters who registered their interest.
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
whisper: fixed dataraces in peer unit tests
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
|/ |
|
| |
|
|\
| |
| | |
whisper: light client mode introduced
|
| | |
|
|\ \
| |/
|/| |
Fix race condition in whisperv6/peer.go
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
| |
* whisper: timeout extended
* whisper: test updated
* whisper: test updated
|
|
|
|
|
|
|
|
|
|
| |
The bulk of the issue was to adapt to the new requirement
that a v6 filter has to either contain a symmertric key or
an asymmetric one.
This commits revert one of the fixes that I made to remove
a linter warning: unexporting NewSentMessage. This is not
really a problem as I have a cleanup in the pipe that will
solve this issue.
|
|
|
|
|
|
| |
* whisper: bloom filter refactoring
* whisper: fixed full node
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#15870)
* whisper: message format changed
* whisper: tests fixed
* whisper: style fixes
* whisper: fixed names, fixed failing tests
* whisper: fix merge issue in #15870
Occured while using the github online merge tool. Lesson learned.
* whisper: fix a gofmt error for #15870
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* whisper: fixes warnings from the code linter
* whisper: more non-API-breaking changes
The remaining lint errors are because of auto-generated
files and one is because an exported function has a non-
exported return type. Changing this would break the API,
and will be part of another commit for easier reversal.
* whisper: un-export NewSentMessage to please the linter
This is an API change, which is why it's in its own commit.
This change was initiated after the linter complained that
the returned type wasn't exported. I chose to un-export
the function instead of exporting the type, because that
type is an implementation detail that I would like to
change in the near future to make the code more
readable and with an increased coverage.
* whisper: update gencodec output after upgrading it to new lint standards
|
|
|
|
|
|
|
|
|
|
|
|
| |
* whisper: fix empty topic
* whisper: add check to matchSingleTopic
* whisper: add tests
* whisper: fix gosimple
* whisper: added lastTopicByte const
|
|
|
| |
This is the main feature of v6.
|
|
|
| |
Fixes #15777 because null is now allowed for hexutil.Bytes.
|
| |
|
| |
|
|
|
|
| |
New Whisper-level message introduced (PoW requirement),
corresponding logic added, plus some tests.
|
|
|
|
|
| |
Changed the communication protocol for ordinary message,
according to EIP 627. Messages will be send in bundles, i.e.
array of messages will be sent instead of single message.
|
| |
|
|
|
|
|
| |
Now that the AES salt has been moved to the payload, padding must
be adjusted to hide it, lest an attacker guesses that the packet
uses symmetric encryption.
|
| |
|
|
|
|
| |
As per EIP-627, the salt for symmetric encryption is now
part of the payload. This commit does that.
|
| |
|
|
|
|
|
|
|
|
|
| |
* build: enable unconvert linter
- fixes #15453
- update code base for failing cases
* cmd/puppeth: replace syscall.Stdin with os.Stdin.Fd() for unconvert linter
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* whisper: Fix spelling and grammar in error
* whisper: Fix grammar in comments
|
|
|
|
|
|
| |
* whisper: fix megacheck warnings
* whisper/whisperv5: regenerate json codec to fix unused override type
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* whisper: salt removed from AES encryption
* whisper: padding format updated
* whisper: padding test added
* whisper: padding refactored, tests fixed
* whisper: padding test updated
* whisper: wnode bugfix
* whisper: send/receive protocol updated
* whisper: minor update
* whisper: bugfix in test
* whisper: updated parameter names and comments
* whisper: functions renamed
* whisper: minor refactoring
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* whisper: GetMessages fixed; size restriction updated
* whisper: made PoW and MaxMsgSize customizable
* whisper: test added
* whisper: sym key management changed
* whisper: identity management refactored
* whisper: API refactoring (Post and Filter)
* whisper: big refactoring complete
* whisper: spelling fix
* whisper: variable topic size allowed for a filter
* whisper: final update
* whisper: formatting
* whisper: file exchange introduced in wnode
* whisper: bugfix
* whisper: API updated + new tests
* whisper: statistics updated
* whisper: wnode server updated
* whisper: allowed filtering for variable topic size
* whisper: tests added
* whisper: resolving merge conflicts
* whisper: refactoring (documenting mostly)
* whsiper: tests fixed
* whisper: down cased error messages
* whisper: documenting the API functions
* whisper: logging fixed
* whisper: fixed wnode parameters
* whisper: logs fixed (typos)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* common: remove CurrencyToString
Move denomination values to params instead.
* common: delete dead code
* common: move big integer operations to common/math
This commit consolidates all big integer operations into common/math and
adds tests and documentation.
There should be no change in semantics for BigPow, BigMin, BigMax, S256,
U256, Exp and their behaviour is now locked in by tests.
The BigD, BytesToBig and Bytes2Big functions don't provide additional
value, all uses are replaced by new(big.Int).SetBytes().
BigToBytes is now called PaddedBigBytes, its minimum output size
parameter is now specified as the number of bytes instead of bits. The
single use of this function is in the EVM's MSTORE instruction.
Big and String2Big are replaced by ParseBig, which is slightly stricter.
It previously accepted leading zeros for hexadecimal inputs but treated
decimal inputs as octal if a leading zero digit was present.
ParseUint64 is used in places where String2Big was used to decode a
uint64.
The new functions MustParseBig and MustParseUint64 are now used in many
places where parsing errors were previously ignored.
* common: delete unused big integer variables
* accounts/abi: replace uses of BytesToBig with use of encoding/binary
* common: remove BytesToBig
* common: remove Bytes2Big
* common: remove BigTrue
* cmd/utils: add BigFlag and use it for error-checked integer flags
While here, remove environment variable processing for DirectoryFlag
because we don't use it.
* core: add missing error checks in genesis block parser
* common: remove String2Big
* cmd/evm: use utils.BigFlag
* common/math: check for 256 bit overflow in ParseBig
This is supposed to prevent silent overflow/truncation of values in the
genesis block JSON. Without this check, a genesis block that set a
balance larger than 256 bits would lead to weird behaviour in the VM.
* cmd/utils: fixup import
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* whisper: wnode updated for tests with geth
* whisper: updated processing of incoming messages
* whisper: symmetric encryption updated
* whisper: filter id type changed to enhance security
* whisper: allow filter without topic for asymmetric encryption
* whisper: POW updated
* whisper: logging updated
* whisper: spellchecker update
* whisper: error handling changed
* whisper: JSON field names fixed
|
|
|
|
|
|
|
|
|
|
|
| |
* vendor: add github.com/btcsuite/btcd/btcec
* crypto: add btcec fallback for sign/recover without cgo
This commit adds a non-cgo fallback implementation of secp256k1
operations.
* crypto, core/vm: remove wrappers for sha256, ripemd160
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* whisper: mailserver test introduced, refactoring
* whisper: validation test updated
* whisper: max number of peers fixed
* whisper: verification bug fixed
* whisper: esthetic fix
* whisper: interface changed to simplify the transition to v5
* whisper: preparation for version switch
|
| |
|
| |
|
|
|
|
|
| |
go get github.com/gordonklaus/ineffassign
ineffassign .
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This change couldn't be automated because HexNumber was used for numbers
of all sizes.
|
| |
|
|
|
|
|
|
|
|
|
| |
* whisper: refactored message processing
* whisper: final polishing
* whisper: logging updated
* whisper: moved the check, changed the default PoW
* whisper: refactoring of message queuing
* whisper: refactored parameters
|
|
|
|
|
|
|
|
|
|
| |
* Filter refactoring
* API tests added + bugfix
* fixed the error logs
* FilterID fixed
* test cases fixed
* key generation updated
* POW updated
* got rid of redundant stuff
|
|
|
|
|
|
|
| |
whisper: project restructured, version 5 introduced
This commits adds a draft version of the new shh v5 protocol.
The new version is not on by default, --shh still selects version 2.
|
|\
| |
| | |
all: fix go vet warnings
|
| | |
|
|/
|
|
|
|
| |
These tests have become a common annoyance on CI. Fix them by allowing
messages with expiration == now into the cache and delaying the check
for expired message handling slightly.
|
| |
|
|
|
|
|
|
|
|
| |
rpc: be less restrictive on the request id
rpc: improved documentation
console: upgrade web3.js to version 0.16.0
rpc: cache http connections
rpc: rename wsDomains parameter to wsOrigins
|
|
|
|
| |
As we aren't really using the standarized SHA-3
|
| |
|
|\
| |
| | |
rpc: new RPC implementation with pub/sub support
|
| | |
|
|/
|
|
| |
thanks to Felix Lange (fjl) for help with design & impl
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Whisper's expire and broadcast loops happen in two separate go routines.
Whenever an envelope is being expired it's removed from the set of
envelopes and it looses all information about the envelope, including
the "known hash". After the envelope has been removed it can be
re-accepted by a broadcasting peer putting back the envelope in the set
of envelopes. Since the envelope broadcast loop is separate of the
expire loop expired messages may be broadcast to other peer, resulting
in messages **never** being dropped.
This PR includes an expire check before adding new messages to the set
of envelopes.
|
| |
|
|
|
|
| |
I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
|
|
|
|
|
| |
All code outside of cmd/ is licensed as LGPL. The headers
now reflect this by calling the whole work "the go-ethereum library".
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Bugs fixed:
- Use randomly generated flags as the spec required.
- During envelope opening check the first bit only for signature.
|
| |
|
| |
|
|\
| |
| |
| |
| | |
Gustav-Simonsson/forward_ecrecover_err_and_remove_dup_checks
Forward and log EC recover err and remove dup pubkey len check
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
I have rewritten the protocol test to use p2p.MsgPipe because
p2p.NewMsg is gone.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* Added an additional tx state which is used to get the current nonce
* Refresh transient state each time a new canonical block is found
* Properly uninstall filters. Fixes a possible crash in RPC
|
|
|
|
|
| |
* ECIES moved from obscuren to ethereum
* Added html META[name=badge] to reflect menuItem.secondaryTitle
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* Unrecoverable messages would cause segfault when recovering invalid
pub key
|
|
|
|
|
| |
* Browser now has tabs
* Fixed a callback issue
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Whisper protocol wasn't properly suppling envelope slices
* Message history wasn't properly propagated
* Added 'Messages' method, filtering any current envelope with the
supplied filter.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
|/ |
|
|
|
|
|
| |
* Added filters / watches
* Removed event dep
|
| |
|
| |
|
| |
|
| |
|
|
|