Commit Graph

5553 Commits

Author SHA1 Message Date
Fabian Vogelsteller
576393550d add extra space to miner icon 2015-04-17 15:00:37 +02:00
Felix Lange
7180699d40 rlp: require declared number of input elements for array types 2015-04-17 14:45:10 +02:00
Felix Lange
9c7281c17e p2p: make DiscReason bigger than byte
We decode into [1]DiscReason in a few places. That doesn't work anymore
because package rlp no longer accepts RLP lists for byte arrays.
2015-04-17 14:45:10 +02:00
Felix Lange
4d5a518a0b rlp: stop accepting lists for byte slices and byte arrays 2015-04-17 14:45:10 +02:00
Felix Lange
574d5d6ae6 core/types: add rlp tag "nil" for Transaction.Recipient 2015-04-17 14:45:10 +02:00
Felix Lange
cad64fb911 rlp: stricter rules for structs and pointers
The rules have changed as follows:

* When decoding into pointers, empty values no longer produce
  a nil pointer. This can be overriden for struct fields using the
  struct tag "nil".
* When decoding into structs, the input list must contain an element
  for each field.
2015-04-17 14:45:09 +02:00
Felix Lange
1e2c93aa2d rlp: reject non-minimal input strings
Input strings of length 1 containing a byte < 56 are non-minimal and
should be encoded as a single byte instead. Reject such strings.
2015-04-17 14:45:09 +02:00
Felix Lange
6e9f8035a1 rlp: stricter validation of canonical integer format
All integers (including size information in type tags) need to be
encoded using the smallest possible encoding. This commit expands the
stricter validation introduced for *big.Int in commit 59597d23a5
to all integer types and size tags.
2015-04-17 14:45:09 +02:00
Felix Lange
6788f955c2 rlp: fix handling of single byte zero when decoding into a pointer
A single zero byte carries information and should not set the pointer
to nil. This is arguably a corner case. While here, fix the comment
to explain pointer reuse.
2015-04-17 14:45:09 +02:00
Felix Lange
509d0a8d78 whisper: fix comment for rlpenv 2015-04-17 14:45:09 +02:00
Felix Lange
eedbb1ee9a p2p/discover: use rlp.DecodeBytes 2015-04-17 14:45:09 +02:00
Felix Lange
2750ec47b7 rlp: fix integer overflow in list element size validation
It is not safe to add anything to s.size.
2015-04-17 14:45:09 +02:00
Felix Lange
56a48101dc cmd/rlpdump, cmd/utils, eth, p2p, whisper: use rlp input limit 2015-04-17 14:45:09 +02:00
Felix Lange
c35f4fd0bd rlp: check top-level value sizes against input limit
This is a preliminary fix for #420 (SEC-18 RLP decoder unsafe
allocation). If a sane input limit is set on the rlp.Stream,
it should no longer be possible to cause huge []byte allocations.
2015-04-17 14:42:41 +02:00
Felix Lange
4020258801 Merge pull request #718 from karalabe/whisper-cleanup
Whisper cleanup, part 2
2015-04-17 14:10:55 +02:00
obscuren
73eb8e8c20 eth: basic implementation of the downloader 2015-04-17 13:54:18 +02:00
Péter Szilágyi
4afc22ba6e whisper: cleanup lefover scoping 2015-04-17 14:11:46 +03:00
Péter Szilágyi
bd14bd6c5b whisper: hide some internal types 2015-04-17 13:25:18 +03:00
Jeffrey Wilcke
d3ed3285e9 Merge pull request #733 from fjl/p2p-dial-timer
p2p: fix the dial timer
2015-04-17 11:32:55 +02:00
Felix Lange
5528abc795 p2p: fix the dial timer
The dial timer was not reset properly when the peer count reached
MaxPeers.
2015-04-17 08:17:01 +02:00
Jeffrey Wilcke
545ff1e3f3 Merge pull request #728 from tgerring/issue727
Fix RPC Call output when empty
2015-04-17 00:17:40 +02:00
obscuren
2c2ddcbf88 Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop 2015-04-17 00:11:58 +02:00
obscuren
eac2df02d1 downloader: fixed a typo 2015-04-17 00:11:45 +02:00
Jeffrey Wilcke
b6d1724dd9 Merge pull request #730 from Gustav-Simonsson/update_transaction_tests
Update transaction tests
2015-04-17 00:09:10 +02:00
Bas van Kervel
ead3dd9759 Stop accepted and alive connections (http keep-alive) when the rpc service is stopped 2015-04-16 19:23:57 +02:00
Péter Szilágyi
e5a03eb066 whisper: don't issue signature warning if none present 2015-04-16 18:24:39 +03:00
Bas van Kervel
57f93d25bd admin.stopRPC support added which stops the RPC HTTP listener 2015-04-16 12:56:51 +02:00
Péter Szilágyi
e5e91e9eb3 whisper: track active peers, add peer cache expiry test 2015-04-16 13:05:35 +03:00
Péter Szilágyi
ee6531c5ff whisper: remove dead code, rename a few constants 2015-04-16 11:20:01 +03:00
obscuren
205378016f downloader: added demotion / promotion in prep. for rep. system 2015-04-16 02:16:33 +02:00
obscuren
eda10c7317 downloader: updated downloader and fixed issues with catch up
Properly ignore blocks coming from peers not in our peer list (blocked)
and do never request anything from bad peers. Added some checks to
account for blocks known when requesting hashes (missing parents).
2015-04-16 01:29:32 +02:00
obscuren
3a51c3b584 Merge branch 'develop' into downloader-proto 2015-04-16 01:28:24 +02:00
obscuren
c4678ffd77 downloader: updated downloader and fixed issues with catch up
Properly ignore blocks coming from peers not in our peer list (blocked)
and do never request anything from bad peers. Added some checks to
account for blocks known when requesting hashes (missing parents).
2015-04-16 00:14:31 +02:00
obscuren
dff39553d4 core: changed split detection to also account for number less than 2015-04-16 00:11:40 +02:00
Gustav Simonsson
c617a6ec79 Fixes for TransactionTests
* Include tests which now has consistent HEX encodings
* Comment out two failing tests: "
  "TransactionWithHihghNonce" due to wrong nonce size
  "TransactionWithSvalueHigh" due to wrong ECDSA s range
