aboutsummaryrefslogtreecommitdiffstats
path: root/core/types/block.go
Commit message (Collapse)AuthorAgeFilesLines
* Rebrand as tangerine-network/go-tangerineWei-Ning Huang2019-09-171-3/+3
|
* core, dex/downloader: polish headers verification and blocks insertion logic ↵Sonic2019-06-121-0/+11
| | | | | | | | (#168) Refactor GenerateDexonChain function, move governance tx logic to the user of GenerateDexonChain (testchain_test.go) and move fake node set code to FakeDexcon.
* core, dex: use block hash as witness data (#160)Sonic2019-06-121-6/+0
| | | | | | | | | | Using only state root and receipt root as witness data can not protect other fields in block header, ex: bloom, difficulty, gas limit, gas used... So that everyone can manipulate these fields to create as many valid blocks at the same height as he want. Although this will not effect the state, one can spam us when syncing. Using block hash as witness data can solve this.
* core: add database/sql support for more types (#102)Meng-Ying Yang2019-06-121-1/+26
| | | | | | | | | * core: types: add database/sql support for BlockNonce * common: add database/sql support with Big New Big type is declared to let big.Int support database/sql by implementing Scan() and Value() on new type.
* dex: remove duplicate declaration of WitnessData (#92)Wei-Ning Huang2019-06-121-1/+0
| | | | Remove duplicate declaration of WitnessData and remove the TxHash field in witness data since it does not need to be witnessed.
* core: revert changes to StateProcessor.Process (#29)Wei-Ning Huang2019-06-121-3/+1
|
* core: refactor validator and fix light node sync (#25)Wei-Ning Huang2019-06-121-0/+1
| | | | | | | | Remove custom Dexon validator by adding a new `ValidateWitnessData` method into the validator interface. This allow us to properly detect know blocks. This also allow other gdex "light" client to sync compaction chain. Also, setup a standalone RPC node for handling RPC reqeusts.
* core: validate roundHeight mapping in governance contractWei-Ning Huang2019-06-121-0/+4
|
* core: fix blockReward serializationWei-Ning Huang2019-06-121-22/+21
|
* app: add cache mechanism to increase performanceBojie Wu2019-06-121-17/+18
|
* dex: return round in get block rpc outputWei-Ning Huang2019-06-121-0/+1
|
* dex: remove uneeded info from block headerWei-Ning Huang2019-06-121-23/+26
|
* core: types: fix header marshal jsonSonic2019-06-121-0/+2
|
* app: check nonce and balance in prepare payloadBojie Wu2019-06-121-2/+0
|
* core: included Dexcon metadata in blockWei-Ning Huang2019-06-121-2/+3
|
* app: implement verify block logicBojie Wu2019-06-121-0/+2
|
* consensus: dexcon: fetch config from stateWei-Ning Huang2019-06-121-19/+22
|
* app: implement new insert blocks logicBojie Wu2019-06-121-16/+19
|
* core: vm: implement RAND opcode supportWei-Ning Huang2019-06-121-0/+1
| | | | | | DEXON has a built-in on chain random oracle that allow one to retrieve a random variable. Add a new opcode `RAND` to load the random variable onto the stack.
* dex/core: misc bug fixesWei-Ning Huang2019-06-121-1/+2
|
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-06-121-3/+3
|
* all: simplify timestamps to uint64 (#19372)Martin Holst Swende2019-04-081-7/+4
| | | | | | | | | | | | | | * 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-041-2/+2
|
* fix mixHash/nonce for parity compatible network (#18166)Jaynti Kanani2018-11-261-2/+2
|
* miner: fix state commit, track old work packages too (#17490)gary rong2018-08-231-23/+0
| | | | | | | | | | * 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
* core/types: remove String methods from struct types (#16205)Steven Roose2018-04-051-35/+0
| | | | | | Most of these methods did not contain all the relevant information inside the object and were not using a similar formatting type. Moreover, the existence of a suboptimal String method breaks usage with more advanced data dumping tools like go-spew.
* core, trie: intermediate mempool between trie and database (#15857)Péter Szilágyi2018-02-061-0/+9
| | | This commit reduces database I/O by not writing every state trie to disk.
* all: update generated code (#15808)Felix Lange2018-01-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * core/types, core/vm, eth, tests: regenerate gencodec files * Makefile: update devtools target Install protoc-gen-go and print reminders about npm, solc and protoc. Also switch to github.com/kevinburke/go-bindata because it's more maintained. * contracts/ens: update contracts and regenerate with solidity v0.4.19 The newer upstream version of the FIFSRegistrar contract doesn't set the resolver anymore. The resolver is now deployed separately. * contracts/release: regenerate with solidity v0.4.19 * contracts/chequebook: fix fallback and regenerate with solidity v0.4.19 The contract didn't have a fallback function, payments would be rejected when compiled with newer solidity. References to 'mortal' and 'owned' use the local file system so we can compile without network access. * p2p/discv5: regenerate with recent stringer * cmd/faucet: regenerate * dashboard: regenerate * eth/tracers: regenerate * internal/jsre/deps: regenerate * dashboard: avoid sed -i because it's not portable * accounts/usbwallet/internal/trezor: fix go generate warnings
* all: switch gas limits from big.Int to uint64Péter Szilágyi2018-01-031-12/+6
|
* core/types: use Header.Hash for block hashes (#14587)bailantaotao2017-06-071-1/+1
| | | Fixes #14586
* core, core/types: regenerate JSON marshaling, add "hash" to headers (#13868)Felix Lange2017-04-061-15/+16
| | | | | | | | | | * Makefile: fix devtools target * core: regenerate genesis marshaling with fjl/gencodec@cbfa5be5a8a8 * core/types: regenerate marshaling methods with fjl/gencodec@cbfa5be5a8a8 * core/types: add "hash" to JSON headers
* core, consensus: pluggable consensus engines (#3817)Péter Szilágyi2017-04-051-6/+5
| | | | | 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.
* core/types: use gencodec for JSON marshaling codeFelix Lange2017-03-071-100/+27
|
* common/hexutil: implement TextMarshaler, TextUnmarshalerFelix Lange2017-03-021-6/+6
| | | | | | | | | | | | | This commit makes the wrapper types more generally applicable. encoding.TextMarshaler is supported by most codec implementations (e.g. for yaml). The tests now ensure that package json actually recognizes the custom marshaler implementation irrespective of how it is implemented. The Uint type has new tests, too. These are tricky because uint size depends on the CPU word size. Turns out that there was one incorrect case where decoding returned ErrUint64Range instead of ErrUintRange.
* eth: accept leading zeros for nonce parameter of submitWork (#3558)Felix Lange2017-01-131-2/+2
|
* core/types: use package hexutil for JSON handlingFelix Lange2016-11-281-22/+15
|
* mobile: initial wrappers for mobile supportPéter Szilágyi2016-11-141-2/+2
|
* core/types: renamed receiptRoot to receiptsRootBas van Kervel2016-10-051-1/+1
|
* core/types, core/vm: improve docs, add JSON marshaling methodsFelix Lange2016-08-041-64/+110
| | | | | | | | In this commit, core/types's types learn how to encode and decode themselves as JSON. The encoding is very similar to what the RPC API uses. The RPC API is missing some output fields (e.g. transaction signature values) which will be added to the API in a later commit. Some fields that the API generates are ignored by the decoder methods here.
* rpc: refactor subscriptions and filtersBas van Kervel2016-08-171-0/+22
|
* eth: enable bad block reportsFelix Lange2016-05-251-2/+4
| | | | | | | | | | | | We used to have reporting of bad blocks, but it was disabled before the Frontier release. We need it back because users are usually unable to provide the full RLP data of a bad block when it occurs. A shortcoming of this particular implementation is that the origin peer is not tracked for blocks received during eth/63 sync. No origin peer info is still better than no report at all though.
* core, core/types, eth: add and use Block.BodyFelix Lange2016-04-151-0/+3
| | | | | This fixes a few uses of unkeyed Body literals which go vet was complaining about.
* core: various typosLeif Jurvetson2016-03-161-1/+1
|
* rpc: new RPC implementation with pub/sub supportBas van Kervel2015-12-141-0/+4
|
* core, eth: receipt chain reconstructionPéter Szilágyi2015-10-191-5/+0
|
* eth/downloader: add fast and light sync strategiesPéter Szilágyi2015-10-191-5/+5
|
* core: support inserting pure header chainsPéter Szilágyi2015-10-191-7/+9
|
* core: split out TD from database and all internalsPéter Szilágyi2015-09-111-16/+19
|
* core, eth: split the db blocks into headers and bodiesPéter Szilágyi2015-09-111-0/+4
|
* Merge pull request #1701 from karalabe/eth62-sync-rebaseFelix Lange2015-08-271-0/+14
|\ | | | | eth: implement eth/62 synchronization logic
| * eth: port the synchronisation algo to eth/62Péter Szilágyi2015-08-251-0/+14
| |
* | Add tests for uncle timestamps and refactor timestamp typeGustav Simonsson2015-08-251-3/+6
|/
* Merge pull request #1515 from fjl/license-fixesJeffrey Wilcke2015-07-281-1/+1
|\ | | | | all: fix license headers one more time
| * all: fix license headers one more timeFelix Lange2015-07-241-1/+1
| | | | | | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
* | Merge pull request #1510 from fjl/license-fixesJeffrey Wilcke2015-07-231-4/+4
|\| | | | | all: license fixes
| * all: update license headers to distiguish GPL/LGPLFelix Lange2015-07-231-4/+4
| | | | | | | | | | All code outside of cmd/ is licensed as LGPL. The headers now reflect this by calling the whole work "the go-ethereum library".
* | core: fix an RLP encoding data race due to deep struct copyPéter Szilágyi2015-07-231-2/+2
|/
* all: add some godoc synopsis commentsFelix Lange2015-07-071-0/+1
|
* all: update license informationFelix Lange2015-07-071-0/+16
|
* Use uint64 for block header timestampGustav Simonsson2015-06-301-1/+1
|
* core/types: cache computed block valuesFelix Lange2015-06-301-3/+22
|
* core/types: make blocks immutableFelix Lange2015-06-301-237/+184
|
* types: block json unmarshal method addedobscuren2015-06-041-0/+24
|
* core/types, eth: meassure and display propagation timesobscuren2015-04-301-0/+2
|
* core/types: added fake parent hash / hash to String() outputobscuren2015-04-291-1/+11
|
* Validate block header UncleHash against calculated hashGustav Simonsson2015-04-231-0/+4
|
* core: moved TD calculation from proc to chainobscuren2015-04-201-9/+7
|
* future queued block supportzelig2015-04-091-0/+4
| | | | | | | - queued bool // flag for blockpool to skip TD check - set to true when future block queued - in checkTD: skip check if queued - TODO: add test (insertchain sets future block)
* Block header changed & console miner controlobscuren2015-04-061-3/+3
| | | | | | * miner control moved to `admin.miner` * miner option to set extra data * block extra now bytes
* check TxMsgzelig2015-04-011-3/+3
| | | | | | - add validation on TxMsg checking for nil - add test for nil transaction - add test for zero value transaction (no extra validation needed)
* test for invalid rlp encoding of block in BlocksMsgzelig2015-04-011-15/+12
| | | | | | | - rename Validate -> ValidateFields not to confure consensus block validation - add nil transaction and nil uncle header validation - remove bigint field checks: rlp already decodes *big.Int to big.NewInt(0) - add test for nil header, nil transaction
* eth: SEC-29 eth wire protocol decoding invalid message data crashes clientzelig2015-04-011-0/+20
| | | | | | - add validate method to types.Block - validate after Decode -> error - add tests for NewBlockMsg
* Copy fixobscuren2015-03-241-2/+9
|
* Added copy functionobscuren2015-03-241-0/+17
|
* removed legacy codeobscuren2015-03-241-2/+1
|
* core/types: use package rlp instead of common.DecodeFelix Lange2015-03-181-22/+77
|
* updated blockpoolobscuren2015-03-171-3/+3
|
* core/types: use common.{Hash,Address} in for transactionsFelix Lange2015-03-171-3/+2
|
* block conversionobscuren2015-03-171-30/+31
|
* new type + additional methodsobscuren2015-03-161-17/+17
|
* Moved ethutil => commonobscuren2015-03-161-5/+5
|
* mergeobscuren2015-03-151-2/+2
|\
| * core/types: make Block.{ParentHash,SeedHash,MixDigest} []byteFelix Lange2015-03-141-3/+3
| | | | | | | | There is no reason to keep them as ethutil.Bytes.
* | POW fixesobscuren2015-03-141-6/+1
|/
* Miner fixes and updates (including miner)obscuren2015-03-051-6/+8
|
* Fixed genesisobscuren2015-03-041-12/+23
|
* Changed nonce to a uint64obscuren2015-03-041-5/+5
|
* fixed pow stuffobscuren2015-03-041-1/+4
|
* Introducing ethashMatthew Wampler-Doty2015-03-031-1/+14
|
* Introducign MixDigest and SeedHashMatthew Wampler-Doty2015-02-281-2/+7
|
* Added GetBlock GetUncle with OOB guardobscuren2015-02-181-0/+12
|
* Fixed mining & limited hash powerobscuren2015-02-141-1/+2
|
* Update balance label when miningobscuren2015-02-141-0/+2
|
* WIP minerobscuren2015-02-041-11/+15
|
* Refactored ethutil.Config.Db outobscuren2015-01-071-11/+11
|
* Mergeobscuren2015-01-061-42/+35
|
* Refactored tx pool and added extra fields to blockobscuren2015-01-021-2/+2
| | | | | | * chain manager sets td on block + td output w/ String * added tx pool tests for removing/adding/validating * tx pool now uses a set for txs instead of list.List
* Fixed chain test & added new chainobscuren2014-12-301-0/+1
|
* Switched to new trieobscuren2014-12-241-2/+2
|
* Chain importerobscuren2014-12-231-15/+21
|
* Refactored block & Transactionobscuren2014-12-231-323/+167
| | | | * Includes new rlp decoder
* Locks, refactor, testsobscuren2014-12-181-1/+1
| | | | | | * Added additional chain tests * Added proper mutex' on chain * Removed ethereum dependencies
* Moved powobscuren2014-12-101-0/+3
|
* Renamed State => StateDBobscuren2014-12-041-2/+2
|
* Renamed `chain` => `core`obscuren2014-12-041-0/+413