Marius van der Wijden
b482423e61
trie: reduce allocs in insertPreimage ( #21261 )
4 years ago
gary rong
93142e50c3
eth: don't block if transaction broadcast loop fails ( #21255 )
...
* eth: don't block if transaction broadcast loop is returned
* eth: kick out peer if we failed to send message
* eth: address comment
4 years ago
Felix Lange
23f1a0b783
crypto/secp256k1: enable 128-bit int code and endomorphism optimization ( #21203 )
...
* crypto/secp256k1: enable use of __int128
This speeds up scalar & field calculations a lot.
* crypto/secp256k1: enable endomorphism optimization
4 years ago
Felix Lange
da180ba097
cmd/devp2p: add commands for node key management ( #21202 )
...
These commands mirror the key/URL generation functions of cmd/bootnode.
$ devp2p key generate mynode.key
$ devp2p key to-enode mynode.key -ip 203.0.113.21 -tcp 30304
enode://78a7746089baf4b8615f54a5f0b67b22b1...
4 years ago
Péter Szilágyi
c42d1390d3
Merge pull request #21256 from karalabe/p2p-packet-metrics
...
p2p: measure packet throughput too, not just bandwidth
4 years ago
Péter Szilágyi
42ccb2fdbd
p2p: measure packet throughput too, not just bandwidth
4 years ago
ucwong
dce533c246
whisper: fix time.sleep by time.ticker in whisper_test ( #21251 )
4 years ago
Guillaume Ballet
9a188c975d
common/fdlimit: build on DragonflyBSD ( #21241 )
...
* common/fdlimit: build on DragonflyBSD
* review feedback
4 years ago
AusIV
3ebfeb09fe
core/rawdb: fix high memory usage in freezer ( #21243 )
...
The ancients variable in the freezer is a list of hashes, which
identifies all of the hashes to be frozen. The slice is being allocated
with a capacity of `limit`, which is the number of the last block
this batch will attempt to add to the freezer. That means we are
allocating memory for all of the blocks in the freezer, not just
the ones to be added.
If instead we allocate `limit - f.frozen`, we will only allocate
enough space for the blocks we're about to add to the freezer. On
mainnet this reduces usage by about 320 MB.
4 years ago
ucwong
5435e0d1a1
whisper : use timer.Ticker instead of sleep ( #21240 )
...
* whisper : use timer.Ticker instead of sleep
* lint: Fix linter error
Co-authored-by: Guillaume Ballet <gballet@gmail.com>
4 years ago
ucwong
e029cc6616
go.mod: update snappy dependency ( #21237 )
4 years ago
gary rong
56a319b9da
cmd, eth, internal, les: add txfee cap ( #21212 )
...
* cmd, eth, internal, les: add gasprice cap
* cmd/utils, eth: add default value for gasprice cap
* all: use txfee cap
* cmd, eth: add fix
* cmd, internal: address comments
4 years ago
zhangsoledad
bcf19bc4be
core/rawdb: swap tailId and itemOffset for deleted items in freezer ( #21220 )
...
* fix(freezer): tailId filenum offset were misplaced
* core/rawdb: assume first item in freezer always start from zero
4 years ago
Péter Szilágyi
eb9d7d15ec
Merge pull request #21170 from duanhao0814/fix-dup-ecrecover
...
core: filter out txs with invalid signatures as soon as possible
4 years ago
sixdays
a981b60c25
eth/downloader: don't use defer for unlock before return ( #21227 )
...
Co-authored-by: linjing <linjingjing@baidu.com>
4 years ago
HackyMiner
9371b2f70c
internal/web3ext: add missing params to debug.accountRange ( #21208 )
4 years ago
Martin Holst Swende
c85fdb76ee
go.mod: update uint256 to 1.1.0 ( #21206 )
4 years ago
Yang Hau
e30c0af861
build, internal/ethapi, crypto/bls12381: fix typos ( #21210 )
...
speicifc -> specific
assigened -> assigned
frobenious -> frobenius
4 years ago
gary rong
4a19c0e7b8
core, eth, internal: include read storage entries in structlog output ( #21204 )
...
* core, eth, internal: extend structLog tracer
* core/vm, internal: add storage view
* core, internal: add slots to storage directly
* core: remove useless
* core: address martin's comment
* core/vm: fix tests
4 years ago
Martin Holst Swende
e9ba536d85
eth/downloader: fix spuriously failing tests ( #21149 )
...
* eth/downloader tests: fix spurious failing test due to race between receipts/headers
* miner tests: fix travis failure on arm64
* eth/downloader: tests - store td in ancients too
4 years ago
Natsu Kagami
89043cba75
accounts/abi: make GetType public again ( #21157 )
4 years ago
Pau
d5c267fd30
accounts/keystore: fix typo in error message ( #21200 )
4 years ago
Péter Szilágyi
a0797e37f8
Merge pull request #21192 from karalabe/fix-escape-analysis
...
core/state: avoid escape analysis fault when accessing cached state
5 years ago
Péter Szilágyi
80e887d7bf
core/state: avoid escape analysis fault when accessing cached state
5 years ago
Paweł Bylica
cf6674539c
core/vm: use uint256 in EVM implementation ( #20787 )
...
* core/vm: use fixed uint256 library instead of big
* core/vm: remove intpools
* core/vm: upgrade uint256, fixes uint256.NewFromBig
* core/vm: use uint256.Int by value in Stack
* core/vm: upgrade uint256 to v1.0.0
* core/vm: don't preallocate space for 1024 stack items (only 16)
Co-authored-by: Martin Holst Swende <martin@swende.se>
5 years ago
ucwong
39abd92ca8
ethstats: use timer instead of time.sleep ( #20924 )
5 years ago
libby kent
45b7535137
cmd/ethkey: support --passwordfile in generate command ( #21183 )
5 years ago
Felix Lange
da06519347
params: begin v1.9.16 release cycle
5 years ago
Felix Lange
0f77f34bb6
params: go-ethereum v1.9.15 stable
5 years ago
Péter Szilágyi
651233454e
Merge pull request #21188 from karalabe/cht-1.9.15
...
params: update CHTs for 1.9.15 release
5 years ago
Péter Szilágyi
a5c827af86
params: update CHTs for 1.9.15 release
5 years ago
Marius van der Wijden
0b3f3be2b5
internal/ethapi: return revert reason for eth_call ( #21083 )
...
* internal/ethapi: return revert reason for eth_call
* internal/ethapi: moved revert reason logic to doCall
* accounts/abi/bind/backends: added revert reason logic to simulated backend
* internal/ethapi: fixed linting error
* internal/ethapi: check if require reason can be unpacked
* internal/ethapi: better error logic
* internal/ethapi: simplify logic
* internal/ethapi: return vmError()
* internal/ethapi: move handling of revert out of docall
* graphql: removed revert logic until spec change
* rpc: internal/ethapi: added custom error types
* graphql: use returndata instead of return
Return() checks if there is an error. If an error is found, we return nil.
For most use cases it can be beneficial to return the output even if there
was an error. This code should be changed anyway once the spec supports
error reasons in graphql responses
* accounts/abi/bind/backends: added tests for revert reason
* internal/ethapi: add errorCode to revert error
* internal/ethapi: add errorCode of 3 to revertError
* internal/ethapi: unified estimateGasErrors, simplified logic
* internal/ethapi: unified handling of errors in DoEstimateGas
* rpc: print error data field
* accounts/abi/bind/backends: unify simulatedBackend and RPC
* internal/ethapi: added binary data to revertError data
* internal/ethapi: refactored unpacking logic into newRevertError
* accounts/abi/bind/backends: fix EstimateGas
* accounts, console, internal, rpc: minor error interface cleanups
* Revert "accounts, console, internal, rpc: minor error interface cleanups"
This reverts commit 2d3ef53c53
.
* re-apply the good parts of 2d3ef53c53
* rpc: add test for returning server error data from client
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
5 years ago
Ev
88125d8bd0
core: fix typo in comments ( #21181 )
5 years ago
Marius van der Wijden
55f30db0ae
core/vm, crypt/bls12381: fixed comments in bls ( #21182 )
...
* core/vm: crypto/bls12381: minor code comments
* crypto/bls12381: fix comment
5 years ago
Mariano Cortesi
9d93535674
node: missing comma on toml tags ( #21187 )
5 years ago
ucwong
4b2ff1457a
go.mod: upgrade go-duktape to hide unused function warning ( #21168 )
5 years ago
Péter Szilágyi
cefa2ab1bd
Merge pull request #21173 from karalabe/faucet-delete-oldaccs
...
cmd/faucet: delete old keystore when importing new faucet key
5 years ago
Péter Szilágyi
b1b75f0089
accounts/keystore, cmd/faucet: return old account to allow unlock
5 years ago
Péter Szilágyi
201e345c65
Merge pull request #21172 from karalabe/faucet-twitter-mobile
...
acounts/keystore, cmd/faucet: fix faucet double import, fix twitter url
5 years ago
Péter Szilágyi
469b8739eb
acounts/keystore, cmd/faucet: fix faucet double import, fix twitter url
5 years ago
Hao Duan
8523ad450d
core: filter out txs with invalid signatures as soon as possible
...
Once we detect an invalid transaction during recovering signatures, we should
directly exclude this transaction to avoid validating the signatures hereafter.
This should optimize the validations times of transactions with invalid signatures
to only one time.
5 years ago
Péter Szilágyi
8b83125739
Merge pull request #21162 from karalabe/daofork-order-check-fix
...
cmd/geth: fix the fork orders for DAO tests
5 years ago
Péter Szilágyi
f52ff0f1e9
cmd/geth: fix the fork orders for DAO tests
5 years ago
Martin Holst Swende
890757f03a
cmd, core, params: inital support for yolo-v1 testnet ( #21154 )
...
* core,params,puppeth: inital support for yolo-v1 testnet
* cmd/geth, core: add yolov1 console flag
* cmd, core, params: YoloV1 bakein fixups
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
5 years ago
kilic
4fc678542d
core/vm, crypto/bls12381, params: add bls12-381 elliptic curve precompiles ( #21018 )
...
* crypto: add bls12-381 elliptic curve wrapper
* params: add bls12-381 precompile gas parameters
* core/vm: add bls12-381 precompiles
* core/vm: add bls12-381 precompile tests
* go.mod, go.sum: use latest bls12381 lib
* core/vm: move point encode/decode functions to base library
* crypto/bls12381: introduce bls12-381 library init function
* crypto/bls12381: import bls12381 elliptic curve implementation
* go.mod, go.sum: remove bls12-381 library
* remove unsued frobenious coeffs
supress warning for inp that used in asm
* add mappings tests for zero inputs
fix swu g2 minus z inverse constant
* crypto/bls12381: fix typo
* crypto/bls12381: better comments for bls12381 constants
* crypto/bls12381: swu, use single conditional for e2
* crypto/bls12381: utils, delete empty line
* crypto/bls12381: utils, use FromHex for string to big
* crypto/bls12381: g1, g2, strict length check for FromBytes
* crypto/bls12381: field_element, comparision changes
* crypto/bls12381: change swu, isogeny constants with hex values
* core/vm: fix point multiplication comments
* core/vm: fix multiexp gas calculation and lookup for g1 and g2
* core/vm: simpler imput length check for multiexp and pairing precompiles
* core/vm: rm empty multiexp result declarations
* crypto/bls12381: remove modulus type definition
* crypto/bls12381: use proper init function
* crypto/bls12381: get rid of new lines at fatal desciprtions
* crypto/bls12-381: fix no-adx assembly multiplication
* crypto/bls12-381: remove old config function
* crypto/bls12381: update multiplication backend
this commit changes mul backend to 6limb eip1962 backend
mul assign operations are dropped
* core/vm/contracts_tests: externalize test vectors for precompiles
* core/vm/contracts_test: externalize failure-cases for precompiles
* core/vm: linting
* go.mod: tiny up sum file
* core/vm: fix goimports linter issues
* crypto/bls12381: build tags for plain ASM or ADX implementation
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
5 years ago
chenglin
3f649d4852
core: collect NewTxsEvent items without holding reorg lock ( #21145 )
5 years ago
Guillaume Ballet
5f6f5e345e
console: handle undefined + null in console funcs ( #21160 )
5 years ago
Felix Lange
d98c42c0e3
rpc: send websocket ping when connection is idle ( #21142 )
...
* rpc: send websocket ping when connection is idle
* rpc: use non-blocking send for websocket pingReset
5 years ago
Felix Lange
723bd8c17f
p2p/discover: move discv4 encoding to new 'v4wire' package ( #21147 )
...
This moves all v4 protocol definitions to a new package, p2p/discover/v4wire.
The new package will be used for low-level protocol tests.
5 years ago
Greg Colvin
cd57d5cd38
core/vm: EIP-2315, JUMPSUB for the EVM ( #20619 )
...
* core/vm: implement EIP 2315, subroutines for the EVM
* core/vm: eip 2315 - lintfix + check jump dest validity + check ret stack size constraints
logger: markdown-friendly traces, validate jumpdest, more testcase, correct opcodes
* core/vm: update subroutines acc to eip: disallow walk-into
* core/vm/eips: gas cost changes for subroutines
* core/vm: update opcodes for EIP-2315
* core/vm: define RETURNSUB as a 'jumping' operation + review concerns
Co-authored-by: Martin Holst Swende <martin@swende.se>
5 years ago