aboutsummaryrefslogtreecommitdiffstats
path: root/common/bytes.go
Commit message (Collapse)AuthorAgeFilesLines
* EIP-1186 eth_getProof (#17737)Simon Jentzsch2018-10-191-0/+9
| | | | | | | | | | | | | | | | * 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
* all: simplify s[:] to s where s is a slice (#17673)Emil2018-09-151-1/+1
|
* common: improve documentation comments (#16701)kiel barry2018-05-291-5/+15
| | | | | This commit adds many comments and removes unused code. It also removes the EmptyHash function, which had some uses but was silly.
* common: changed if-else blocks to conform with golint (#16656)GagziW2018-05-071-8/+6
|
* common: improve IsHexAddress and add tests (#15551)Steven Roose2017-12-051-9/+17
| | | | | Also unexport isHex, hasHexPrefix because IsHexAddress is the only caller. Fixes #15550
* common: fix hex utils to handle 1 byte address conversionsPéter Szilágyi2017-11-291-5/+4
|
* core: implement Metropolis EIP 658, receipt status byterjl4934564422017-08-221-0/+3
|
* common: fixed byte padding functionsJeffrey Wilcke2017-05-231-3/+3
| | | | | | | Byte padding function should return the given slice if the length is smaller or equal rather than *only* smaller than. This fix improves almost all EVM push operations.
* common: move big integer math to common/math (#3699)Felix Lange2017-02-271-155/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: gofmt -w -sFelix Lange2017-01-061-1/+1
|
* internal/ethapi: add personal_sign and fix eth_sign to hash message (#2940)bas-vk2016-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | 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.
* common: Remove dead codeRicardo Catalinas Jiménez2016-02-221-16/+0
|
* common: Remove empty linesRicardo Catalinas Jiménez2016-02-221-2/+0
|
* 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: add some godoc synopsis commentsFelix Lange2015-07-071-0/+1
|
* all: update license informationFelix Lange2015-07-071-0/+16
|
* common: delete BinaryLengthFelix Lange2015-04-221-11/+0
| | | | | The test is failing the 32bit build and the function is not used anywhere.
* NatSpec contracts in genesis block, end to end test (unfinished)zsfelfoldi2015-04-201-0/+17
|
* Detect non-valid strings for blockheightTaylor Gerring2015-04-021-0/+5
|
* Move ToHex/FromHex into bytesTaylor Gerring2015-03-221-0/+22
|
* new type + additional methodsobscuren2015-03-161-1/+1
|
* Moved ethutil => commonobscuren2015-03-161-0/+234