aboutsummaryrefslogtreecommitdiffstats
path: root/core/genesis.go
Commit message (Collapse)AuthorAgeFilesLines
* core: update mainnet genesis allocation data and config (#369)Wei-Ning Huang2019-04-161-1/+1
|
* core: fix genesis timestamp (#338)Jimmy Hu2019-04-091-4/+4
|
* core: fill in genesis timstamp and remove dMoment from protocol handshake (#263)Wei-Ning Huang2019-04-091-1/+4
| | | | | | Fill in dmoment as genesis block timestamp. This allow us to remove dMoment check from protocol handshake since genesis block hash itself will protect us against different dMoment.
* app: new app test flow (#244)bojie2019-04-091-2/+0
|
* core: vm: remove delegation mechanism (#245)Wei-Ning Huang2019-04-091-2/+3
| | | | | | | | | | | | | The current delegation mechanism are prone to unstaking attack. i.e. a malicious attacker could unstake a small amount from a lot of node it staked before and make them unqualified, which leads to potential failure of the network. Since DEXON does not use consensus like DPoS, node is required to have at least MinStake in order to become a node. Voting mechanism is not required in our system since qualified node does not depends on the number of votes. Instead of managing the delegation mechanism in governance contract, we should let the owner manage the delegation and reward distribution mechanism on their own.
* core: vm: flatten governanceWei-Ning Huang2019-04-091-22/+3
|
* params: add Yilan network (#207)Mission Liao2019-04-091-0/+14
| | | | | | * Add Yilan network * Fixup: remove dummy log
* core: set oracle contract's code (#209)Sonic2019-04-091-0/+5
| | | So that other contract can call oracle contract.
* params: update genesis configWei-Ning Huang2019-04-091-0/+5
|
* core: vm: add totalSupply and totalStaked in the governance contract (#144)Wei-Ning Huang2019-04-091-0/+6
| | | | | | | Add totalSupply and totalStaked in the governance contract for the preperation of DEXON cryptoeconomics 4.0. Also removed the unstaked variable in node info and improve tests for delegate/undeleate.
* app: implement logic for prepare/verify correctly when chain number change ↵bojie2019-04-091-0/+2
| | | | (#118)
* params: update taipei testnet genesis and config (#113)Wei-Ning Huang2019-04-091-1/+1
|
* Fix lintWei-Ning Huang2019-04-091-1/+1
|
* core: add Taipei testnet (#47)Wei-Ning Huang2019-04-091-1/+13
| | | | Add a new testnet named Taipei.
* core: various changes on tps tuning (#46)Wei-Ning Huang2019-04-091-2/+2
|
* governance: implement delegate/undelegate function and add tests (#33)Wei-Ning Huang2019-04-091-2/+2
| | | | | Implement delegate/undelegate function to allow others to delegate it's fund to stake on a node. Also added governance contract tests.
* core: more fix on light node synchronization (#32)Wei-Ning Huang2019-04-091-2/+2
| | | | | | Fix gas calculation in governance contract. Correctly register round height when processing pending blocks. We should register the mapping when we get the pending block instead of waiting for block confirmation.
* core: push height of round 0 in genesis block (#17)Sonic2019-04-091-0/+3
| | | | | | | * core: push height of round 0 in genesis block * vm: fix governance dispatch method name mismatch with abi also rename RoundHeightLoc to roundHeightLoc
* params: fix genesis block config and use testnet for test (#10)Wei-Ning Huang2019-04-091-3/+3
|
* core: fix staked calculation in genesis (#8)Jimmy Hu2019-04-091-4/+0
|
* core: genesis: make ToBlock() compatible with legacy ethereum code (#3)Wei-Ning Huang2019-04-091-28/+36
| | | | Make ToBlock() compatible with legacy ethereum code so we can run tests normally.
* core: vm: governance: add node infoWei-Ning Huang2019-04-091-1/+14
|
* core: GenerateChainWithRoundChange for testingSonic2019-04-091-0/+6
|
* core: set correct balance for governance contractWei-Ning Huang2019-04-091-0/+6
|
* Remove reference of Rinkeby network.Wei-Ning Huang2019-04-091-25/+1
| | | | We do not need ethereum Rinkeby network in our system, remove it.
* core: populate genesisAlloc in source code with DEXON genesis dataWei-Ning Huang2019-04-091-8/+24
|
* core: vm: add blockReward to governanceWei-Ning Huang2019-04-091-4/+4
|
* core: set governance owner in genesisWei-Ning Huang2019-04-091-1/+3
|
* params: load blockReward from genesis JSON fileWei-Ning Huang2019-04-091-0/+1
|
* core: setup stake in order so genesis block is deterministicWei-Ning Huang2019-04-091-1/+26
|
* core: populate genesis CRS in genesis stateWei-Ning Huang2019-04-091-0/+5
|
* dex: bug fix to allow running geth without crashingWei-Ning Huang2019-04-091-8/+0
|
* dex: governance: implement governance interfaceWei-Ning Huang2019-04-091-4/+1
|
* core: populate dexon configuration in SetupGenesisBlockWei-Ning Huang2019-04-091-0/+3
|
* core: add stake and public key to genesis account infoWei-Ning Huang2019-04-091-2/+24
|
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-04-091-10/+10
|
* all: simplify timestamps to uint64 (#19372)Martin Holst Swende2019-04-081-1/+1
| | | | | | | | | | | | | | * 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
* cmd, core, params: add support for GoerliPéter Szilágyi2019-02-191-1/+12
| | | | (cherry picked from commit b0ed083ead2d58cc25754eacdb48046eb2bc81cb)
* core, cmd/puppeth: implement constantinople fix, disable EIP-1283 (#18486)Martin Holst Swende2019-01-301-0/+1
| | | | | | | | | | | | | | | | | This PR adds a new fork which disables EIP-1283. Internally it's called Petersburg, but the genesis/config field is ConstantinopleFix. The block numbers are: 7280000 for Constantinople on Mainnet 7280000 for ConstantinopleFix on Mainnet 4939394 for ConstantinopleFix on Ropsten 9999999 for ConstantinopleFix on Rinkeby (real number decided later) This PR also defaults to using the same ConstantinopleFix number as whatever Constantinople is set to. That is, it will default to mainnet behaviour if ConstantinopleFix is not set.This means that for private networks which have already transitioned to Constantinople, this PR will break the network unless ConstantinopleFix is explicitly set!
* cmd/geth, core, eth: implement Constantinople override flag (#18273)Martin Holst Swende2018-12-111-0/+6
| | | | | | | | * geth/core/eth: implement constantinople override flag * les: implemnent constantinople override flag for les clients * cmd/geth, eth, les: fix typo, move flag to experimentals
* core, eth: fix goimports for Go 1.11Péter Szilágyi2018-09-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-33/+22
|
* core, trie: intermediate mempool between trie and database (#15857)Péter Szilágyi2018-02-061-11/+13
| | | This commit reduces database I/O by not writing every state trie to disk.
* all: switch gas limits from big.Int to uint64Péter Szilágyi2018-01-031-2/+2
|
* all: gofmt -w -s (#15419)ferhat elmas2017-11-081-9/+9
|
* cmd, consensus, core, miner: instatx clique for --dev (#15323)Péter Szilágyi2017-10-241-10/+26
| | | | | | | | * 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
* core: blocknumber in genesis as hex (#14812)Martin Holst Swende2017-07-171-0/+1
|
* tests: update tests and implement general state tests (#14734)Felix Lange2017-07-111-8/+59
| | | | | | | | | | | | | | 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.
* params: remove redundant consts, disable metro on AllProtocolChangesPéter Szilágyi2017-07-041-3/+3
|
* core/state: access trie through Database interface, track errors (#14589)Felix Lange2017-06-271-1/+1
| | | | | | | | | With this commit, core/state's access to the underlying key/value database is mediated through an interface. Database errors are tracked in StateDB and returned by CommitTo or the new Error method. Motivation for this change: We can remove the light client's duplicated copy of core/state. The light client now supports node iteration, so tracing and storage enumeration can work with the light client (not implemented in this commit).
* core: typos and comments improvechanghong2017-05-251-1/+1
| | | | | | | | 1. fix typos 2. methods recevier of struct should be same 3. comments improve (cherry picked from commit 1ba979539582a00b7fd1a7c8a37a6852e59eac0d)
* cmd, core, params: add --rinkeby flag for fast connectivityPéter Szilágyi2017-05-041-0/+12
|
* core: make genesis incompatibility error more explicitPéter Szilágyi2017-04-201-1/+1
|
* core, core/types: regenerate JSON marshaling, add "hash" to headers (#13868)Felix Lange2017-04-061-14/+14
| | | | | | | | | | * 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, core/types: use non-pointer receiver for Marshal* methodsFelix Lange2017-03-271-3/+3
| | | | | Regenerated with fjl/gencodec@1a75a2161009 Also add ,omitempty to optional GenesisAccount fields.
* core: refactor genesis handlingFelix Lange2017-03-231-161/+217
| | | | | | | | | | | | | | | | | | | | | | | | This commit solves several issues concerning the genesis block: * Genesis/ChainConfig loading was handled by cmd/geth code. This left library users in the cold. They could specify a JSON-encoded string and overwrite the config, but didn't get any of the additional checks performed by geth. * Decoding and writing of genesis JSON was conflated in WriteGenesisBlock. This made it a lot harder to embed the genesis block into the forthcoming config file loader. This commit changes things so there is a single Genesis type that represents genesis blocks. All uses of Write*Genesis* are changed to use the new type instead. * If the chain config supplied by the user was incompatible with the current chain (i.e. the chain had already advanced beyond a scheduled fork), it got overwritten. This is not an issue in practice because previous forks have always had the highest total difficulty. It might matter in the future though. The new code reverts the local chain to the point of the fork when upgrading configuration. The change to genesis block data removes compression library dependencies from package core.
* cmd/utils, core, params: fork all teh things for dev mode (#3697)Jeffrey Wilcke2017-03-011-0/+3
|
* all: next batch of log polishes to contextual versionsPéter Szilágyi2017-02-281-2/+1
|
* common: move big integer math to common/math (#3699)Felix Lange2017-02-271-8/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-231-3/+2
|
* core: ignore 0x prefix for code in JSON genesis blocks (#3656)Martin Holst Swende2017-02-131-1/+1
|
* core/genesis: add support for setting nonce in 'alloc'Martin Holst Swende2017-01-251-0/+2
| | | | This is to be able to set `pre`-state when performing blockchain tests through Hive, we need to be able to set the nonce.
* core: remove support for Olympic networkBas van Kervel2017-01-121-28/+8
|
* core,cmd/utils: bugfix for ropsten dump importsBas van Kervel2017-01-051-1/+3
|
* core: implemented new ropsten testnetJeffrey Wilcke2016-11-231-25/+13
|
* cmd/geth, core, light, mobile: removed state account StartingNonceJeffrey Wilcke2016-11-231-2/+2
| | | | All account's nonce start at 0.
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-131-3/+3
| | | | | | | | | | | | | | | This commit implements EIP158 part 1, 2, 3 & 4 1. If an account is empty it's no longer written to the trie. An empty account is defined as (balance=0, nonce=0, storage=0, code=0). 2. Delete an empty account if it's touched 3. An empty account is redefined as either non-existent or empty. 4. Zero value calls and zero value suicides no longer consume the 25k reation costs. params: moved core/config to params Signed-off-by: Jeffrey Wilcke <jeffrey@ethereum.org>
* core: improved chainDb using sequential keyszsfelfoldi2016-06-071-3/+3
|
* core, eth: added json tag field for proper unmarshallingJeffrey Wilcke2016-04-251-1/+1
| | | | | | | | | According to our own instructions the genesis config attribute should be "config". The genesis definition in the go code, however, has a field called `ChainConfig`. This field now has a `json:"config"` struct tag so that the json is properly unmarshalled. This fixes #2482
* core: added basic chain configurationJeffrey Wilcke2016-04-011-9/+14
| | | | | | | | | Added chain configuration options and write out during genesis database insertion. If no "config" was found, nothing is written to the database. Configurations are written on a per genesis base. This means that any chain (which is identified by it's genesis hash) can have their own chain settings.
* cmd, common, core, eth, node, rpc, tests, whisper, xeth: use protocol stacksPéter Szilágyi2015-11-271-39/+75
|
* core, eth, miner, xeth: clean up tx/receipt db accessorsPéter Szilágyi2015-11-191-1/+1
|
* core, eth: receipt chain reconstructionPéter Szilágyi2015-10-191-1/+1
|
* core/state, core, miner: handle missing root error from state.NewGustav Simonsson2015-10-161-3/+4
|
* Merge pull request #1888 from obscuren/testnetJeffrey Wilcke2015-10-091-0/+21
|\ | | | | cmd, core, eth: added official testnet
| * cmd, core, eth: added official testnetJeffrey Wilcke2015-10-091-0/+21
| |
* | Merge pull request #1850 from karalabe/genesis-block-receiptsJeffrey Wilcke2015-10-071-0/+3
|\ \ | |/ |/| core: fix #1848, block receipts db entry for the genesis too
| * core: fix #1848, block receipts db entry for the genesis tooPéter Szilágyi2015-09-251-0/+3
| |
* | core, core/state: batch-based state syncFelix Lange2015-09-231-6/+10
|/
* core, core/types: readd transactions after chain re-orgJeffrey Wilcke2015-09-221-5/+17
| | | | | | | | | | | | | | Added a `Difference` method to `types.Transactions` which sets the receiver to the difference of a to b (NOTE: not a **and** b). Transaction pool subscribes to RemovedTransactionEvent adding back to those potential missing from the chain. When a chain re-org occurs remove any transactions that were removed from the canonical chain during the re-org as well as the receipts that were generated in the process. Closes #1746
* all: move common.Database to package ethdbFelix Lange2015-09-151-4/+5
|
* core: split out TD from database and all internalsPéter Szilágyi2015-09-111-10/+10
|
* core, eth: split the db blocks into headers and bodiesPéter Szilágyi2015-09-111-1/+1
|
* Add tests for uncle timestamps and refactor timestamp typeGustav Simonsson2015-08-251-1/+1
|
* core, eth, trie, xeth: merged state, chain, extra databases in oneJeffrey Wilcke2015-08-081-9/+9
|
* 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.
* | core: genesis extra data field fixJeffrey Wilcke2015-07-261-1/+1
| |
* | core: fixed genesis write out to write only canon numberJeffrey Wilcke2015-07-261-1/+8
| |
* | core: check genesis block before writeoutJeffrey Wilcke2015-07-251-0/+4
|/
* 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".
* cmd, core, eth, common: genesis preparationJeffrey Wilcke2015-07-101-38/+96
| | | | | Implemented the --genesis flag thru which we can set a custom genesis block, including the official Ethereum genesis block.
* all: update license informationFelix Lange2015-07-071-0/+16
|
* core, miner, tests: renamed state methodsJeffrey Wilcke2015-07-041-1/+1
| | | | | | | | | | | | * Update => SyncIntermediate * Added SyncObjects SyncIntermediate only updates whatever has changed, but, as a side effect, requires much more disk space. SyncObjects will only sync whatever is required for a block and will not save intermediate state to disk. As drawback this requires more time when more txs come in.
* core: add GenerateChain, GenesisBlockForTestingFelix Lange2015-06-301-0/+18
|
* core/types: make blocks immutableFelix Lange2015-06-301-26/+11
|
* core: settable genesis nonceobscuren2015-06-091-2/+2
| | | | | | | You can set the nonce of the block with `--genesisnonce`. When the genesis nonce changes and it doesn't match with the first block in your database it will fail. A new `datadir` must be given if the nonce of the genesis block changes.
* types: block json unmarshal method addedobscuren2015-06-041-2/+2
|
* Merge branch 'frontier/natspec' of ↵obscuren2015-04-211-2/+2
|\ | | | | | | https://github.com/ethersphere/go-ethereum into ethersphere-frontier/natspec
| * test account is no longer permanently in genesis block, only put there when ↵zsfelfoldi2015-04-201-8/+2
| | | | | | | | testing
| * NatSpec contracts are now not in the genesis block but added by the testzsfelfoldi2015-04-201-1/+0
| |
| * NatSpec passing end to end testzsfelfoldi2015-04-201-3/+2
| |
| * NatSpec contracts in genesis block, end to end test (unfinished)zsfelfoldi2015-04-201-0/+8
| |
* | core: moved TD calculation from proc to chainobscuren2015-04-201-0/+1
|/
* Block header changed & console miner controlobscuren2015-04-061-1/+1
| | | | | | * miner control moved to `admin.miner` * miner option to set extra data * block extra now bytes
* Read most protocol params from common/params.jsonGustav Simonsson2015-04-021-5/+3
| | | | | | | | | * Add params package with exported variables generated from github.com/ethereum/common/blob/master/params.json * Use params package variables in applicable places * Add check for minimum gas limit in validation of block's gas limit * Remove common/params.json from go-ethereum to avoid outdated version of it
* Blocktest fixed, Execution fixedobscuren2015-04-011-1/+1
| | | | | | * Added new CreateAccount method which properly overwrites previous accounts (excluding balance) * Fixed block tests (100% success)
* Added Code fieldobscuren2015-03-311-2/+6
|
* moved state and vm to coreobscuren2015-03-231-1/+1
|
* core: fix testsFelix Lange2015-03-181-4/+0
|
* converted vmobscuren2015-03-171-4/+3
|
* Moved ethutil => commonobscuren2015-03-161-9/+9
|
* POW fixesobscuren2015-03-141-1/+0
|
* Increased genesis gas & gas floor limit to 3141592obscuren2015-03-131-1/+2
|
* Miner fixes and updates (including miner)obscuren2015-03-051-2/+3
|
* Fixed genesisobscuren2015-03-041-7/+7
|
* updated genesisobscuren2015-03-041-0/+4
|
* Changed nonce to a uint64obscuren2015-03-041-1/+1
|
* Removed some methods from the JS REPLobscuren2015-03-011-2/+0
|
* Minor updates for releaseobscuren2015-02-211-13/+31
|
* Docs & old code removedobscuren2015-02-031-1/+0
|
* moving to a better xethobscuren2015-01-291-1/+1
|
* Minor fixed and additions for block procobscuren2015-01-081-0/+1
| | | | | | * Path check length * Genesis include TD * Output TD on last block
* Refactored ethutil.Config.Db outobscuren2015-01-071-2/+3
|
* Switched to new trieobscuren2014-12-241-1/+1
|
* Refactored block & Transactionobscuren2014-12-231-32/+33
| | | | * Includes new rlp decoder
* Renamed `chain` => `core`obscuren2014-12-041-0/+52