aboutsummaryrefslogtreecommitdiffstats
path: root/consensus
Commit message (Collapse)AuthorAgeFilesLines
* core: add GovUtil to unify governance state related accessWei-Ning Huang2019-09-172-7/+16
| | | | | Add GovUtil so we could use the same logic in everywhere that requires access to governance state, such as configuration and CRS.
* import: switch consensus core to ↵Wei-Ning Huang2019-09-172-9/+9
| | | | gitlab.com/tangerine-network/tangerine-consensus
* Rebrand as tangerine-network/go-tangerineWei-Ning Huang2019-09-1719-107/+107
|
* consensus: dexcon: set correct tx fee receiverWei-Ning Huang2019-06-151-1/+1
|
* dexcon: correctly fine DKGSet for not producing blocks (#325)Wei-Ning Huang2019-06-152-23/+26
|
* vendor: sync to latest core (#320)Jimmy Hu2019-06-151-9/+1
| | | | | | | | * vendor: sync to latest core * dex, core: fix conflict x
* core: fix finalize logic (#302)Jimmy Hu2019-06-131-2/+4
|
* core: set extended round block reward to zero (#298)Wei-Ning Huang2019-06-132-19/+35
| | | | | To discourage DKG set from prolonging the round indefinitely, we set the block reward of the extended round to 0. The gas fee is send to the DEXON governance owner for safe keeping and later used by the foundation.
* consensus: dexcon: disqualify dead node (#280)Wei-Ning Huang2019-06-132-6/+46
| | | | | | | | | | Since a qualified node might fail stopped, we need to remove them from qualified nodes to maintain network integrity. We do this by inspect the previous round to see if there are dead nodes. A dead node is a notary set node that does not propose any block in the previous round. We disqualify them by fining them so their staked value is 1 wei below minStake. This make them unqualified for being notary set in the follow on rounds.
* core: vm: flatten governanceWei-Ning Huang2019-06-123-9/+15
|
* core: Remove K, Phi and NumChains from Governance (#198)Jimmy Hu2019-06-122-27/+11
| | | | | | * change default sync_core.sh * vendor: sync to latest core * core: Remove K, Phi and NumChain
* consensus: dexcon: snapshot round height when finalizing block (#170)Wei-Ning Huang2019-06-121-1/+8
| | | | Instead of having BP to send a tx to register the round height, just modify the state when finalizing block.
* core, dex/downloader: polish headers verification and blocks insertion logic ↵Sonic2019-06-122-0/+302
| | | | | | | | (#168) Refactor GenerateDexonChain function, move governance tx logic to the user of GenerateDexonChain (testchain_test.go) and move fake node set code to FakeDexcon.
* app: fix reward bug with empty block (#155)bojie2019-06-121-9/+13
| | | | | | | | * app: fix reward bug with empty block * make block generation consistent * revert change to dmoment in genesis.json
* consensus: implement DEXON cryptoeconomics v4.0 (#145)Wei-Ning Huang2019-06-123-41/+159
|
* core: fix blockReward serializationWei-Ning Huang2019-06-121-1/+1
|
* app: add cache mechanism to increase performanceBojie Wu2019-06-121-0/+2
|
* dex: remove uneeded info from block headerWei-Ning Huang2019-06-121-1/+1
|
* consensus: dexcon: fetch config from stateWei-Ning Huang2019-06-121-10/+14
|
* params: load blockReward from genesis JSON fileWei-Ning Huang2019-06-121-2/+1
|
* app: implement new insert blocks logicBojie Wu2019-06-121-1/+2
|
* dex/core: misc bug fixesWei-Ning Huang2019-06-121-3/+10
|
* app: add default block rewardBojie Wu2019-06-121-1/+1
|
* app: calculate block reward according to chain numBojie Wu2019-06-121-3/+2
|
* dex: implement dexon application interfaceBojie Wu2019-06-121-1/+6
|
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-06-1217-84/+84
|
* Use dex.Config instead of eth.ConfigWei-Ning Huang2019-06-121-0/+4
|
* Add initial DEXON consensus engine implementation skeletonWei-Ning Huang2019-06-122-0/+159
|
* all: simplify timestamps to uint64 (#19372)Martin Holst Swende2019-04-084-21/+16
| | | | | | | | | | | | | | * all: simplify timestamps to uint64 * tests: update definitions * clef, faucet, mobile: leftover uint64 fixups * ethash: fix tests * graphql: update schema for timestamp * ethash: remove unused variable
* vendor, crypto, swarm: switch over to upstream sha3 packageDave McGregor2019-01-043-9/+9
|
* consensus/clique: fix comment typo (#18103)mr_franklin2018-11-141-1/+1
|
* consensus: extend getWork API with block number (#18038)gary rong2018-11-084-8/+12
|
* all: protect self-mined block during reorg (#17656)gary rong2018-09-201-1/+1
|
* consensus/clique: hide no transaction error (#17614)gary rong2018-09-191-6/+2
|
* consensus, ethdb, metrics: implement forced-meter (#17667)gary rong2018-09-171-2/+2
|
* Merge pull request #17675 from holiman/eip1234Péter Szilágyi2018-09-171-60/+82
|\ | | | | Eip1234
| * ethash: documentation + cleanupMartin Holst Swende2018-09-171-8/+13
| |
| * ethash: less copy-paste for EIP 1234Martin Holst Swende2018-09-161-116/+67
| |
| * consensus: implement Constantinople EIP 1234EOS Classic2018-09-121-4/+70
| |
* | consensus/clique, core: chain maker clique + error testsPéter Szilágyi2018-09-113-71/+184
|/
* consensus/clique: only trust snapshot for genesis or les checkpointPéter Szilágyi2018-09-101-1/+1
|
* consensus/ethash: increase timeout in test (#17526)Anton Evangelatov2018-09-031-2/+14
| | | | This is an attempt to fix the flaky consensus/ethash tests under macOS.
* consensus: fix comment typo (#17562)ult-bobonovski2018-09-031-1/+1
|
* consensus, miner: stale block mining support (#17506)gary rong2018-08-287-107/+244
| | | | | | | | | | * consensus, miner: stale block supporting * consensus, miner: refactor seal signature * cmd, consensus, eth: add miner noverify flag * cmd, consensus, miner: polish
* consensus/ethash: remove unnecessary type declaration (#17529)Mymskmkt2018-08-281-4/+4
|
* miner: fix state commit, track old work packages too (#17490)gary rong2018-08-236-9/+45
| | | | | | | | | | * miner: commit state which is relative with sealing result * consensus, core, miner, mobile: introduce sealHash interface * miner: evict pending task with threshold * miner: go fmt
* consensus/clique, light: light client snapshots on RinkebyPéter Szilágyi2018-08-212-16/+17
|
* consensus/ethash: reduce notify test aggressivenessPéter Szilágyi2018-08-171-1/+1
|
* consensus/ethash: use DAGs for remote mining, generate asyncPéter Szilágyi2018-08-153-24/+83
|
* cmd, consensus/ethash, eth: miner push notificationsPéter Szilágyi2018-08-106-62/+206
|
* consensus/ethash: move remote agent logic to ethash internal (#15853)gary rong2018-08-037-16/+483
| | | | | | | | | | | | | | | | | | | | | | | | | | * consensus/ethash: start remote ggoroutine to handle remote mining * consensus/ethash: expose remote miner api * consensus/ethash: expose submitHashrate api * miner, ethash: push empty block to sealer without waiting execution * consensus, internal: add getHashrate API for ethash * consensus: add three method for consensus interface * miner: expose consensus engine running status to miner * eth, miner: specify etherbase when miner created * miner: commit new work when consensus engine is started * consensus, miner: fix some logics * all: delete useless interfaces * consensus: polish a bit
* consensus/clique: replace bubble sort by golang stable sorthadv2018-07-241-11/+13
|
* consensus: move test use only var/func to test(#17004)Wenbiao Zheng2018-07-244-11/+11
|
* all: switch out defunct set library to different one (#16873)Ralph Caraveo III2018-07-161-3/+3
| | | | | | * keystore, ethash, eth, miner, rpc, whisperv6: tech debt with now defunct set. * whisperv5: swap out gopkg.in/fatih/set.v0 with supported set
* consensus/ethash: fix the algorithm of fakeBlockNumber in comments (#17166)Kwuaint2018-07-121-2/+2
| | | correct the algorithm in the comments for fakeBlockNumber, from "min" to "max".
* consensus/clique: fixed documentation copy-paste issue (#17137)LeoLiao2018-07-091-1/+1
|
* consensus/ethash: fixed documentation typo (#17121)Zak Cole2018-07-041-1/+1
| | | "proot-of-work" to "proof-of-work"
* consensus/ethash: reduce keccak hash allocations (#16857)Felix Lange2018-06-041-6/+17
| | | | | | | | | | Use Read instead of Sum to avoid internal allocations and copying the state. name old time/op new time/op delta CacheGeneration-8 764ms ± 1% 579ms ± 1% -24.22% (p=0.000 n=20+17) SmallDatasetGeneration-8 75.2ms ±12% 60.6ms ±10% -19.37% (p=0.000 n=20+20) HashimotoLight-8 1.58ms ±11% 1.55ms ± 8% ~ (p=0.322 n=20+19) HashimotoFullSmall-8 4.90µs ± 1% 4.88µs ± 1% -0.31% (p=0.013 n=19+18)
* core, consensus: fix some typos in comment code and output loghadv2018-05-191-1/+1
|
* all: get rid of error when creating memory database (#16716)gary rong2018-05-091-1/+1
| | | | | | | | * all: get rid of error when create mdb * core: clean up variables definition * all: inline mdb definition
* core/rawdb: separate raw database access to own package (#16666)Péter Szilágyi2018-05-071-1/+2
|
* consensus/ethash: fixed typo (#16665)YH-Zhou2018-05-031-1/+1
|
* build: enable goimports and varcheck linters (#16446)thomasmodeneis2018-04-181-1/+2
|
* consensus/ethash: fixed typo (#16253)Kyuntae Ethan Kim2018-03-051-1/+1
|
* travis, build, consensus: drop support for Go 1.7Péter Szilágyi2018-02-286-155/+61
|
* metrics: pull library and introduce ResettingTimer and InfluxDB reporter ↵Anton Evangelatov2018-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | (#15910) * go-metrics: fork library and introduce ResettingTimer and InfluxDB reporter. * vendor: change nonsense/go-metrics to ethersphere/go-metrics * go-metrics: add tests. move ResettingTimer logic from reporter to type. * all, metrics: pull in metrics package in go-ethereum * metrics/test: make sure metrics are enabled for tests * metrics: apply gosimple rules * metrics/exp, internal/debug: init expvar endpoint when starting pprof server * internal/debug: tiny comment formatting fix
* core, trie: intermediate mempool between trie and database (#15857)Péter Szilágyi2018-02-061-0/+4
| | | This commit reduces database I/O by not writing every state trie to disk.
* consensus/ethash: improve cache/dataset handling (#15864)Felix Lange2018-01-238-213/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * consensus/ethash: add maxEpoch constant * consensus/ethash: improve cache/dataset handling There are two fixes in this commit: Unmap the memory through a finalizer like the libethash wrapper did. The release logic was incorrect and freed the memory while it was being used, leading to crashes like in #14495 or #14943. Track caches and datasets using simplelru instead of reinventing LRU logic. This should make it easier to see whether it's correct. * consensus/ethash: restore 'future item' logic in lru * consensus/ethash: use mmap even in test mode This makes it possible to shorten the time taken for TestCacheFileEvict. * consensus/ethash: shuffle func calc*Size comments around * consensus/ethash: ensure future cache/dataset is in the lru cache * consensus/ethash: add issue link to the new test * consensus/ethash: fix vet * consensus/ethash: fix test * consensus: tiny issue + nitpick fixes
* consensus/ethash: fix byzantium difficulty comment typo (#15842)gary rong2018-01-101-1/+1
|
* all: switch gas limits from big.Int to uint64Péter Szilágyi2018-01-032-14/+14
|
* consensus/ethash: fix overdue link (#15786)sunxiaojun20142017-12-311-1/+1
|
* accounts, consensus, core, eth: make chain maker consensus agnostic (#15497)gary rong2017-12-224-12/+41
| | | | | | | | | | * accounts, consensus, core, eth: make chain maker consensus agnostic * consensus, core: move CalcDifficulty to Engine interface * consensus: add docs for calcDifficulty function * consensus, core: minor comment fixups
* Merge pull request #15629 from holiman/relax_futuretimePéter Szilágyi2017-12-141-4/+5
|\ | | | | consensus/ethash: relax requirements when determining future-blocks
| * consensus/ethash: relax requirements when determining future-blocksMartin Holst Swende2017-12-081-4/+5
| |
* | all: use gometalinter.v2, fix new gosimple issues (#15650)Zach2017-12-131-1/+1
|/
* cmd, consensus, eth: split ethash related config to it own (#15520)gary rong2017-11-244-52/+80
| | | | | | | | | | * cmd, consensus, eth: split ethash related config to it own * eth, consensus: minor polish * eth, consenus, console: compress pow testing config field to single one * consensus, eth: document pow mode
* cmd/puppeth: etherchain light block explorer for PoW netsPéter Szilágyi2017-11-211-4/+4
|
* build: enable unconvert linter (#15456)ferhat elmas2017-11-111-2/+2
| | | | | | | | | * build: enable unconvert linter - fixes #15453 - update code base for failing cases * cmd/puppeth: replace syscall.Stdin with os.Stdin.Fd() for unconvert linter
* cmd, consensus, core, miner: instatx clique for --dev (#15323)Péter Szilágyi2017-10-242-4/+10
| | | | | | | | * cmd, consensus, core, miner: instatx clique for --dev * cmd, consensus, clique: support configurable --dev block times * cmd, core: allow --dev to use persistent storage too
* ethash: fix typoErnesto del Toro2017-10-131-3/+3
|
* consensus/clique: add fork hash enforcement (#15236)Péter Szilágyi2017-10-102-1/+6
|
* consensus, core, params: rebrand Metro to ByzantiumPéter Szilágyi2017-09-141-10/+10
|
* consensus, core, tests: implement Metropolis EIP 649Péter Szilágyi2017-08-241-5/+20
|
* consensus: revert time.Until changeEgon Elbre2017-08-071-1/+1
|
* consensus: fix megacheck warningsEgon Elbre2017-08-072-3/+3
|
* Merge pull request #14733 from karalabe/metro-eip100Péter Szilágyi2017-07-171-12/+69
|\ | | | | consensus/ethash, core: implement Metropolis EIP 100
| * consensus, core: EIP 100 polishes, fix chain maker diffPéter Szilágyi2017-06-301-29/+38
| | | | | | | | | | | | | | | | | | | | | | | | This PR polishes the EIP 100 difficulty adjustment algorithm to match the same mechanisms as the Homestead was implemented to keep the code uniform. It also avoids a few memory allocs by reusing big1 and big2, pulling it out of the common package and into ethash. The commit also fixes chain maker to forward the uncle hash when creating a simulated chain (it wasn't needed until now so we just skipped a copy there).
| * consensus/ethash: implement Metropolis EIP 100Jeffrey Wilcke2017-06-301-0/+48
| |
* | tests: update tests and implement general state tests (#14734)Felix Lange2017-07-111-2/+3
|/ | | | | | | | | | | | | | Tests are now included as a submodule. This should make updating easier and removes ~60MB of JSON data from the working copy. State tests are replaced by General State Tests, which run the same test with multiple fork configurations. With the new test runner, consensus tests are run as subtests by walking json files. Many hex issues have been fixed upstream since the last update and most custom parsing code is replaced by existing JSON hex types. Tests can now be marked as 'expected failures', ensuring that fixes for those tests will trigger an update to test configuration. The new test runner also supports parallel execution and the -short flag.
* Merge pull request #14596 from markya0616/valid_clique_votePéter Szilágyi2017-06-232-10/+23
|\ | | | | consensus/clique: choose valid votes
| * consensus/clique: minor cleanupsPéter Szilágyi2017-06-231-6/+7
| |
| * consensus/clique: choose valid votesmark.lin2017-06-142-11/+23
| |
* | consensus/clique: fix typo and don't add snapshot into recents againmark.lin2017-06-201-8/+7
| |
* | rlp, trie, contracts, compression, consensus: improve comments (#14580)S. Matthew English2017-06-129-22/+15
| |
* | consensus: Fix `makedag` epochKonrad Feldmeier2017-06-121-2/+2
|/ | | | | | | | | `geth makedag <blocknumber> <path>` was creating DAGs for `<blocknumber>/<epoch_length> + 1`, hence it was impossible to create an epoch 0 DAG. This fixes the calculations in `consensus/ethash/ethash.go` for `MakeDataset` and `MakeCache`, and applies `gofmt`.
* consensus/clique: cache block signatures for fast checksPéter Szilágyi2017-05-302-23/+34
|
* consensus/ethash: fix TestCalcDifficultyFelix Lange2017-05-241-1/+1
|
* consensus, core, core/vm, parems: review fixesJeffrey Wilcke2017-05-181-1/+1
|
* consensus/ethash: set time to current instead of parent timeJeffrey Wilcke2017-05-181-1/+1
|
* consensus, core/*, params: metropolis preparation refactorJeffrey Wilcke2017-05-182-23/+30
| | | | | | | | | | | | | | | | | | | | | | | | This commit is a preparation for the upcoming metropolis hardfork. It prepares the state, core and vm packages such that integration with metropolis becomes less of a hassle. * Difficulty calculation requires header instead of individual parameters * statedb.StartRecord renamed to statedb.Prepare and added Finalise method required by metropolis, which removes unwanted accounts from the state (i.e. selfdestruct) * State keeps record of destructed objects (in addition to dirty objects) * core/vm pre-compiles may now return errors * core/vm pre-compiles gas check now take the full byte slice as argument instead of just the size * core/vm now keeps several hard-fork instruction tables instead of a single instruction table and removes the need for hard-fork checks in the instructions * core/vm contains a empty restruction function which is added in preparation of metropolis write-only mode operations * Adds the bn256 curve * Adds and sets the metropolis chain config block parameters (2^64-1)
* common/bitutil, consensus/ethash: reusable bitutil packagePéter Szilágyi2017-05-052-86/+2
|
* Hive-test fixes (#14419)Martin Holst Swende2017-05-041-0/+9
| | | | | | | | | | * core: Fix for consensus test gasLimit > 2^63-1 https://github.com/ethereum/tests/blob/develop/BlockchainTests/bcInvalidHeaderTest.json#L238 * core: fix testcase for uncle gasUsage > gasLimit : https://github.com/ethereum/tests/blob/develop/BlockchainTests/EIP150/bcUncleHeaderValiditiy.json#L986 * math/big: rename TTM63m1 -> MaxBig63, + go fmt * core: documentation
* consensus/clique: fix overflow on recent signer check around genesisPéter Szilágyi2017-05-031-1/+1
|
* consensus/ethash: fix a timestamp update racePéter Szilágyi2017-05-021-2/+4
|
* consensus/ethash: close mmap before rename, windows limitationPéter Szilágyi2017-04-141-5/+8
|
* consensus/ethash: simplify concurrency in VerifyHeadersFelix Lange2017-04-131-81/+48
| | | | | This change removes a convoluted use of sync/atomic from VerifyHeaders. It also fixes the annoying error about future blocks.
* consensus, core, ethstats: use engine specific block beneficiary (#14318)Péter Szilágyi2017-04-123-0/+17
| | | | | | * consensus, core, ethstats: use engine specific block beneficiary * core, eth, les, miner: use explicit beneficiary during mining
* consensus/clique, internal/web3ext: support hash based API queries (#14321)Péter Szilágyi2017-04-125-30/+56
| | | | | | * consensus/clique, internal/web3ext: support hash based API queries * consensus/clique: make RPC return types public
* consensus/clique: Proof of Authority (#3753)Péter Szilágyi2017-04-106-29/+1465
| | | | This PR is a prototype implementation of plugable consensus engines and the Clique PoA protocol ethereum/EIPs#225
* consensus, eth: don't CPU mine by default during remote miningPéter Szilágyi2017-04-072-1/+11
|
* consensus, core: drop all the legacy custom core error typesPéter Szilágyi2017-04-062-21/+57
|
* core, consensus: pluggable consensus engines (#3817)Péter Szilágyi2017-04-0514-0/+3671
This commit adds pluggable consensus engines to go-ethereum. In short, it introduces a generic consensus interface, and refactors the entire codebase to use this interface.