Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | core: vm: add sanity check for updateConfiguration (#383) | Wei-Ning Huang | 2019-04-22 | 1 | -0/+12 |
| | |||||
* | core: vm: fix node offset during transfer (#377) | Wei-Ning Huang | 2019-04-19 | 2 | -13/+9 |
| | |||||
* | core: vm: add withdrawable (#373) | Jimmy Hu | 2019-04-18 | 3 | -15/+66 |
| | |||||
* | core: vm: refine panic flow (#372) | Wei-Ning Huang | 2019-04-17 | 1 | -15/+7 |
| | | | | Move panic call to immediate location of the error to prevent accidententaly panic on other conditions. | ||||
* | core: vm: clearDKG in resetDKG (#368) | Jimmy Hu | 2019-04-16 | 1 | -0/+8 |
| | |||||
* | core: vm: fix emitReported (#367) | Wei-Ning Huang | 2019-04-16 | 1 | -6/+15 |
| | |||||
* | core: vm: prevent setting owner to blackhole (#366) | Jimmy Hu | 2019-04-16 | 2 | -1/+19 |
| | | | | | | * core: vm: prevent setting owner to blackhole * core: vm: same for transferNodeOwner | ||||
* | core: implement DKG success (#362) | Jimmy Hu | 2019-04-15 | 3 | -32/+206 |
| | | | | | | | | * vendor: sync to latest core * core: implmenet dkg success * cmd: govtool: add DKGSuccess | ||||
* | core: vm: improve MPK reverse lookup performance | Wei-Ning Huang | 2019-04-10 | 3 | -82/+92 |
| | | | | | By storing array offset in the original DKGMasterPublicKeyProposed map, we can locate MPK by proposer ID easily. | ||||
* | core: vm: cache GPK to prevent DoS (#335) | Wei-Ning Huang | 2019-04-09 | 1 | -1/+18 |
| | | | | Cache GPK so one can not slow the chain down with the ProposeCRS method call. | ||||
* | core: add cache for DKG MPK and complaint (#334) | Wei-Ning Huang | 2019-04-09 | 1 | -20/+21 |
| | | | | | Since deserializing DKG related items are extremely slow (takes about 3 seconds for 100 items), we cache it in the governance interface. | ||||
* | core: vm: fineFailStopDKG if MPK not registered (#329) | Jimmy Hu | 2019-04-09 | 2 | -12/+29 |
| | | | | | * core: vm: fineFailStopDKG if MPK not registered * prevent on-chain randomness | ||||
* | core: vm: fix fineFailStopDKG (#328) | Jimmy Hu | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | core: vm: implement node public key replacement (#324) | Wei-Ning Huang | 2019-04-09 | 3 | -1/+102 |
| | |||||
* | core: vm: clear DKG the right way (#319) | Jimmy Hu | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | core/vm: resetDKG if ttoo less qualified (#318) | Jimmy Hu | 2019-04-09 | 1 | -1/+9 |
| | |||||
* | core: vm: make fail stop fine value configurable (#312) | Wei-Ning Huang | 2019-04-09 | 3 | -55/+92 |
| | | | | A node is now quailified only if it has no pending fine and staked >= minstake. | ||||
* | dex: rebuild connection if dkg reset, core/vm: fix gov (#308) | Jimmy Hu | 2019-04-09 | 1 | -0/+12 |
| | | | | | * dex: rebuild connection if dkg reset * core: vm: fix governance contract | ||||
* | core: vm: update set size on node info change (#307) | Wei-Ning Huang | 2019-04-09 | 1 | -8/+4 |
| | | | | | | * core: vm: update set size on node info change * fix typo | ||||
* | core: merge notarySet and DKGSet (#265) | Jimmy Hu | 2019-04-09 | 3 | -79/+25 |
| | | | | | | | | * vendor: sync to latest core * core: merge notarySet and dkgSet * dex: optimize network traffic for finalized block | ||||
* | core: vm: fix DKG reset (#296) | Wei-Ning Huang | 2019-04-09 | 2 | -23/+26 |
| | |||||
* | core/vm: remove round from addDKG functions (#279) | Jimmy Hu | 2019-04-09 | 2 | -73/+45 |
| | | | | | | | | * vendor: sync to latest core * core/vm: remove addDKG functions * core: fix conflict | ||||
* | core: vm: deny duplicate public key from registering (#289) | Wei-Ning Huang | 2019-04-09 | 2 | -1/+20 |
| | |||||
* | core: vm: pay fine to governance owner and trigger set size recalculation (#288) | Wei-Ning Huang | 2019-04-09 | 1 | -1/+5 |
| | |||||
* | consensus: dexcon: disqualify dead node (#280) | Wei-Ning Huang | 2019-04-09 | 3 | -30/+128 |
| | | | | | | | | | | 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: emit event when transfering owner (#277) | Wei-Ning Huang | 2019-04-09 | 3 | -0/+48 |
| | |||||
* | core: vm: automatically calculate notary set size (#276) | Wei-Ning Huang | 2019-04-09 | 3 | -10/+95 |
| | |||||
* | core: vm: add extra checks to prevent DKG spamming (#272) | Wei-Ning Huang | 2019-04-09 | 3 | -58/+173 |
| | | | | Add two maps to check the uniqueness of DKGMasterPublicKey and DKGComplaints to prevent malicious actors from spamming it. | ||||
* | core: vm: fix naming consistency | Wei-Ning Huang | 2019-04-09 | 2 | -11/+11 |
| | |||||
* | core: check reset of dkg types when adding (#268) | Jimmy Hu | 2019-04-09 | 1 | -0/+16 |
| | | | | | | * vendor: sync to latest core * core: check dkg reset | ||||
* | core: vm: reorder minGasPriceLoc | Wei-Ning Huang | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | dex: implement recovery mechanism (#258) | Wei-Ning Huang | 2019-04-09 | 2 | -5/+5 |
| | | | | | | | | | * dex: implement recovery mechanism The DEXON recovery protocol allows us to use the Ethereum blockchain as a fallback consensus chain to coordinate recovery. * fix | ||||
* | core: vm: group min gas price with related state variables (#257) | Wei-Ning Huang | 2019-04-09 | 3 | -16/+16 |
| | |||||
* | core: vm: implement transfer node ownership (#255) | Wei-Ning Huang | 2019-04-09 | 3 | -9/+83 |
| | |||||
* | core: vm: create new oracle contract instance in each call (#251) | Wei-Ning Huang | 2019-04-09 | 3 | -6/+16 |
| | | | | | Since the VM might be called from different source (downloader, RPC, etc.). We need to make the call state separate. Modify the calling sequence so a new oracle contract instance is used on each run. | ||||
* | core/vm: use core util to get threshold of tsig (#250) | Jimmy Hu | 2019-04-09 | 1 | -3/+4 |
| | |||||
* | vendor: sync to latest core and fix conflict | Jimmy Hu | 2019-04-09 | 1 | -2/+2 |
| | |||||
* | core: vm: remove delegation mechanism (#245) | Wei-Ning Huang | 2019-04-09 | 4 | -994/+259 |
| | | | | | | | | | | | | | 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: expose CRSRound and DKGRound and fix consistency (#236) | Wei-Ning Huang | 2019-04-09 | 3 | -60/+118 |
| | |||||
* | core: fix dkg | Jimmy Hu | 2019-04-09 | 1 | -12/+47 |
| | |||||
* | dex: fill in correct coinbase address (#223) | Wei-Ning Huang | 2019-04-09 | 1 | -0/+9 |
| | | | Also remove app_test.go because of the refactor bojie@ is working on. | ||||
* | core: vm: validate addDKGMasterPublicKey caller properly (#220) | Wei-Ning Huang | 2019-04-09 | 3 | -60/+59 |
| | | | | | | There are two keys in the system: one is the owner's key which is used for stake / unstake. The other is the node key which is used for DKG related operations. We need to allow them to be different so fund renmains safe even if the the node key is lost. | ||||
* | core: vm: flatten governance | Wei-Ning Huang | 2019-04-09 | 4 | -482/+464 |
| | |||||
* | core: sync to latest core (#214) | Jimmy Hu | 2019-04-09 | 1 | -0/+10 |
| | | | | | * vendor: sync to latest core * fix for single chain | ||||
* | core: Fixed gas price (#205) | Jimmy Hu | 2019-04-09 | 3 | -1/+45 |
| | | | | | | | | | | * core/vm: update abi * core/vm: add MinGasPrice to gov * params: Add MinGasPrice to Config * dex: SuggestPrice from Governance * test: add minGasPrice to genesis.json * core: check underpriced tx * dex: verify with gas price | ||||
* | core: Remove K, Phi and NumChains from Governance (#198) | Jimmy Hu | 2019-04-09 | 3 | -161/+29 |
| | | | | | | * change default sync_core.sh * vendor: sync to latest core * core: Remove K, Phi and NumChain | ||||
* | core/vm: fix getConfigState (#203) | Jimmy Hu | 2019-04-09 | 1 | -4/+3 |
| | |||||
* | vm: reset DKG (#190) | Jimmy Hu | 2019-04-09 | 4 | -70/+562 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * vm: Update gov abi * vm: Add DKGResetCount to state helper * vm: add getter * vm: Add DKGReset event * vm: Add resetDKG method * vm: check resetDKG criteria * vm: Add new CRS * vm: add helper pop2DByteArray * vm: emit event * vm: Add CoreMock to GovernanceContract * vm: bug fix * add test for resetDKG * vm: Add test * fix test * Modify mock interface | ||||
* | core/vm: modify Withdrawn event and add NodeRemoved event (#179) | Jimmy Hu | 2019-04-09 | 2 | -4/+31 |
| | | | | | | * core/vm: add delegatorAddr to withdrawn event * core/vm: update gov abi * core/vm: add NodeRemoved event | ||||
* | core: vm: refactor governance and add node info oracle (#174) | Wei-Ning Huang | 2019-04-09 | 5 | -682/+953 |
| | |||||
* | core: vm: Add amount to undelegate event (#176) | Jimmy Hu | 2019-04-09 | 2 | -4/+9 |
| | |||||
* | core: vm: more change to the randomness calculation (#175) | Wei-Ning Huang | 2019-04-09 | 1 | -5/+5 |
| | | | | To prevent attacker from sending TX through a intermediate contract. Always use the original tx sender's adddress and nonce. | ||||
* | core: vm: modify randomness calculation algorithm (#173) | Wei-Ning Huang | 2019-04-09 | 2 | -3/+7 |
| | | | | | | | | | | | | | | | | | | | | | | | | The original algorithm used for calculating algorithm is vulnerable to cross context re-entry attack. Example as follows: contract B { event Value(uint256 value); uint256 public value; function call() public { value = rand; emit Value(value); } } contract A { function randTwice(address bAddr) public { B b = B(bAddr); b.call.gas(100000)(); b.call.gas(100000)(); } } The two `b.call` will result in the same randomness value. This commit fix the issue by recording a called index used to store how many times opRand is called, and use it as argument to the Keccak call. | ||||
* | consensus: dexcon: snapshot round height when finalizing block (#170) | Wei-Ning Huang | 2019-04-09 | 3 | -106/+0 |
| | | | | 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 ↵ | Sonic | 2019-04-09 | 1 | -0/+123 |
| | | | | | | | | (#168) Refactor GenerateDexonChain function, move governance tx logic to the user of GenerateDexonChain (testchain_test.go) and move fake node set code to FakeDexcon. | ||||
* | params: update genesis config | Wei-Ning Huang | 2019-04-09 | 1 | -14/+14 |
| | |||||
* | consensus: implement DEXON cryptoeconomics v4.0 (#145) | Wei-Ning Huang | 2019-04-09 | 3 | -54/+150 |
| | |||||
* | core: vm: add totalSupply and totalStaked in the governance contract (#144) | Wei-Ning Huang | 2019-04-09 | 3 | -35/+138 |
| | | | | | | | 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. | ||||
* | core: vm: move governance abi to a separate file (#143) | Wei-Ning Huang | 2019-04-09 | 2 | -1053/+1074 |
| | |||||
* | core: vm: emit events for more governance actions (#142) | Wei-Ning Huang | 2019-04-09 | 1 | -0/+145 |
| | |||||
* | core: vm: implement byzantine reporting mechanism (#128) | Wei-Ning Huang | 2019-04-09 | 2 | -48/+578 |
| | |||||
* | core: vm: add missing unittests for nodes/delegators (#116) | Wei-Ning Huang | 2019-04-09 | 2 | -3/+13 |
| | |||||
* | core/vm: Add fine to governance. (#107) | Jimmy Hu | 2019-04-09 | 2 | -132/+292 |
| | | | | | | | | * core/vm: Add Fined field to nodeInfo. * core/vm: Add PayFine to Governance * Not qualify if staked-fine < minStake() * Add test for fine * Update genesis hash | ||||
* | vendor: sync DEXON core and fix conflicts/missings (#101) | Mission Liao | 2019-04-09 | 1 | -4/+6 |
| | | | | | | | Merging these commits in DEXON consensus core: - https://github.com/dexon-foundation/dexon-consensus/commit/dce509a13ef5873b9cae3c1cabdb97e219b6fb7d - https://github.com/dexon-foundation/dexon-consensus/commit/6d1c1aeea0d3e75d10cbb2712c68b4c422ba8ba6 - https://github.com/dexon-foundation/dexon-consensus/commit/c1ed57c4abaf1f4758e52f082bb7114ad00c8b39 | ||||
* | core: vm: Add `MPKReady` to governance (#97) | Jimmy Hu | 2019-04-09 | 1 | -0/+166 |
| | | | | | | * core/vm: Add DKGMPKReady * param: update GenesisHash * vendor: sync to latest core | ||||
* | core/vm: fix nodes method in governance | Jimmy Hu | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | core: vm: add undelegate fund lockup mechanism (#94) | Wei-Ning Huang | 2019-04-09 | 2 | -40/+235 |
| | | | | | Only allow a user to withdraw funds after a certain lockup period. This way, the fund of a bad actor could be confiscated before he could escape. | ||||
* | core: governance interface should return correct DKG master public keys (#85) | Wei-Ning Huang | 2019-04-09 | 1 | -15/+20 |
| | |||||
* | core: vm: fix power2 table calculation (#50) | Wei-Ning Huang | 2019-04-09 | 1 | -3/+3 |
| | |||||
* | core: vm: change offset type to int256 | Wei-Ning Huang | 2019-04-09 | 1 | -2/+7 |
| | | | | | Since we use -1 to represent the offset of empty value, we should make the return type int256 instead of uint256. | ||||
* | governance: implement delegate/undelegate function and add tests (#33) | Wei-Ning Huang | 2019-04-09 | 2 | -107/+1145 |
| | | | | | 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 Huang | 2019-04-09 | 1 | -55/+37 |
| | | | | | | 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: vm: add minStake to governance contract variable (#31) | Wei-Ning Huang | 2019-04-09 | 1 | -0/+41 |
| | |||||
* | core: fix light node synchronization issue (#30) | Wei-Ning Huang | 2019-04-09 | 3 | -9/+17 |
| | | | | | InsertChain() need to record the correct roundHeight mapping in order to process snapshotRoundHeight() governance method correctly. | ||||
* | core: validate DKG set with correct nodeset in round-2 (#19) | Wei-Ning Huang | 2019-04-09 | 2 | -9/+26 |
| | | | | | * vendor: sync consensus core * core: validate DKG set with correct nodeset in round-2 | ||||
* | core: vm: Optimize evm (#13) | Jimmy Hu | 2019-04-09 | 5 | -18/+282 |
| | | | | | | | * core: vm: add an EVM benchmark * core: vm: optimize stack allocation and instruction for calculating 2^n * Add DEXONBet bench | ||||
* | core: push height of round 0 in genesis block (#17) | Sonic | 2019-04-09 | 1 | -8/+8 |
| | | | | | | | * core: push height of round 0 in genesis block * vm: fix governance dispatch method name mismatch with abi also rename RoundHeightLoc to roundHeightLoc | ||||
* | core: vm: expose governance contract ABI (#5) | Wei-Ning Huang | 2019-04-09 | 1 | -2/+2 |
| | |||||
* | core: vm: governance: add node info | Wei-Ning Huang | 2019-04-09 | 1 | -8/+110 |
| | |||||
* | core: validate roundHeight mapping in governance contract | Wei-Ning Huang | 2019-04-09 | 2 | -4/+22 |
| | |||||
* | core: vm: governance: remove maxInterval | Wei-Ning Huang | 2019-04-09 | 1 | -32/+0 |
| | |||||
* | core: vm: add nodesLengh method for reading nodeSet size | Wei-Ning Huang | 2019-04-09 | 1 | -0/+20 |
| | |||||
* | Rename import due to dexon-consensus rename | Wei-Ning Huang | 2019-04-09 | 2 | -16/+16 |
| | |||||
* | dex: add block gas limit into governance | Wei-Ning Huang | 2019-04-09 | 1 | -0/+35 |
| | |||||
* | vendor: sync consensus core and fix conflict | Wei-Ning Huang | 2019-04-09 | 1 | -7/+8 |
| | |||||
* | dex: fix DKG round switching | Wei-Ning Huang | 2019-04-09 | 1 | -6/+18 |
| | |||||
* | dex: fix round switching and initialize dMoment correctly | Wei-Ning Huang | 2019-04-09 | 1 | -1/+2 |
| | |||||
* | dex: misc fixes | Wei-Ning Huang | 2019-04-09 | 1 | -3/+3 |
| | |||||
* | dex: use RLP to encode contract payload data | Wei-Ning Huang | 2019-04-09 | 1 | -6/+6 |
| | |||||
* | core: vm: add blockReward to governance | Wei-Ning Huang | 2019-04-09 | 1 | -0/+35 |
| | |||||
* | dex: fix public key parsing due to changes in consensus core | Wei-Ning Huang | 2019-04-09 | 1 | -1/+4 |
| | |||||
* | test: create account storage for governance contract | Wei-Ning Huang | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | core/dex: fix governance contract implementation | Wei-Ning Huang | 2019-04-09 | 1 | -19/+13 |
| | |||||
* | core: vm: implement RAND opcode support | Wei-Ning Huang | 2019-04-09 | 4 | -0/+32 |
| | | | | | | 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 fixes | Wei-Ning Huang | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | core: vm: modify dkg threshold | Jimmy Hu | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | core: vm: add GovernanceStateHelper test | Wei-Ning Huang | 2019-04-09 | 2 | -0/+98 |
| | |||||
* | dex: bug fix to allow running geth without crashing | Wei-Ning Huang | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | dex: implement sendTx related governance methods | Wei-Ning Huang | 2019-04-09 | 1 | -0/+5 |
| | |||||
* | core: vm: validate if mpk, complaint, finalize is in DKG set | Wei-Ning Huang | 2019-04-09 | 1 | -36/+62 |
| | |||||
* | core: vm: allow other people to stake for a node | Wei-Ning Huang | 2019-04-09 | 1 | -6/+0 |
| | |||||
* | dex: implement some governance interface functions | Wei-Ning Huang | 2019-04-09 | 1 | -213/+342 |
| | |||||
* | dex: governance: implement governance interface | Wei-Ning Huang | 2019-04-09 | 1 | -7/+22 |
| | |||||
* | core: populate dexon configuration in SetupGenesisBlock | Wei-Ning Huang | 2019-04-09 | 1 | -31/+25 |
| | |||||
* | core: add stake and public key to genesis account info | Wei-Ning Huang | 2019-04-09 | 1 | -44/+55 |
| | |||||
* | core: vm: check pk ownership in stake() | Wei-Ning Huang | 2019-04-09 | 1 | -1/+12 |
| | |||||
* | core: vm: expose nodes as public | Wei-Ning Huang | 2019-04-09 | 1 | -14/+52 |
| | |||||
* | core: vm: add eventlog for governance contract | Wei-Ning Huang | 2019-04-09 | 1 | -41/+98 |
| | |||||
* | core: vm: refactor and add DKGFinalizeds related implementations | Wei-Ning Huang | 2019-04-09 | 1 | -94/+300 |
| | |||||
* | core: vm: implement the rest of governance contract methods | Wei-Ning Huang | 2019-04-09 | 1 | -132/+275 |
| | |||||
* | core: vm: check if caller already staked when adding dkg mpk | Jimmy Hu | 2019-04-09 | 1 | -0/+7 |
| | |||||
* | core: vm: fix bug and add gas usage | Wei-Ning Huang | 2019-04-09 | 2 | -22/+55 |
| | |||||
* | core: vm: finish implementing state helper | Wei-Ning Huang | 2019-04-09 | 1 | -23/+206 |
| | |||||
* | core: vm: update governance contract ABI | Wei-Ning Huang | 2019-04-09 | 1 | -9/+75 |
| | |||||
* | core: vm: implement governance contract methods | Wei-Ning Huang | 2019-04-09 | 1 | -51/+218 |
| | |||||
* | core: vm: add governance contract skeleton | Wei-Ning Huang | 2019-04-09 | 2 | -0/+495 |
| | |||||
* | Change import go github.com/dexon-foundation/dexon | Wei-Ning Huang | 2019-04-09 | 24 | -62/+62 |
| | |||||
* | core, cmd/puppeth: implement constantinople fix, disable EIP-1283 (#18486) | Martin Holst Swende | 2019-01-30 | 2 | -2/+8 |
| | | | | | | | | | | | | | | | | | 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! | ||||
* | vendor, crypto, swarm: switch over to upstream sha3 package | Dave McGregor | 2019-01-04 | 1 | -2/+2 |
| | |||||
* | cmd/evm, core/vm, eth: implement api methods to do stdjson dump to local ↵ | Martin Holst Swende | 2018-12-10 | 1 | -0/+83 |
| | | | | filesystem | ||||
* | tests, core: update tests and make STATICCALL cause touch-delete (#18187) | Martin Holst Swende | 2018-11-29 | 1 | -0/+6 |
| | |||||
* | Merge pull request #17982 from holiman/polish_contantinople_extcodehash | Péter Szilágyi | 2018-11-08 | 1 | -1/+6 |
|\ | | | | | core/vm: check empty in extcodehash | ||||
| * | core/vm: check empty in extcodehash | Martin Holst Swende | 2018-10-26 | 1 | -1/+6 |
| | | |||||
* | | core/vm, eth/tracers: use pointer receiver for GetRefund (#18018) | Corey Lin | 2018-11-08 | 1 | -1/+1 |
|/ | |||||
* | core/state: simplify proof methods (#17965) | Felix Lange | 2018-10-24 | 1 | -10/+0 |
| | | | | This fixes the import cycle build error in core/vm tests. There is no need to refer to core/vm for a type definition. | ||||
* | core/vm: adds refund as part of the json standard trace (#17910) | Martin Holst Swende | 2018-10-23 | 3 | -36/+50 |
| | | | | | | | This adds the global accumulated refund counter to the standard json output as a numeric json value. Previously this was not very interesting since it was not used much, but with the new sstore gas changes the value is a lot more interesting from a consensus investigation perspective. | ||||
* | EIP-1186 eth_getProof (#17737) | Simon Jentzsch | 2018-10-19 | 1 | -0/+10 |
| | | | | | | | | | | | | | | | | * first impl of eth_getProof * fixed docu * added comments and refactored based on comments from holiman * created structs * handle errors correctly * change Value to *hexutil.Big in order to have the same output as parity * use ProofList as return type | ||||
* | core/vm: add shortcuts for trivial exp cases (#16851) | Martin Holst Swende | 2018-10-16 | 1 | -4/+16 |
| | |||||
* | core/vm: reuse Keccak-256 hashes across opcode executions (#17863) | Péter Szilágyi | 2018-10-08 | 3 | -6/+48 |
| | |||||
* | core/vm : fix failing testcase (#17852) | Martin Holst Swende | 2018-10-06 | 1 | -1/+2 |
| | | | | | | * core/vm : fix failing testcase * core/vm: fix nitpick | ||||
* | core/vm: SHA3 word cost for CREATE2 (#17812) | Martin Holst Swende | 2018-10-05 | 2 | -0/+87 |
| | | | | | | | | * core/vm: create2 address generation tests * core/vm: per byte cost of CREATE2 * core/vm: fix linter issue in test | ||||
* | core/vm: faster create/create2 (#17806) | Martin Holst Swende | 2018-10-04 | 6 | -52/+145 |
| | | | | | | | | | | | | | | | | | | | | | | | | * core/vm/runtim: benchmark create/create2 * core/vm: do less hashing in CREATE2 * core/vm: avoid storing jumpdest analysis for initcode * core/vm: avoid unneccesary lookups, remove unused fields * core/vm: go formatting tests * core/vm: save jumpdest analysis locally * core/vm: use common.Hash instead of nil, fix review comments * core/vm: removed type destinations * core/vm: correct check for empty hash * eth: more elegant api_tracer * core/vm: address review concerns | ||||
* | all: fix various comment typos (#17748) | Liang ZOU | 2018-09-25 | 2 | -2/+2 |
| | |||||
* | Merge pull request #17383 from holiman/eip1283 | Péter Szilágyi | 2018-09-21 | 4 | -91/+63 |
|\ | | | | | Eip1283 | ||||
| * | core, params: polish net gas metering PR a bit | Péter Szilágyi | 2018-09-18 | 5 | -149/+55 |
| | | |||||
| * | core,state: finish implementing Eip 1283 | Martin Holst Swende | 2018-09-18 | 4 | -16/+23 |
| | | |||||
| * | core, state: initial implementation of Eip-1283 | Martin Holst Swende | 2018-09-18 | 3 | -1/+60 |
| | | |||||
* | | core/vm: add switches to select evm+ewasm interpreters (#17687) | Guillaume Ballet | 2018-09-20 | 2 | -2/+25 |
|/ | | | | | Interpreter initialization is left to the PRs implementing them. Options for external interpreters are passed after a colon in the `--vm.ewasm` and `--vm.evm` switches. | ||||
* | core/vm: fix typo 'EVM EVM' ==> 'EVM' (#17654) | Liang ZOU | 2018-09-13 | 1 | -1/+1 |
| | |||||
* | core/vm: Hide read only flag from Interpreter interface (#17461) | Paweł Bylica | 2018-09-08 | 2 | -30/+16 |
| | | | | | Makes Interface interface a bit more stateless and abstract. Obviously this change is dictated by EVMC design. The EVMC tries to keep the responsibility for EVM features totally inside the VMs, if feasible. This makes VM "stateless" because VM does not need to pass any information between executions, all information is included in parameters of the execute function. | ||||
* | core/vm, tests: update tests, enable constantinople statetests, fix SAR ↵ | Martin Holst Swende | 2018-09-04 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | opcode (#17538) This commit does a few things at once: - Updates the tests to contain the latest data from ethereum/tests repo. - Enables Constantinople state tests. This is needed to be able to fuzz-test the evm with constantinople rules. - Fixes the error in opSAR that we've known about for some time. I was kind of saving it to see if we hit upon it with the random test generator, but it's difficult to both enable the tests and have the bug there -- we don't want to forget about it, so maybe it's better to just fix it. | ||||
* | all: remove the duplicate 'the' in annotations (#17509) | Wenbiao Zheng | 2018-08-27 | 1 | -1/+1 |
| | |||||
* | crypto: change formula for create2 (#17393) | gary rong | 2018-08-14 | 1 | -1/+1 |
| | |||||
* | core/vm: fix comment typo (#17319) | stormpang | 2018-08-06 | 1 | -1/+1 |
| | | | | antything --> anything :P | ||||
* | core/vm: update benchmarks for core/vm (#17308) | Hyung-Kyu Hqueue Choi | 2018-08-03 | 1 | -0/+4 |
| | | | | | | - Update benchmarks to use a pool of int pools. Unless benchmarks are aborted with segmentation fault. Signed-off-by: Hyung-Kyu Choi <hqueue@users.noreply.github.com> | ||||
* | core/vm: fix typo in cryptographic hash function name (#17285) | Ha ĐANG | 2018-07-31 | 1 | -1/+1 |
| | |||||
* | core/vm: support for multiple interpreters (#17093) | Guillaume Ballet | 2018-07-25 | 6 | -240/+315 |
| | | | | | | - Define an Interpreter interface - One contract can call contracts from other interpreter types. - Pass the interpreter to the operands instead of the evm. This is meant to prevent type assertions in operands. | ||||
* | core/vm, params: implement EXTCODEHASH opcode (#17202) | gary rong | 2018-07-24 | 4 | -0/+45 |
| | | | | | | | | * core/vm, params: implement EXTCODEHASH opcode * core, params: tiny fixes and polish * core: add function description | ||||
* | core, crypto, params: implement CREATE2 evm instrction (#17196) | gary rong | 2018-07-24 | 6 | -17/+87 |
| | | | | | | | | | | * core, crypto, params: implement CREATE2 evm instrction * core/vm: add opcode to string mapping * core: remove past fork checking * core, crypto: use option2 to generate new address | ||||
* | core/vm: reuse bigint pools across transactions (#17070) | Guillaume Ballet | 2018-07-03 | 4 | -2/+112 |
| | | | | | | | | * core/vm: A pool for int pools * core/vm: fix rebase issue * core/vm: push leftover stack items after execution, not before | ||||
* | core/vm: clear linter warnings (#17057) | Guillaume Ballet | 2018-06-26 | 9 | -30/+51 |
| | | | | | | | | * core/vm: clear linter warnings * core/vm: review input * core/vm.go: revert lint in noop as per request | ||||
* | core: remove dead code, limit test code scope (#17006) | Wenbiao Zheng | 2018-06-19 | 1 | -6/+0 |
| | | | | | | * core: move test util var/func to test file * core: remove useless func | ||||
* | core/vm: optimize MSTORE and SLOAD (#16939) | Martin Holst Swende | 2018-06-14 | 3 | -11/+68 |
| | | | | | | | | | | * vm/test: add tests+benchmarks for mstore * core/vm: less alloc and copying for mstore * core/vm: less allocs in sload * vm: check for errors more correctly | ||||
* | params: fix golint warnings (#16853) | kiel barry | 2018-06-05 | 1 | -1/+1 |
| | | | params: fix golint warnings | ||||
* | core/vm: fix typo in comment | Abel Nieto | 2018-05-29 | 1 | -1/+1 |
| | |||||
* | common: improve documentation comments (#16701) | kiel barry | 2018-05-29 | 1 | -3/+3 |
| | | | | | This commit adds many comments and removes unused code. It also removes the EmptyHash function, which had some uses but was silly. | ||||
* | core/vm: fix typo in instructions.go (#16788) | Abel Nieto | 2018-05-23 | 1 | -1/+1 |
| | |||||
* | all: get rid of error when creating memory database (#16716) | gary rong | 2018-05-09 | 2 | -6/+3 |
| | | | | | | | | * all: get rid of error when create mdb * core: clean up variables definition * all: inline mdb definition | ||||
* | core: golint updates for this or self warning (#16633) | kiel barry | 2018-05-02 | 4 | -18/+18 |
| | |||||
* | core, eth: fix tracer dirty finalization | Péter Szilágyi | 2018-04-27 | 1 | -0/+5 |
| | |||||
* | build: enable goimports and varcheck linters (#16446) | thomasmodeneis | 2018-04-18 | 1 | -1/+0 |
| | |||||
* | common: delete StringToAddress, StringToHash (#16436) | Felix Lange | 2018-04-10 | 1 | -2/+2 |
| | | | | | | | | | | * common: delete StringToAddress, StringToHash These functions are confusing because they don't parse hex, but use the bytes of the string. This change removes them, replacing all uses of StringToAddress(s) by BytesToAddress([]byte(s)). * eth/filters: remove incorrect use of common.BytesToAddress | ||||
* | cmd/evm: print vm output when debug flag is on (#16326) | dm4 | 2018-04-06 | 1 | -0/+7 |
| | |||||
* | core/vm: Fixed typos in core/vm/interpreter.go | hydai | 2018-03-27 | 1 | -2/+2 |
| | |||||
* | core/vm: Fixed typo in core/vm/evm.go | hydai | 2018-03-26 | 1 | -3/+3 |
| | |||||
* | core/vm: remove JIT VM codes (#16362) | hydai | 2018-03-26 | 7 | -434/+9 |
| | |||||
* | core: minor evm polishes and optimizations | Péter Szilágyi | 2018-03-26 | 2 | -97/+90 |
| | |||||
* | core/vm: optimize eq, slt, sgt and iszero + tests (#16047) | Martin Holst Swende | 2018-03-08 | 2 | -25/+61 |
| | | | | | | | | * vm: optimize eq, slt, sgt and iszero + tests * core/vm: fix error in slt/sgt, found by vmtests. Added testcase * core/vm: make slt/sgt cleaner | ||||
* | core/vm, crypto/bn256: switch over to cloudflare library (#16203) | Péter Szilágyi | 2018-03-05 | 1 | -25/+6 |
| | | | | | | | | | | * core/vm, crypto/bn256: switch over to cloudflare library * crypto/bn256: unmarshal constraint + start pure go impl * crypto/bn256: combo cloudflare and google lib * travis: drop 386 test job | ||||
* | cmd/evm, core/vm, internal/ethapi: don't disable call gas metering | Péter Szilágyi | 2018-03-05 | 1 | -10/+5 |
| | |||||
* | core, vm, common: define constantinople fork + shift (#16045) | Martin Holst Swende | 2018-02-23 | 5 | -3/+254 |
| | | | | | | | | | | | | * core, vm, common: define constantinople fork, start implementation of shift instructions * vm: more testcases * vm: add tests for intpool erroneous intpool handling * core, vm, common: fix constantinople review concerns * vm: add string<->op definitions for new opcodes | ||||
* | core/vm: remove unused hashing (#16075) | ferhat elmas | 2018-02-14 | 1 | -7/+0 |
| | |||||
* | all: update license information (#16089) | Felix Lange | 2018-02-14 | 2 | -0/+32 |
| | |||||
* | core/vm: Fix comment typo | George Ornbo | 2018-01-16 | 1 | -1/+1 |
| | |||||
* | all: regenerate codecs with gencodec commit 90983d99de (#15830) | Felix Lange | 2018-01-08 | 1 | -2/+2 |
| | | | Fixes #15777 because null is now allowed for hexutil.Bytes. | ||||
* | all: update generated code (#15808) | Felix Lange | 2018-01-08 | 2 | -19/+31 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 | ||||
* | tests: update to upstream commit 2bb0c3da3b (#15806) | Felix Lange | 2018-01-04 | 1 | -8/+12 |
| | | | | Also raise traceLimit once again and print the VM error and output on failure. | ||||
* | all: switch gas limits from big.Int to uint64 | Péter Szilágyi | 2018-01-03 | 6 | -13/+9 |
| | |||||
* | cmd, core, eth/tracers: support fancier js tracing (#15516) | Péter Szilágyi | 2017-12-21 | 3 | -9/+45 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cmd, core, eth/tracers: support fancier js tracing * eth, internal/web3ext: rework trace API, concurrency, chain tracing * eth/tracers: add three more JavaScript tracers * eth/tracers, vendor: swap ottovm to duktape for tracing * core, eth, internal: finalize call tracer and needed extras * eth, tests: prestate tracer, call test suite, rewinding * vendor: fix windows builds for tracer js engine * vendor: temporary duktape fix * eth/tracers: fix up 4byte and evmdis tracer * vendor: pull in latest duktape with my upstream fixes * eth: fix some review comments * eth: rename rewind to reexec to make it more obvious * core/vm: terminate tracing using defers | ||||
* | core/vm: Remove snapshot param from Interpreter.Run() | Paweł Bylica | 2017-12-15 | 2 | -10/+10 |
| | |||||
* | core/vm: track 63/64 call gas off stack (#15563) | Felix Lange | 2017-11-29 | 4 | -99/+55 |
| | | | | | | | | | | | | | | | | | * core/vm: track 63/64 call gas off stack Gas calculations in gasCall* relayed the available gas for calls by replacing it on the stack. This lead to inconsistent traces, which we papered over by copying the pre-execution stack in trace mode. This change relays available gas using a temporary variable, off the stack, and allows removing the weird copy. * core/vm: remove stackCopy * core/vm: pop call gas into pool * core/vm: to -> addr | ||||
* | core/vm, internal/ethapi: tracer no full storage, nicer json output (#15499) | Péter Szilágyi | 2017-11-17 | 2 | -46/+4 |
| | | | | | | * core/vm, internal/ethapi: tracer no full storage, nicer json output * core/vm, internal/ethapi: omit disabled trace fields | ||||
* | Merge pull request #14582 from holiman/jumpdest_improv | Péter Szilágyi | 2017-11-15 | 2 | -14/+96 |
|\ | | | | | core/vm: improve jumpdest analysis | ||||
| * | core/vm: copyright header on test-file | Martin Holst Swende | 2017-11-14 | 1 | -0/+16 |
| | | |||||
| * | core/vm: improve bitvec comments | Felix Lange | 2017-09-11 | 1 | -7/+7 |
| | | |||||
| * | core/vm: Rename + updated doc on jumpdest analysis | Martin Holst Swende | 2017-09-08 | 2 | -5/+5 |
| | | |||||
| * | core/vm: make jumpdest code nicer | Felix Lange | 2017-08-24 | 1 | -3/+1 |
| | | |||||
| * | core/vm: Address review concerns | Martin Holst Swende | 2017-08-14 | 1 | -14/+19 |
| | | |||||
| * | core/vm: improved jumpdest analysis | Martin Holst Swende | 2017-06-05 | 2 | -9/+72 |
| | | |||||
* | | core/vm: fix typos in jump_table.go | Jay Guo | 2017-11-14 | 1 | -2/+2 |
| | | |||||
* | | build: enable unconvert linter (#15456) | ferhat elmas | 2017-11-11 | 1 | -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 | ||||
* | | core/vm: check opcode stack before readonly enforcement | Péter Szilágyi | 2017-10-14 | 1 | -13/+10 |
| | | |||||
* | | core/vm: standard vm traces (#15035) | cdetrio | 2017-09-22 | 1 | -3/+19 |
| | | |||||
* | | params: Updated finalized gascosts for ECMUL/MODEXP (#15135) | Martin Holst Swende | 2017-09-14 | 1 | -3/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | * params: Updated finalized gascosts for ECMUL/MODEXP * core,tests: Updates pending new tests * tests: Updated with new tests * core: revert state transition bugfix * tests: Add expected failures due to #15119 | ||||
* | | consensus, core, params: rebrand Metro to Byzantium | Péter Szilágyi | 2017-09-14 | 6 | -19/+19 |
| | | |||||
* | | core/vm: Make MaxCodesize non-retroactive (#15072) | Martin Holst Swende | 2017-09-04 | 1 | -1/+1 |
| | | | | | | | | | | | | * core/vm: Make max_codesize only applicable post Spurious Dragon/158/155/161/170 * tests: Remove expected failure | ||||
* | | core/vm: avoid state lookup during gas calc for call (#15061) | Martin Holst Swende | 2017-09-04 | 1 | -1/+1 |
| | | |||||
* | | core/vm: renamed struct member + go fmt | Martin Holst Swende | 2017-08-28 | 1 | -71/+71 |
| | | |||||
* | | core/vm: Fix testcase input for ecmul | Martin Holst Swende | 2017-08-28 | 1 | -2/+2 |
| | | |||||
* | | core/vm: more benchmarks | Martin Holst Swende | 2017-08-27 | 1 | -0/+76 |
| | | |||||
* | | core, tests: implement Metropolis EIP 684 | Péter Szilágyi | 2017-08-25 | 2 | -8/+17 |
| | | |||||
* | | consensus, core, tests: implement Metropolis EIP 649 | Péter Szilágyi | 2017-08-24 | 1 | -6/+2 |
| | | |||||
* | | Merge pull request #15014 from rjl493456442/metropolis-eip658 | Péter Szilágyi | 2017-08-23 | 2 | -2/+6 |
|\ \ | | | | | | | core: add status as a consensus field in receipt | ||||
| * | | core: implement Metropolis EIP 658, receipt status byte | rjl493456442 | 2017-08-22 | 2 | -2/+6 |
| | | | |||||
* | | | cmd/evm, core/vm, internal/ethapi: Show error when exiting (#14985) | Martin Holst Swende | 2017-08-23 | 1 | -2/+5 |
|/ / | | | | | | | | | | | * cmd/evm, core/vm, internal/ethapi: Add 'err' to tracer interface CaptureEnd * cmd/evm: fix nullpointer when there is no error | ||||
* | | core/vm: fix typo in method documentation (#15019) | Ti Zhou | 2017-08-22 | 1 | -1/+1 |
| | | | | | | Signed-off-by: Ti Zhou <tizhou1986@gmail.com> | ||||
* | | Merge pull request #14983 from karalabe/metropolis-revert | Péter Szilágyi | 2017-08-21 | 7 | -42/+70 |
|\ \ | | | | | | | core/vm: implement REVERT metropolis opcode | ||||
| * | | core/vm: rework reversion to work on a higher level | Péter Szilágyi | 2017-08-17 | 6 | -45/+53 |
| | | | |||||
| * | | core/vm: implement REVERT metropolis opcode | Jeffrey Wilcke | 2017-08-16 | 4 | -1/+21 |
| | | | |||||
* | | | core/vm, crypto/bn256: fix bn256 use and pairing corner case | Péter Szilágyi | 2017-08-17 | 2 | -9/+69 |
|/ / | |||||
* | | core/vm: polish RETURNDATA, add missing returns to CALL* | Péter Szilágyi | 2017-08-16 | 7 | -72/+75 |
| | | |||||
* | | core/vm: implement RETURNDATA metropolis opcodes | Jeffrey Wilcke | 2017-08-16 | 6 | -171/+253 |
| | | |||||
* | | core/vm: minor polishes, fix STATICCALL for precompiles | Péter Szilágyi | 2017-08-15 | 2 | -37/+33 |
| | | | | | | | | | | | | * Fix STATICCALL so it is able to call precompiles too * Fix write detection to use the correct value argument of CALL * Fix write protection to ignore the value in CALLCODE | ||||
* | | core/vm: implement metropolis static call opcode | Jeffrey Wilcke | 2017-08-15 | 7 | -3/+153 |
| | | |||||
* | | core/vm: optimize copy-less data retrievals | Péter Szilágyi | 2017-08-14 | 4 | -54/+75 |
| | | |||||
* | | core/vm: benchmarking of metro precompiles | Martin Holst Swende | 2017-08-14 | 2 | -206/+341 |
| | | |||||
* | | core/vm: polish precompile contract code, add tests and benches | Péter Szilágyi | 2017-08-14 | 4 | -196/+355 |
| | | | | | | | | | | * Update modexp gas calculation to new version * Fix modexp modulo 0 special case to return zero | ||||
* | | core: add Metropolis pre-compiles (EIP 197, 198 and 213) | Jeffrey Wilcke | 2017-08-11 | 3 | -2/+242 |
| | | |||||
* | | core/vm/runtime: remove unused state parameter to NewEnv (#14953) | Joel Burget | 2017-08-11 | 2 | -5/+4 |
| | | | | | | | | | | | | | | | | * core: Remove unused `state` parameter to `NewEnv`. `cfg.State` is used instead. * core/vm/runtime: remove unused import | ||||
* | | core/vm: fix typo in comment (#14894) | evgk | 2017-08-04 | 1 | -1/+1 |
| | | |||||
* | | core/vm/runtime: fix evm command to use --gasprice flag value | cdetrio | 2017-07-26 | 1 | -1/+1 |
| | | |||||
* | | core/vm: remove logging and add section labels to struct logs (#14782) | Felix Lange | 2017-07-19 | 3 | -23/+16 |
| | | |||||
* | | Merge pull request #14718 from holiman/gascalc_fix | Péter Szilágyi | 2017-06-28 | 2 | -17/+17 |
|\ \ | | | | | | | core/vm: fix overflow in gas calculation formula | ||||
| * | | core/vm : fix testcase for gas calculation | Martin Holst Swende | 2017-06-28 | 1 | -11/+7 |
| | | | |||||
| * | | core/vm: fix overflow in gas calculation formula | Martin Holst Swende | 2017-06-28 | 1 | -6/+10 |
| | | | |||||
* | | | core/vm: add benchmarks for some ops and precompiles (#14641) | Martin Holst Swende | 2017-06-28 | 1 | -0/+242 |
|/ / | |||||
* | | core/state: access trie through Database interface, track errors (#14589) | Felix Lange | 2017-06-27 | 2 | -3/+3 |
| | | | | | | | | | | | | | | | | | | 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). | ||||
* | | cmd/evm, core/vm: add --nomemory, --nostack to evm (#14617) | Martin Holst Swende | 2017-06-21 | 2 | -31/+31 |
| | | |||||
* | | Merge pull request #14581 from holiman/byte_opt | Péter Szilágyi | 2017-06-13 | 2 | -7/+48 |
|\ \ | | | | | | | core/vm: improve opByte | ||||
| * | | core/vm, common/math: Add doc about Byte, fix format | Martin Holst Swende | 2017-06-09 | 1 | -1/+0 |
| | | | |||||
| * | | common/math, core/vm: Un-expose bigEndianByteAt, use correct terms for ↵ | Martin Holst Swende | 2017-06-07 | 1 | -2/+2 |
| | | | | | | | | | | | | endianness | ||||
| * | | core/vm, common/math: Add fast getByte for bigints, improve opByte | Martin Holst Swende | 2017-06-05 | 2 | -7/+49 |
| |/ | |||||
* / | cmd/evm: add --prestate, --sender, --json flags for fuzzing (#14476) | Martin Holst Swende | 2017-06-07 | 4 | -19/+142 |
|/ | |||||
* | core/vm: Use a bitmap instead of a map for jumpdest analysis | Nick Johnson | 2017-06-02 | 1 | -14/+12 |
| | | | | t push --force | ||||
* | core: fix minor accidental typos and comment errors | Péter Szilágyi | 2017-05-25 | 1 | -1/+1 |
| | |||||
* | core/vm: allocate stack to 1024 | Jeffrey Wilcke | 2017-05-25 | 1 | -1/+1 |
| | | | | | Pre allocate the stack to 1024 optimising stack pushing, reducing calls to runtime.makeslice and runtime.mallocgc | ||||
* | core/vm: expose intpool to stack dup method | Jeffrey Wilcke | 2017-05-23 | 2 | -3/+3 |
| | | | | | Improve the duplication method of the stack to reuse big ints by passing in an existing integer pool. | ||||
* | core/vm: capped int pool | Jeffrey Wilcke | 2017-05-23 | 1 | -0/+6 |
| | |||||
* | core/vm: improved push instructions | Jeffrey Wilcke | 2017-05-23 | 2 | -35/+48 |
| | | | | | Improved push instructions by removing unnecessary big int allocations and by making it int instead of big.Int | ||||
* | core/vm: improve error message for invalid opcodes | Valentin Wüstholz | 2017-05-22 | 1 | -1/+1 |
| | |||||
* | consensus, core, core/vm, parems: review fixes | Jeffrey Wilcke | 2017-05-18 | 2 | -9/+13 |
| | |||||
* | consensus, core/*, params: metropolis preparation refactor | Jeffrey Wilcke | 2017-05-18 | 7 | -89/+141 |
| | | | | | | | | | | | | | | | | | | | | | | | | 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) | ||||
* | all: update license information | Felix Lange | 2017-04-14 | 8 | -1/+113 |
| | |||||
* | core/vm: use uint64 instead of *big.Int in tracer (#3805) | Yohann Leon | 2017-03-22 | 3 | -14/+10 |
| | |||||
* | core/evm, core/vm: improved evm trace output | Jeffrey Wilcke | 2017-03-01 | 1 | -15/+25 |
| | | | | | | | | * Improved the standard evm tracer output and renamed it to WriteTrace which now takes an io.Writer to write the logs to. * Added WriteLogs which writes logs to the given writer in a readable format. * evm utility now also prints logs generated during the execution. | ||||
* | cmd/evm, core/asm: add EVM assembler (#3686) | Jeffrey Wilcke | 2017-03-01 | 1 | -18/+2 |
| | | | | | The evm compile command implements a simple assembly language that compiles to EVM bytecode. | ||||
* | Merge pull request #3723 from karalabe/logger-updates-2 | Péter Szilágyi | 2017-02-28 | 2 | -8/+3 |
|\ | | | | | Logger updates | ||||
| * | all: next batch of log polishes to contextual versions | Péter Szilágyi | 2017-02-28 | 2 | -8/+3 |
| | | |||||
* | | all: unify big.Int zero checks, use common/math in more places (#3716) | Felix Lange | 2017-02-28 | 5 | -17/+19 |
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/math: optimize PaddedBigBytes, use it more name old time/op new time/op delta PaddedBigBytes-8 71.1ns ± 5% 46.1ns ± 1% -35.15% (p=0.000 n=20+19) name old alloc/op new alloc/op delta PaddedBigBytes-8 48.0B ± 0% 32.0B ± 0% -33.33% (p=0.000 n=20+20) * all: unify big.Int zero checks Various checks were in use. This commit replaces them all with Int.Sign, which is cheaper and less code. eg templates: func before(x *big.Int) bool { return x.BitLen() == 0 } func after(x *big.Int) bool { return x.Sign() == 0 } func before(x *big.Int) bool { return x.BitLen() > 0 } func after(x *big.Int) bool { return x.Sign() != 0 } func before(x *big.Int) int { return x.Cmp(common.Big0) } func after(x *big.Int) int { return x.Sign() } * common/math, crypto/secp256k1: make ReadBits public in package math | ||||
* | core, core/vm, cmd/disasm: unify procedures for disassembling evm code (#3530) | Valentin Wüstholz | 2017-02-27 | 2 | -98/+0 |
| |