* Cleanup conversion functions and fix expected encodings for
  tests validation fields
2015-04-15 22:37:16 +02:00
Gustav Simonsson
2d8a2d0c99 Update JSON tests 2015-04-15 22:36:33 +02:00
Taylor Gerring
6388767df0 Fix call output when empty 2015-04-15 12:45:20 -05:00
obscuren
ec6cbb914b miner: start a newly registered agent if the miner is running. Closes #681 2015-04-15 17:04:22 +02:00
obscuren
52c874a609 common: Added debug reporter
NOTE: For known, non-consensus, hard to reproduce bugs consider the
following method `common.Report("extra", stuff, "you need logged")` will
give you a stack trace and a friendly request to submit it as an issue
on our issue tracker.
2015-04-15 16:39:44 +02:00
obscuren
eaf73b55bc miner: moved bad uncle logging to ridiculous log level. Closes #720 2015-04-15 12:12:20 +02:00
Péter Szilágyi
6ceb253f74 whisper: use async handshakes to handle blocking peers 2015-04-15 13:01:22 +03:00
obscuren
5d2138a2b2 core: fixed issue for logs filter. Closes #629
Log filter `Address` field was cast to a Hash which causes it to always
fail.
2015-04-15 11:59:41 +02:00
obscuren
ccb4722a59 core/types: Changed bloom lookup to take anything bytes backed 2015-04-15 11:58:45 +02:00
Péter Szilágyi
46ea193a49 whisper: remove some unneeded testing complexity 2015-04-15 12:50:10 +03:00
Péter Szilágyi
bcf41797ca whisper: global message expiration tests, polishes 2015-04-15 10:50:31 +03:00
obscuren
d82aaf617c rpc: changed logging to use glog 2015-04-15 00:09:13 +02:00
obscuren
f46af4508b geth: fixed failing cli tests 2015-04-14 21:26:28 +02:00
obscuren
8db7b2374c rpc: change eth_protocolVersion to eth_version. Closes #714 2015-04-14 20:47:21 +02:00
Péter Szilágyi
4fb7ab5d09 whisper: mock tests to use simulated peers 2015-04-14 19:00:57 +03:00
Péter Szilágyi
86372b20c0 whisper: add basic tests for the whiper peers 2015-04-14 18:21:56 +03:00