Commit Graph

10967 Commits

Author SHA1 Message Date
Felföldi Zsolt 40cdcf8c47 les, light: implement ODR transaction lookup by hash (#19069)
* les, light: implement ODR transaction lookup by hash

* les: delete useless file

* internal/ethapi: always use backend to find transaction

* les, eth, internal/ethapi: renamed GetCanonicalTransaction to GetTransaction

* light: add canonical header verification to GetTransaction
2019-05-13 14:41:10 +03:00
Felföldi Zsolt f4fb1a1801 les: fixed cost table update (#19546) 2019-05-13 14:26:47 +03:00
Péter Szilágyi 751effa35e
core: fix formatting error (trailing whitepace) 2019-05-13 14:07:55 +03:00
Péter Szilágyi a0b81097ad
Merge pull request #19562 from holiman/fix_tabcrash
p2p/discover: fix nil-dereference due to race
2019-05-13 13:31:45 +03:00
PilkyuJung ec2131c8d3 core: move error variable to error.go (#19560)
* move error variable to error.go

* Update error.go

Edit "Genesis" to "genesis"
2019-05-13 13:23:32 +03:00
Martin Holst Swende 95263914fc
p2p/discover: fix a race where table loop would self-lookup before returning from constructor 2019-05-13 11:30:31 +02:00
Elad db83ba4067 cmd/swarm: skip export test on windows builds (#19555) 2019-05-13 10:27:27 +02:00
Anton Evangelatov c8a77d8604
swarm/metrics: track runtime metrics (#19557) 2019-05-13 09:55:11 +02:00
holisticode 7744241886 swarm/network/stream: add pure retrieval test (#19552) 2019-05-11 12:55:06 +02:00
Péter Szilágyi 6ec6b29051
core: fix import errors on clique crashes + empty blocks (#19544)
* core: fix import errors on clique crashes + empty blocks

* cosensus/clique, core: add test for the mirrored state issue

* core: address todo question wrt log count

* core: raise a louder warning for non-clique known blocks
2019-05-10 17:04:10 +03:00
Péter Szilágyi 494f5d448a
Merge pull request #19550 from ethersphere/swarm-rather-stable
swarm v0.4-rc1
2019-05-10 14:09:01 +03:00
Elad 9b1543c282 swarm/network: update syncer metrics 2019-05-10 12:29:27 +02:00
Anton Evangelatov 297fa1855c swarm/network: measure addPeer and deletePeer to know if Kad rearranged
swarm/storage: remove traces for put/get/set (#1389)

* swarm/storage: remove traces for put/get/set

* swarm/storage: remove Has traces
2019-05-10 12:29:27 +02:00
Elad 84dfaea246 swarm: instrument setNextBatch
swarm/storage/localstore: add gc metrics, disable flaky test
2019-05-10 12:29:22 +02:00
Anton Evangelatov 3e9ba57669 swarm/storage: improve instrumentation
swarm/storage/localstore: fix broken metric (#1373)

p2p/protocols: count different messages (#1374)

cmd/swarm: disable snapshot create test due to constant flakes (#1376)

swarm/network: remove redundant goroutine (#1377)
2019-05-10 12:27:04 +02:00
lash 7f753461ca swarm/pss: disable failing handshake test 2019-05-10 12:26:59 +02:00
Anton Evangelatov 8802b9ce7f swarm-smoke: add syncDelay flag
swarm/network: add want delay timer to syncing (#1367)

swarm/network: synchronise peer.close() (#1369)
2019-05-10 12:26:55 +02:00
Elad ad6c39012f swarm: push tags integration - request flow
swarm/api: integrate tags to count chunks being split and stored
swarm/api/http: integrate tags in middleware for HTTP `POST` calls and assert chunks being calculated and counted correctly
swarm: remove deprecated and unused code, add swarm hash to DoneSplit signature, remove calls to the api client from the http package
2019-05-10 12:26:52 +02:00
Janoš Guljaš 3030893a21 swarm/network: update syncing 2019-05-10 12:26:49 +02:00
Elad 12240baf61 swarm/chunk: add tags data type
* swarm/chunk: add tags backend to chunk package
2019-05-10 12:26:45 +02:00
Anton Evangelatov f8eb8fe64c cmd/swarm-smoke: check if chunks are at most prox host
swarm/network: measure how many chunks a node delivers (#1358)
2019-05-10 12:26:41 +02:00
Elad a1cd7e6e92 p2p/protocols, swarm/network: fix resource leak with p2p teardown 2019-05-10 12:26:37 +02:00
Janoš Guljaš c1213bd00c swarm: LocalStore metrics
* swarm/shed: remove metrics fields from DB struct

* swarm/schunk: add String methods to modes

* swarm/storage/localstore: add metrics and traces

* swarm/chunk: unknown modes without spaces in String methods

* swarm/storage/localstore: remove bin number from pull subscription metrics

* swarm/storage/localstore: add resetting time metrics and code improvements
2019-05-10 12:26:33 +02:00
Anton Evangelatov 993b145f25 swarm/storage/localstore: fix export db.Put signature
cmd/swarm/swarm-smoke: improve smoke tests (#1337)

swarm/network: remove dead code (#1339)

swarm/network: remove FetchStore and SyncChunkStore in favor of NetStore (#1342)
2019-05-10 12:26:30 +02:00
Janoš Guljaš 996755c4a8 cmd/swarm, swarm: LocalStore storage integration 2019-05-10 12:26:26 +02:00
Péter Szilágyi c94d582aa7
Merge pull request #19539 from karalabe/faucet-updates
cmd/faucet: embed git commit hash/date, disable Google+
2019-05-09 00:49:14 +03:00
Péter Szilágyi ab10c15578
cmd/faucet: sunset Google+ authentication 2019-05-08 17:14:54 +03:00
Péter Szilágyi 9454508b23
cmd/faucet: embed git commit hash and date into the version 2019-05-08 17:11:33 +03:00
C. Brown be4d74f8d2 cmd, internal/build, docker: advertise commit date in unstable build versions (#19522)
* add-date-to unstable

* fields-insteadof-split

* internal/build: support building with missing git

* docker: add git history back to support commit date in version

* internal/build: use PR commits hashes for PR builds
2019-05-08 16:44:28 +03:00
gary rong c113723fdb core: handle importing known blocks more gracefully (#19417)
* core: import known blocks if they can be inserted as canonical blocks

* core: insert knowns blocks

* core: remove useless

* core: doesn't process head block in reorg function
2019-05-08 14:30:36 +03:00
Péter Szilágyi 78477e4118
Merge pull request #19534 from karalabe/downloader-delay-fix
eth/downloader: fix header delays during chain dedup
2019-05-08 12:15:17 +03:00
Samuel Marks e770f62445 appveyor: Upgrade Go to v1.12.5 (#19536) 2019-05-08 12:11:08 +03:00
Guillaume Ballet 9b831d74fb accounts/usbwallet: fix a comment typo in trezor driver (#19535) 2019-05-07 19:22:24 +03:00
Péter Szilágyi 85726fdb02
eth/downloader: fix header delays during chain dedup 2019-05-07 16:09:11 +03:00
Kurkó Mihály 107c67d74e accounts, cmd, internal, signer: add note about backing up the keystore (#19432)
* accounts: add note about backing up the keystore

* cmd, accounts: move the printout to accountCreate

* internal, signer: add info when new account is created via rpc

* cmd, internal, signer: split logs

* cmd/geth: make account new output a bit more verbose
2019-05-07 15:49:51 +03:00
Martin Holst Swende c8cf360f29
core: fix canonicality confusion (#19514)
* core: add tests for canonicality confusion

* core: delete stale future canon number mappings during reorg to shorter+heavier chain
2019-05-07 14:26:00 +02:00
gary rong 14868a37fb trie: clarify why verifyProof doesn't check hashes (#19530)
* trie: fix merkle proof

* trie: use hasher instead of allocate keccack256 every time

* trie: add comments
2019-05-07 15:06:07 +03:00
유용환 abeba0a1de core/rawdb: fix typo (#19526) 2019-05-04 12:17:47 +02:00
Péter Szilágyi b6c0234e0b
Merge pull request #19513 from fjl/p2p-discover-split-v4
p2p/discover: split out discv4 code
2019-05-02 17:30:49 +03:00
Martin Holst Swende 5036992b06 eth, les: add error when accessing missing block state (#18346)
This change makes getBalance, getCode, getStorageAt, getProof,
call, getTransactionCount return an error if the block number in
the request doesn't exist. getHeaderByNumber still returns null
for missing headers.
2019-05-02 14:50:23 +02:00
Martin Holst Swende 4c90efdf57 consensus,core,miner: avoid overhead of creating a new block (#19301)
* consensus,core,miner: avoid overhead of creating a new block

* consensus: nitpick dot

* consensus: fix some comment formatting nits
2019-04-30 16:42:36 +03:00
Felix Lange dba1750eda p2p/discover: split out discv4 code
This change restructures the internals of p2p/discover to make room for
the discv5 code which will soon be added to this package.

- packet type names now have a "V4" suffix.
- ListenUDP returns *UDPv4 instead of *Table. This technically breaks
  the API but the only caller in go-ethereum is package p2p, which uses
  a compatible interface and doesn't need changes.
- The internal transport interface is changed to make Table reusable for v5.
- The 'lookup' code moves from table to transport. This required
  updating the lookup unit test to use udpTest instead of a custom transport.
2019-04-30 13:13:22 +02:00
Felix Lange a43ec8bba5 internal/testlog: add logger for unit tests 2019-04-30 13:12:11 +02:00
Péter Szilágyi befca7e8b0
Merge pull request #19500 from karalabe/cht-txpool-open-limit
eth: enforce chain above CHT before accepting txs into the pool
2019-04-30 11:03:57 +03:00
gary rong af96b6644e internal/ethapi: estimate gas usage automatically (#19508) 2019-04-30 11:02:34 +03:00
Péter Szilágyi ed47f29bc8
eth: enforce chain above CHT before accepting txs into the pool 2019-04-26 12:45:12 +03:00
Hongbin Mao 504f88b65b core/rawdb: typo fix storea => stores (#19498)
* typo fix

* change to stores
2019-04-26 12:22:21 +03:00
Janoš Guljaš 3873a7314d swarm/network: fix data races in TestInitialPeersMsg test (#19490)
* swarm/network: fix data races in TestInitialPeersMsg test

* swarm/network: add Kademlia.Saturation method with lock

* swarm/network: add Hive.Peer method to safely retrieve a bzz peer

* swarm/network: remove duplicate comment

* p2p/testing: prevent goroutine leak in ProtocolTester

* swarm/network: fix data race in newBzzBaseTesterWithAddrs

* swarm/network: fix goroutone leaks in testInitialPeersMsg

* swarm/network: raise number of peer check attempts in testInitialPeersMsg

* swarm/network: use Hive.Peer in Hive.PeerInfo function

* swarm/network: reduce the scope of mutex lock in newBzzBaseTesterWithAddrs

* swarm/storage: disable TestCleanIndex with race detector
2019-04-25 21:33:18 +02:00
Péter Szilágyi 92a849a509
Merge pull request #19497 from karalabe/peers-50
cmd/utils, node: switch over default peer count to 50
2019-04-25 17:25:09 +03:00
Matthew Halpern 937417527c core: lookup txs by block number instead of block hash (#19431)
* core: lookup txs by block number instead of block hash

Transaction hashes now store a reference to their corresponding
block number as opposed to their hash. In benchmarks this was
shown to reduce storage by over 12 GB.

The main limitation of this approach is that transactions on
non-canonical blocks could never be looked up, however that is
currently not supported.

The database version has been upgraded to version 5 and the
transaction lookup process is backwards-compatible with the
prior two transaction lookup formats prexisting in the
database instance. Tests have been added to ensure this.

* core/rawdb: tiny review nit fixes
2019-04-25 17:24:55 +03:00