aboutsummaryrefslogtreecommitdiffstats
path: root/core/types/transaction.go
Commit message (Collapse)AuthorAgeFilesLines
* core: add global signature cache and improve concurrency (#42)Wei-Ning Huang2019-06-121-36/+0
| | | | | From the go trace result, the bottleneck hides in the lock of StoreTxCache. To improve this, we update the cache in a batched fassion.
* core, dex: Batch process touchSender. Lower priority for tx. (#41)Jimmy Hu2019-06-121-13/+19
| | | | | | | * dex: Add a tx queue in broadcast * Modify queue parameter * Priority select all messages except tx * Batch process TouchSenders
* core, dex: Optimize sender calculation in block transactions. (#22)Jimmy Hu2019-06-121-0/+30
| | | | | | * Add Transactions.TouchSenders that calculates sender and update cache * Use TouchSenders to fill the caches
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-06-121-4/+4
|
* core/types: update incorrect commentJeremy Schlatter2018-12-291-1/+1
|
* core/types: make tx signature values optional in JSON (#17742)reinerRubin2018-09-301-9/+14
|
* core/types: fix docs about protected Vs (#17436)Aditya2018-08-201-1/+1
|
* core/types: polish TxDifference code and docs a bit (#17130)Smilenator2018-07-091-3/+3
| | | | | | | | | * core: fix func TxDifference fix a typo in func comment; change named return to unnamed as there's explicit return in the body * fix another typo in TxDifference
* core: remove dead code, limit test code scope (#17006)Wenbiao Zheng2018-06-191-9/+0
| | | | | | * core: move test util var/func to test file * core: remove useless func
* core/types: avoid duplicating transactions on changing signer (#16435)kimmylin2018-04-241-1/+4
|
* build: enable goimports and varcheck linters (#16446)thomasmodeneis2018-04-181-1/+0
|
* core/types: remove String methods from struct types (#16205)Steven Roose2018-04-051-53/+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/+2
| | | 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-23/+22
|
* core: fix typos (#15720)Kurkó Mihály2017-12-211-11/+11
|
* core/types: fix typo in comment (#15619)Airead2017-12-071-1/+1
|
* ethclient, mobile: add TransactionSender (#15127)Felix Lange2017-10-011-7/+7
| | | | | | | | | | | | | | | | | * core/types: make Signer derive address instead of public key There are two reasons to do this now: The upcoming ethclient signer doesn't know the public key, just the address. EIP 208 will introduce a new signer which derives the 'entry point' address for transactions with zero signature. The entry point has no public key. Other changes to the interface ease the path make to moving signature crypto out of core/types later. * ethclient, mobile: add TransactionSender The new method can get the right signer without any crypto, and without knowledge of the signature scheme that was used when the transaction was included.
* core/types, miner: avoid tx sender miscaching (#14773)Mark2017-09-081-10/+12
|
* core/types: fix create indicator in Transaction.String (#15025)nkbai2017-08-241-1/+1
|
* core, core/types: regenerate JSON marshaling, add "hash" to headers (#13868)Felix Lange2017-04-061-10/+10
| | | | | | | | | | * 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/types: rename txdata.gasLimit -> txdata.gas in JSON (#13848)bas-vk2017-03-291-1/+1
|
* core/types: ensure all EIP155 signer fields are set by deriveSignerFelix Lange2017-03-251-1/+1
| | | | Fixes #3819
* core: refactor genesis handlingFelix Lange2017-03-231-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* core/types: use gencodec for JSON marshaling codeFelix Lange2017-03-071-72/+39
|
* all: unify big.Int zero checks, use common/math in more places (#3716)Felix Lange2017-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/types: make Transaction zero value printable (#3595)Felix Lange2017-01-241-14/+18
|
* types: bugfix invalid V derivation on tx json unmarshal (#3594)bas-vk2017-01-211-1/+2
|
* core/types: remove redundant SignECDSA wrappers, rename to SignTxFelix Lange2017-01-051-9/+0
|
* accounts, core, crypto, internal: use normalised V during signature handling ↵Péter Szilágyi2017-01-051-47/+2
| | | | | | | | | (#3455) To address increasing complexity in code that handles signatures, this PR discards all notion of "different" signature types at the library level. Both the crypto and accounts package is reduced to only be able to produce plain canonical secp256k1 signatures. This makes the crpyto APIs much cleaner, simpler and harder to abuse.
* core/types: Document Transaction.To (#3366)Steven Roose2016-11-291-0/+2
|
* core/types: use package hexutil for JSON handlingFelix Lange2016-11-281-16/+17
|
* core/types: turn off nonce checking for Call messagesZsolt Felfoldi2016-11-141-15/+18
|
* core/types, params: EIP#155Jeffrey Wilcke2016-11-131-102/+158
|
* internal/ethapi: add personal_sign and fix eth_sign to hash message (#2940)bas-vk2016-10-291-2/+4
| | | | | | | | | | | | | | | | | | | | This commit includes several API changes: - The behavior of eth_sign is changed. It now accepts an arbitrary message, prepends the well-known string \x19Ethereum Signed Message:\n<length of message> hashes the result using keccak256 and calculates the signature of the hash. This breaks backwards compatability! - personal_sign(hash, address [, password]) is added. It has the same semantics as eth_sign but also accepts a password. The private key used to sign the hash is temporarily unlocked in the scope of the request. - personal_recover(message, signature) is added and returns the address for the account that created a signature.
* core/types: add core type marshal methods tooPéter Szilágyi2016-09-081-0/+18
|
* core/types, miner: switch over to the grouped tx setsPéter Szilágyi2016-09-021-31/+48
|
* core, eth, internal, miner: optimize txpool for quick opsPéter Szilágyi2016-09-021-18/+9
|
* core/types, core/vm: improve docs, add JSON marshaling methodsFelix Lange2016-08-041-4/+61
| | | | | | | | 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.
* core: added CheckNonce() to Message interfacezsfelfoldi2016-07-111-0/+1
|
* core: various typosLeif Jurvetson2016-03-161-2/+2
|
* all: Rename crypto.Sha3{,Hash}() to crypto.Keccak256{,Hash}()Ricardo Catalinas Jiménez2016-02-221-1/+1
| | | | As we aren't really using the standarized SHA-3
* core, core/vm, crypto: fixes for homesteadJeffrey Wilcke2016-02-181-1/+22
| | | | | | * Removed some strange code that didn't apply state reverting properly * Refactored code setting from vm & state transition to the executioner * Updated tests
* parmas, crypto, core, core/vm: homestead consensus protocol changesGustav Simonsson2016-02-181-3/+18
| | | | | | | | * change gas cost for contract creating txs * invalidate signature with s value greater than secp256k1 N / 2 * OOG contract creation if not enough gas to store code * new difficulty adjustment algorithm * new DELEGATECALL op code
* core, core/types, miner: fix transaction nonce-price combo sortPéter Szilágyi2016-01-221-16/+69
|
* core, core/types: readd transactions after chain re-orgJeffrey Wilcke2015-09-221-1/+23
| | | | | | | | | | | | | | 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
* core, core/vm, core/state: remove unused functionsGustav Simonsson2015-09-111-4/+0
|
* miner, core: sort txs by price, nonceJeffrey Wilcke2015-08-051-0/+19
|
* improved error detection and handling for NewTransactionFromBytesBas van Kervel2015-07-291-9/+0
| | | | integrated review comments
* all: fix license headers one more timeFelix Lange2015-07-241-1/+1
| | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
* 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".
* all: update license informationFelix Lange2015-07-071-0/+16
|
* core, miner: removed vm errors from consensus err checkingJeffrey Wilcke2015-07-061-1/+3
| | | | | Removed VM errors from the consensus errors. They now used for output only.
* core/types, xeth: separate tx hash and tx signature hashFelix Lange2015-07-061-5/+13
|
* core/types: cache computed transaction valuesFelix Lange2015-06-301-5/+28
|
* core/types: make transactions immutableFelix Lange2015-06-301-119/+127
|
* core/types: add Transaction.SizeFelix Lange2015-06-091-0/+7
|
* Add EC signature validations before call to libsecp256k1Gustav Simonsson2015-06-021-16/+15
|
* core/types: add rlp tag "nil" for Transaction.RecipientFelix Lange2015-04-171-1/+1
|
* Use logger.Error instead of 0 with glogGustav Simonsson2015-04-071-1/+2
|
* Forward and log EC recover err and remove dup pubkey len checkGustav Simonsson2015-04-071-1/+7
|
* Changed R S to big int and fixed testsobscuren2015-04-051-2/+18
|
* Changed R & S to *big.Intobscuren2015-04-051-6/+6
|
* added tx tests and fixed block testsobscuren2015-03-261-2/+4
|
* Fixed incorrect recipient derivedobscuren2015-03-211-1/+1
|
* core/types: use package rlp instead of common.DecodeFelix Lange2015-03-181-29/+26
|
* core/types: don't use Address zero value for invalid addressesFelix Lange2015-03-171-25/+34
|
* core/types: fix Transaction.Hash and add support for encoding with package rlpFelix Lange2015-03-171-6/+19
|
* core/types: use common.{Hash,Address} in for transactionsFelix Lange2015-03-171-65/+24
|
* Moved ethutil => commonobscuren2015-03-161-9/+9
|
* Changed V to byte. Closes #456obscuren2015-03-121-4/+4
|
* Integrate eth_accounts and eth_transact to use new account managerGustav Simonsson2015-03-061-0/+8
| | | | | | | * Add from to eth_transact / xeth.Transact and add static pass in lieu of integrating with native Mist window for user passphrase entry * Make eth_accounts return AccountManager.Accounts() * Add a Generate Key menu item in Mist
* Moved `obscuren` secp256k1-goobscuren2015-01-221-1/+1
|
* Refactored tx pool and added extra fields to blockobscuren2015-01-021-0/+5
| | | | | | * 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
* Chain importerobscuren2014-12-231-14/+14
|
* Refactored block & Transactionobscuren2014-12-231-62/+59
| | | | * Includes new rlp decoder
* Merge branch 'develop' into poc8obscuren2014-12-201-9/+10
|\ | | | | | | | | Conflicts: cmd/ethereum/flags.go
| * Transaction was generating incorrect hash because of var changesobscuren2014-12-191-9/+10
| |
* | Merge branch 'badsig' of https://github.com/ebuchman/go-ethereum into ↵obscuren2014-12-191-4/+4
|/ | | | | | | ebuchman-badsig Conflicts: core/transaction_pool.go
* Gas corrections and vm fixesobscuren2014-12-191-9/+0
|
* Moved methods to messagesobscuren2014-12-181-21/+2
|
* Created generic message (easy for testing)obscuren2014-12-181-31/+57
|
* Renamed State => StateDBobscuren2014-12-041-1/+1
|
* Renamed `chain` => `core`obscuren2014-12-041-0/+225