JukLee0ira
2d89951e5b
all: use errrors.New instead of empty fmt.Errorf
2024-06-14 19:19:21 +08:00
JukLee0ira
15bbb5d3d5
XDCx,core,XDCxlending,miner: reduce duplicate calls
2024-06-06 19:33:59 +08:00
JukLee0ira
9ffacc595d
core: simplify code expression
2024-06-06 19:33:59 +08:00
JukLee0ira
0aab4ced98
common: add binary variables for system contract
2024-06-06 19:33:59 +08:00
JukLee0ira
21c62f9ef0
XDCx,XDCxlending,consensus,core: not compare adresss by String
2024-06-06 19:33:39 +08:00
Daniel Liu
fd8811cc9e
core, backends: rename callmsg to callMsg
2024-05-14 23:27:23 +08:00
Daniel Liu
e82bef5b87
core/types: remove duplication in eip2930 signer ( #27860 )
2024-05-14 23:27:23 +08:00
Daniel Liu
7a95b4f907
core, eth, internal/ethapi: create access list RPC API ( #22550 )
2024-05-14 23:27:23 +08:00
Daniel Liu
5cb014b60f
core, eth/tracer: initialize tracer statedb in CaptureStart ( #22333 )
2024-05-14 23:27:23 +08:00
Derek Chiang
5edfd8f9eb
core: fix method comment for txpool.requestReset ( #22543 )
2024-05-14 23:27:23 +08:00
Daniel Liu
349dc1bacd
core/types: improve comments in new EIP-2718 code ( #22402 )
2024-05-14 23:15:35 +08:00
Daniel Liu
0ccf119cd7
core/types: reduce allocations in GasPriceCmp ( #22456 )
2024-05-14 23:15:35 +08:00
Daniel Liu
01e1728a94
all: add support for EIP-2718, EIP-2930 transactions ( #21502 )
2024-05-14 23:15:35 +08:00
Marius van der Wijden
76b29b2f25
core: reset txpool state on sethead ( #22247 )
...
fixes an issue where local transactions that were included in the chain before a SetHead were rejected if resubmitted, since the txpool had not reset the state to the current (older) state.
2024-05-14 11:44:26 +08:00
gary rong
289304f876
core/txpool: remove "local" notion from the txpool price heap ( #21478 )
...
* core: separate the local notion from the pricedHeap
* core: add benchmarks
* core: improve tests
* core: address comments
* core: degrade the panic to error message
* core: fix typo
* core: address comments
* core: address comment
* core: use PEAK instead of POP
* core: address comments
2024-05-14 11:08:53 +08:00
Martin Holst Swende
a6d591b01b
core: fix txpool off-by-one error ( #21683 )
2024-05-14 10:09:43 +08:00
Marius van der Wijden
6935687790
core: more detailed metering for reorgs ( #21420 )
2024-05-13 22:07:04 +08:00
Hao Duan
28baf9f1fd
core: avoid modification of accountSet cache in tx_pool ( #21159 )
...
* core: avoid modification of accountSet cache in tx_pool
when runReorg, we may copy the dirtyAccounts' accountSet cache to promoteAddrs
in which accounts will be promoted, however, if we have reset request at the
same time, we may reuse promoteAddrs and modify the cache content which is
against the original intention of accountSet cache. So, we need to make a new
slice here to avoid modify accountSet cache.
* core: fix flatten condition + comment
Co-authored-by: Felix Lange <fjl@twurst.com>
2024-05-13 22:07:04 +08:00
Daniel Liu
b9f373fb57
core: fix queued transaction eviction #21300
2024-05-13 22:07:04 +08:00
Martin Holst Swende
ff246355a2
core: transaction pool optimizations ( #21328 )
...
* core: added local tx pool test case
* core, crypto: various allocation savings regarding tx handling
* core/txlist, txpool: save a reheap operation, avoid some bigint allocs
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2024-05-13 22:07:03 +08:00
Daniel Liu
48f9bbed50
core: types: less allocations when hashing and tx handling ( #21265 )
2024-05-13 22:07:03 +08:00
Hao Duan
1776bf1313
core: filter out txs with invalid signatures as soon as possible ( #21170 )
...
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.
2024-05-13 22:07:03 +08:00
chenglin
cf41742040
core: collect NewTxsEvent items without holding reorg lock ( #21145 )
2024-05-13 22:07:03 +08:00
Daniel Liu
624371433e
core: fix typos in comments ( #21118 )
2024-05-13 22:07:03 +08:00
Daniel Liu
7179efd4da
core: announce based transaction propagation ( #20234 )
2024-05-13 22:07:03 +08:00
Martin Holst Swende
d972bbd681
core: set max tx size down to 2 slots (64KB)
2024-05-13 22:07:03 +08:00
Daniel Liu
b7f4362c57
core: count tx size in slots, bump max size ot 4x32KB ( #20352 )
2024-05-13 22:07:03 +08:00
Péter Szilágyi
d1415837cf
core: fix tx dedup return error count ( #20085 )
2024-05-13 22:07:03 +08:00
Daniel Liu
bef2c34e44
core: dedup known transactions without global lock, track metrics ( #20081 )
2024-05-13 22:07:03 +08:00
Martin Holst Swende
656f2a6167
core: smaller txpool status locking ( #20080 )
...
* txpool: smaller lock portion
* core/tx_pool: fix data race
2024-05-13 22:07:03 +08:00
Daniel Liu
19fb6103c0
fix: rename func AddRemoteSync to addRemoteSync
2024-05-13 22:07:03 +08:00
Daniel Liu
7cce425000
Revert "core, light, params: implement eip2028 ( #19931 )"
...
This reverts commit 67825d860b .
2024-05-11 06:11:46 +08:00
Daniel Liu
742a7f9348
core, metrics: switch some invalid counters to gauges ( #20047 )
2024-05-10 19:48:10 +08:00
Daniel Liu
67825d860b
core, light, params: implement eip2028 ( #19931 )
2024-05-10 19:48:10 +08:00
Daniel Liu
b708614470
core, les: fix les unit tests ( #19823 )
2024-05-10 19:48:10 +08:00
Daniel Liu
edaed4fd92
core: fix write concurrency in txpool ( #19835 )
2024-05-10 19:48:10 +08:00
Daniel Liu
6338a4195b
core: kill off managed state, use own tiny noncer for txpool ( #19810 )
2024-05-10 19:48:10 +08:00
Daniel Liu
74c72363d0
core: move TxPool reorg and events to background goroutine ( #19705 )
2024-05-10 19:48:10 +08:00
Daniel Liu
ddbf5d2782
core: expose various counter metrics for grafana ( #19692 )
2024-05-10 19:48:10 +08:00
Daniel Liu
65baaaaf80
core: cache tx signature before obtaining lock ( #19351 )
2024-05-10 19:48:10 +08:00
Daniel Liu
c5b22fbc32
core: make txpool handle reorg due to setHead ( #19308 )
2024-05-09 19:00:41 +08:00
Daniel Liu
676c4e8ec7
core: sanitize more TxPoolConfig fields ( #17210 )
2024-05-09 18:39:32 +08:00
Daniel Liu
6b87c07876
core: fix comment typo ( #18144 )
2024-05-09 18:38:27 +08:00
Daniel Liu
a6664651c7
core: fix a typo ( #17733 )
2024-05-09 18:38:27 +08:00
Daniel Liu
ec50ca36d9
core, eth, trie: use common/prque ( #17508 )
2024-05-09 18:38:27 +08:00
Daniel Liu
6c657ef6af
core: priority mining ( #17472 )
2024-05-09 18:38:27 +08:00
Daniel Liu
41b29a8cf8
Fixed typo addresssByHeartbeat -> addressesByHeartbeat ( #17243 )
2024-05-09 18:38:27 +08:00
Daniel Liu
241201cf0e
core: fixed typo ( #17214 )
2024-05-09 18:38:27 +08:00
Daniel Liu
5b883dee30
core/tx_pool: reduce judgement levels ( #16980 )
2024-05-09 18:38:27 +08:00
Daniel Liu
859308c03f
core: change comment to match code more closely ( #16963 )
2024-05-09 18:38:27 +08:00
Daniel Liu
4f0f6e08c7
core: concurrent background transaction sender ecrecover ( #16882 )
2024-05-09 18:38:27 +08:00
Daniel Liu
fb89a5406b
core: fix transaction event asynchronicity ( #16843 )
2024-05-09 18:38:27 +08:00
Daniel Liu
88695caf8f
core: use a wrapped map w/ sync.RWMutex for TxPool.all to remove contention in TxPool.Get. ( #16670 )
2024-05-09 18:38:27 +08:00
Daniel Liu
2060ff7eeb
core: Ensure that local transactions aren't discarded as underpriced ( #16576 )
2024-05-09 18:38:27 +08:00
Daniel Liu
702e0caa29
core: txpool stable underprice drop order, perf fixes ( #16494 )
2024-05-09 18:38:23 +08:00
Wang Gerui
4178a97560
feat: extend eth_call api with state override;
...
extend statedb and state_object with necessary code
2024-04-30 15:57:42 +08:00
Daniel Liu
8568af05cc
all: implement EIP-2929 (gas cost increases for state access opcodes) ( #21509 )
2024-04-22 21:14:54 +08:00
Daniel Liu
3b9fc516f6
Merge pull request #524 from gzliudan/revert-pr320
...
Revert PR320
2024-04-22 21:04:44 +08:00
Wanwiset Peerapatanapokin
fb91c1e802
add trigger for disable XDCx precompiles ( #509 )
2024-04-22 11:43:22 +04:00
Daniel Liu
56d9a6e39c
core, filters: not set log.BlockHash
2024-04-20 16:27:21 +08:00
Liam
ef4b8ef91b
Disable on xdcx receiver part ( #521 )
...
* update all IsTIPXDCXReceiver condition
* add TIPXDCXReceiverDisable on testnet and devnet
2024-04-19 22:17:22 +08:00
Daniel Liu
50847c9724
types, core, miner: add block location fields to receipt
2024-04-12 13:36:55 +08:00
wgr523
b5358663fe
Merge pull request #497 from XinFinOrg/xdf-05
...
XDF-05 fix: Future Blocks Are Always Verified Instead Of Queued
2024-04-01 20:48:58 +08:00
Daniel Liu
1c9f1d8279
all: change TxPreEvent to TxsPreEvent ( #16720 )
2024-03-28 11:16:21 +08:00
Wanwiset Peerapatanapokin
06b280aa0d
add log deepcopy to ensure complete replica of state ( #449 )
...
implement "deep copy" as go-ethereum
2024-03-26 13:40:07 +04:00
Gary
6fd9a5305a
fix: Future Blocks Are Always Verified Instead Of Queued
2024-03-19 20:38:57 +08:00
Wanwiset Peerapatanapokin
8edb76f08d
Revert "core/state: abort commit if errors have occurred ( #484 )" ( #489 )
...
This reverts commit 0114ecabd0 .
2024-03-13 11:54:09 +04:00
Daniel Liu
4616d59935
internal/ethapi: support block number or hash on state-related methods ( #19491 )
...
* Support for EIP-1898.
2024-03-12 10:40:03 +08:00
Wanwiset Peerapatanapokin
0114ecabd0
core/state: abort commit if errors have occurred ( #484 )
2024-03-11 13:19:24 +04:00
Wanwiset Peerapatanapokin
910d415653
Missing json Field Tags in Marshalled Struct ( #475 )
2024-03-08 15:38:33 +04:00
Daniel Liu
6a2f753cee
Merge pull request #472 from XinFinOrg/eip3855
...
core/vm: implement EIP-3855: PUSH0 instruction.
2024-03-07 23:01:33 +08:00
geruiwang
863d4f14e3
eth/tracers/js: fix isPush for push0 ( #28520 )
...
Fixes so that `push0` opcode is correctly reported as `true` by the `IsPush` function
---------
Co-authored-by: Martin Holst Swende <martin@swende.se>
2024-03-07 22:31:19 +08:00
geruiwang
968440ce3d
core/vm: implement EIP-3855: PUSH0 instruction.
2024-03-07 21:44:37 +08:00
Wang Gerui
0e36b5be42
fix typo in EIPs
2024-03-07 21:37:33 +08:00
Wanwiset Peerapatanapokin
ae10d7090c
Rollback privacy ( #477 )
...
Rollback the previous test removal or privacy package on devnet.
This reverts commit 4f79e535b37dc85144e2d38c2f2570b0ce4305b2.
This reverts commit 5a2722c268ec4f03f3117b1af2dee2411af4b13a.
2024-03-07 10:40:55 +04:00
Daniel Liu
ece58f00b5
ethapi: add method eth_getAccountInfo
2024-03-06 14:11:15 +08:00
Daniel Liu
bbe08ac6e6
core/state: add function GetStorageRoot
2024-03-06 14:10:08 +08:00
Liam
38a192e672
Merge pull request #459 from XinFinOrg/eip4399
...
implement EIP-4399, PREVRANDAO opcode
2024-03-04 17:50:56 +11:00
Wanwiset Peerapatanapokin
b86c7f646f
Try remove privacy pkg ( #466 )
...
* try removing privacy pkg
* rm more reference
* trigger CI
2024-03-04 07:59:45 +04:00
Gerui Wang
a31489541d
implement EIP-4399, PREVRANDAO opcode.
...
and remove unused LondonBlock and BerlinBlock in `params/config.go` (already defined in constants.go)
2024-03-04 00:32:14 +08:00
Daniel Liu
928a0691ca
implement EIP-3198
2024-03-01 15:04:32 +08:00
lmittmann
b36678f7ad
core/vm: performance tweak of OpCode.String() ( #28453 )
...
make `opCodeToString` a `[256]string` array
Co-authored-by: lmittmann <lmittmann@users.noreply.github.com>
2024-03-01 14:13:24 +08:00
Leon
8b6db6d87a
core/vm: better handle error on eip activation check ( #25131 )
...
* core/vm: correct logic for eip check of NewEVMInterpreter
* refactor
2024-03-01 14:13:24 +08:00
Qian Bin
032b98e942
core/vm: optimize Memory.Set32 ( #24847 )
...
* core/vm: remove unnecessary memset for Memory.Set32
* core/vm: optimize Memory.Set32
2024-03-01 14:13:24 +08:00
s7v7nislands
62b62da730
core/vm: separate opcode group for 0x20 range ( #24850 )
2024-03-01 14:13:24 +08:00
s7v7nislands
ac35f0ecec
core/vm: clean up some dead functions ( #24851 )
2024-03-01 14:13:24 +08:00
Andrei Maiboroda
b022ba2c5d
core/vm: make INVALID a defined opcode ( #24017 )
...
* core/vm: Define 0xfe opcode as INVALID
* core/vm: Remove opInvalid as opUndefined handles it
Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
2024-03-01 14:13:24 +08:00
Paweł Bylica
6e92486296
core/vm: reverse bit order in bytes of code bitmap ( #24120 )
...
* core/vm: reverse bit order in bytes of code bitmap
This bit order is more natural for bit manipulation operations and we
can eliminate some small number of CPU instructions.
* core/vm: drop lookup table
2024-03-01 14:13:24 +08:00
Alex Beregszaszi
2ce30010bc
core/vm: remove unused code (IsStaticJump) ( #24085 )
2024-03-01 14:13:24 +08:00
Martin Holst Swende
fbc1cc11ba
core/vm: remove no-recursion option from config (24066)
2024-03-01 14:13:24 +08:00
Andrei Maiboroda
4c27910a77
core/vm: move interpreter interruption check to jump instructions ( #24026 )
...
* core/vm: Remove interpreter loop interruption check
* core/vm: Unit test for interpreter loop interruption
* core/vm: Check for interpreter loop abort on every jump
2024-03-01 14:13:24 +08:00
Paweł Bylica
7d3c783bb9
core/vm: fill gaps in jump table with opUndefined ( #24031 )
2024-03-01 14:13:24 +08:00
Alex Beregszaszi
ae267d3da7
core/vm: remove stack.pushN ( #24040 )
2024-03-01 14:13:24 +08:00
Alex Beregszaszi
b1c03864e6
core/vm: rename opSuicide to opSelfdestruct ( #24022 )
...
The opcode was renamed in the codebase in 2017, but the functions were kept unchanged.
2024-03-01 14:13:24 +08:00
Alex Beregszaszi
bfbb678309
core/vm: move interpreter.ReadOnly check into the opcode implementations ( #23970 )
...
* core/vm: Move interpreter.ReadOnly check into the opcode implementations
Also remove the same check from the interpreter inner loop.
* core/vm: Remove obsolete operation.writes flag
* core/vm: Capture fault states in logger
Co-authored-by: Martin Holst Swende <martin@swende.se>
* core/vm: Remove panic added for testing
Co-authored-by: Martin Holst Swende <martin@swende.se>
2024-03-01 14:13:24 +08:00
Andrei Maiboroda
002be52ae9
core/vm: don't copy JumpTable when no EIP mods are needed ( #23977 )
2024-03-01 14:13:24 +08:00
Alex Beregszaszi
c097e565fd
core/vm: rename SHA3 instruction to KECCAK256 ( #23976 )
...
This was proposed in 2016, Solidity uses this since 2017, and evmone and other VMs use the keccak256 name. This brings geth in line with those.
2024-03-01 14:13:24 +08:00
Paweł Bylica
823ec33484
core/vm: simplify error handling in interpreter loop ( #23952 )
...
* core/vm: break loop on any error
* core/vm: move ErrExecutionReverted to opRevert()
* core/vm: use "stop token" to stop the loop
* core/vm: unconditionally pc++ in the loop
* core/vm: set return data in instruction impls
2024-03-01 14:13:24 +08:00
Andrei Maiboroda
6415934da9
core/vm: simplify op lookup in contract ( #23974 )
2024-03-01 14:13:23 +08:00
Martin Holst Swende
f7c6b1abd4
core/vm, core/state/snapshot: remove unused code ( #23956 )
...
* core/state/snapshot: remove wiper functionality
* core/vm: remove unused 'unofficial' opcodes
2024-03-01 14:13:23 +08:00
Paweł Bylica
3d3cc6c6d7
core/vm: use proper JumpTable type ( #23967 )
2024-03-01 14:13:23 +08:00
Martin Holst Swende
f9e14af6fd
core/vm: don't use iota for opcode definitions ( #23928 )
2024-03-01 14:13:23 +08:00
Paweł Bylica
dc8cdf3e62
core/vm: rework jumpdest analysis benchmarks ( #23499 )
...
* core/vm: rework jumpdest analysis benchmarks
For BenchmarkJumpdestOpAnalysis use fixed code size of ~1.2MB
and classic benchmark loop.
* core/vm: clear bitvec in jumpdest analysis benchmark
2024-03-01 14:13:23 +08:00
Guillaume Ballet
f05fa009e2
core/vm: fix typo in comment ( #23450 )
2024-03-01 14:13:23 +08:00
Daniel Liu
7a55b9f788
core/state: remove unused methods ReturnGas ( #23092 )
2024-03-01 14:13:23 +08:00
Evgeny Danilenko
21bbe5f568
core/vm: avoid duplicate log in json logger ( #22825 )
2024-03-01 14:13:23 +08:00
aaronbuchwald
7c6908b959
core/vm: fix interpreter comments ( #22797 )
...
* Fix interpreter comment
* Fix comment
2024-03-01 14:13:23 +08:00
Paweł Bylica
9c8d228dda
core/vm: clean up contract creation error handling ( #22766 )
...
Do not keep separate flag for "max code size exceeded" case, but instead
assign appropriate error for it sooner.
2024-03-01 14:13:23 +08:00
aaronbuchwald
6077ecb195
core/vm: replace repeated string with variable in tests ( #22774 )
2024-03-01 14:13:23 +08:00
Martin Holst Swende
446b9e86f4
core/vm, params: make 2200 in line with spec ( #21605 )
2024-03-01 14:13:23 +08:00
Péter Szilágyi
06d5da016c
core/vm: use pointers to operations vs. copy by value ( #21336 )
2024-03-01 14:13:23 +08:00
Paweł Bylica
192edc0c63
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>
2024-03-01 14:13:23 +08:00
Daniel Liu
3f10de24b0
core/vm/privacy: fix test case in ringct_test.go ( #424 )
2024-02-19 10:52:33 +08:00
Liam
9eea134daa
Merge pull request #424 from gzliudan/RIN-07
...
check parameters not to be nil when call function curve.Add
2024-02-12 22:23:34 +11:00
Wanwiset Peerapatanapokin
b272e7418c
Fix curve ( #429 )
...
* update secp256k1 library from go-eth code
* cast deprecated functions to use new BitCurve type
* add IsOnCurve checks and tests
* add test outcome check
* fix test
2024-02-11 15:59:28 +04:00
Wanwiset Peerapatanapokin
30581274a1
RIN-08 RIN-10 RIN-11 Fix curve issues ( #425 )
...
* update secp256k1 library from go-eth code
* cast deprecated functions to use new BitCurve type
* add IsOnCurve checks and tests
* add test outcome check
2024-02-11 01:51:11 +04:00
Banana-J
f453ce8315
fix: missing validation in scalar range check ( #417 )
2024-02-09 19:56:27 +11:00
Daniel Liu
d440d1d2c6
not pass nil parameters to function curve.Add
2024-02-08 14:50:44 +08:00
Banana-J
ea7d5cc9ad
fix: remove unnecesasry int conversion in the bulletproof.go ( #419 )
...
Co-authored-by: wjrjerome <wjrjerome@babylonchain.io>
2024-02-06 22:13:28 +11:00
Liam
fea90a97df
RIN-02 Panic Due to Integer Overflow in Signature Size Calculation ( #401 )
...
* RIN-02 Panic Due to Integer Overflow in Signature Size Calculation
* assert the error
* simply overflow check
* simply overflow check
---------
Co-authored-by: Liam Lai <liam.lai@datameshgroup.com>
2024-02-03 10:02:14 +08:00
Banana-J
0664e9fc47
chore: remove the unused false return value from GetCollaterals method ( #410 )
2024-01-29 11:31:10 +11:00
Banana-J
d70c15667b
chore: remove the unused method in ringct.go ( #411 )
2024-01-29 11:31:02 +11:00
Banana-J
cac03bd960
fix: GenNewKeyRing should return out of bound error if s and ring size equal in value ( #412 )
2024-01-29 11:27:48 +11:00
Banana-J
743fc8500b
chore: return statement optimization ( #406 )
2024-01-28 16:58:41 +11:00
Banana-J
2504961a33
fix: replace all time.after with the time.newtimer ( #400 )
2024-01-27 21:01:24 +11:00
Daniel Liu
0d7dd867b7
Merge pull request #402 from gzliudan/XDP-02
...
remove key with empty value from map txs in function NewOrderTransactionByNonce
2024-01-26 10:34:33 +08:00
Daniel Liu
ffa38cd8d1
fix bug and eliminate loop in func PadTo32Bytes
2024-01-24 16:31:13 +08:00
Daniel Liu
e097f2b0df
remove key with empty value from map txs in func NewOrderTransactionByNonce
2024-01-24 13:45:50 +08:00
Wanwiset Peerapatanapokin
aaa246f60e
PDF-01 ( #397 )
...
* replace deprecated ioutil lib calls
* fix for FileInfo type required
* fix for ioutil.Discard
* fix .Discard
* fix for go-bindata generated files
2024-01-19 15:05:03 +04:00
Liam
81ff6421d0
fix Panic In ProcessOrderPending Leads To Chain Halt ( #392 )
...
Co-authored-by: Liam Lai <liamlai@Liams-Laptop.local>
2024-01-19 11:22:24 +11:00
Daniel Liu
ded4e0fd90
fix nil Error in func reportBlock ( #369 )
2023-12-05 20:29:19 +08:00
Liam
ac404683b3
Merge pull request #365 from XinFinOrg/bump-go-v2
...
Bump go v1.21
2023-11-21 23:44:14 +11:00
Liam
f7025cee2f
Merge pull request #346 from gzliudan/defer-time.Since
...
call to time.Since is not deferred
2023-11-21 23:22:58 +11:00
Liam
87ba815341
Merge pull request #336 from gzliudan/fix-func-procFutureBlocks
...
Fix a loop closure bug in func procFutureBlocks
2023-11-21 23:19:08 +11:00
Liam Lai
824d7b232f
resolve conflict
2023-11-20 23:53:49 +11:00
Liam
c215316744
Make masternode dynamic ( #356 )
...
* make masternode dynamic
* fix all the tests
* remove cmt
* fix test again
2023-11-16 23:59:19 +11:00
Liam
84994df759
Merge pull request #351 from XinFinOrg/bump-golang-1.21
...
Bump golang 1.21
2023-11-07 10:35:42 +11:00
Daniel Liu
cd9f4f8094
core: fix loop closure bug in func procFutureBlocks
2023-11-01 15:02:04 +08:00
Daniel Liu
349f71db7b
defer time.Since
2023-11-01 12:43:50 +08:00
Daniel Liu
f4154d0479
remove lendingstate.EmptyAddress
2023-10-24 12:27:03 +08:00
Daniel Liu
2c02ddc2d9
remove xdc0000000000000000000000000000000000000000
2023-10-24 12:15:30 +08:00
Daniel Liu
e2359d9b8c
filter zero address in function GetCandidates
2023-10-24 12:15:24 +08:00
Daniel Liu
320b358830
replace package sort with common/sort
2023-10-23 22:51:06 +08:00
Daniel Liu
7adb98fbe8
update gas fee
2023-10-16 11:24:47 +08:00
Daniel Liu
148e2f1699
add parameter number for function NewMessage
2023-10-16 11:24:47 +08:00
Daniel Liu
0e8b3f1d31
replace TRC21Cost with TxCost
2023-10-16 11:24:47 +08:00
Daniel Liu
9a7ffaa09f
change msg.gasPrice in function AsMessage
2023-10-16 11:24:47 +08:00
Daniel Liu
845d3d49e5
change minGasPrice in function validateTx
2023-10-16 11:24:47 +08:00
Daniel Liu
02158d06d9
core: fix blockHash for eth_getLogs, eth_getFilterLogs, eth_getTransactionReceipt ( #208 )
2023-08-31 15:26:26 +08:00
Liam Lai
5623ce8de0
merge from master
2023-07-30 16:50:45 +10:00
Wanwiset Peerapatanapokin
a959bea092
add standbynodes in GetMasternodesByNumber similar way to subnet
2023-07-21 10:07:05 +04:00
wgr523
d578e092cd
stop reorg at committed blocks ( #276 )
...
This PR makes committed blocks non-reorg-able inside `Blockchain` struct. This ensures V2 consensus safety property in the aspect of blockchain head: committed blocks' state will not be reorg and users will always see committed blocks (or their child blocks) as current head of the blockchain.
* stop reorg at committed blocks
* fix tests
* fix tests
2023-06-08 01:16:13 +08:00
wgr523
3e0505a0c7
cherry-pick from d8ada03eac ( #255 )
2023-05-25 14:23:27 +10:00
wgr523
cd74061ac2
Extend masternode candidate ( #261 )
...
* V2 truncate MaxMasternodes from candidates after penalty,
V1 same as before
TestUpdateMultipleMasterNodes: test V2, in snapshot we have all candidates, but at epoch switch, we pick MaxMasternodes
* code looks better
2023-05-16 21:43:56 +08:00
Liam
153f8d296d
Fix API penalty bug and add more info in api ( #262 )
...
* fix api bug
* remove cmd
2023-05-16 21:23:02 +10:00
Daniel Liu
fd6cbd5df1
fix nonce error for debug trace api ( #256 )
2023-05-06 09:50:25 +08:00
Liam
7b657f0c4e
API: getMasternode and getPoolStatus ( #258 )
...
* API: getMasternode and getPoolStatus
* fix test
2023-05-01 23:01:39 +10:00
Jerome
1430b74a98
Add more log info during updateM1 and change log level on devnet to 3 ( #223 )
2023-01-22 22:53:22 +11:00
Jerome
2ca1d0461d
Fix issue when resync is not getting the right consensus config values ( #221 )
...
* Fix issue when resync is not getting the right consensus config values
* add test and fix log bug
* fix test
* delete temp file
Co-authored-by: Liam Lai <liam.icheng.lai@gmail.com>
2023-01-17 21:34:42 +08:00
Liam
c4f9a552e5
Multi config bug fix ( #216 )
...
* refactor multi config
remove pool cleaner
correct message and log level
2022-12-17 20:23:46 +08:00
Liam
6ffbd3e141
Xin 259 support multi v2 config ( #210 )
...
* update timeout period and waittime
* remove wrong comment
* update config for preparing test
2022-12-06 20:08:56 +08:00
Daniel Liu
42379f530f
internal/ethapi: EstimateGas and Call handle revert error( #173 ) ( #200 )
...
hot fix for EstimateGas and Call handle revert error https://github.com/XinFinOrg/XDPoSChain/issues/173
2022-10-27 17:25:25 +08:00
Liam
dad7eff036
Xin 231 sync issues - too far messages should omit and skip to process ( #177 )
...
* omit too far v2 messages
* update error msg
* improve log
* fix test
* remove useless file
2022-09-05 10:38:45 +08:00
Jianrong
dfa1e7c098
make vote equivocation content's signer key lower case
2022-08-23 17:33:37 +08:00
Jerome
c710bd98a5
Xin-200 Vote Equivocation ( #111 ) ( #172 )
...
* Xin-200 Vote Equivocation (#111 )
* add vote same round detection
add test for vote same round detect
finish process equivocate (not finish report)
* finish vote equivocation report, refactor code (vote -> forensics)
* finish process equivocate and report, and test
* add return err
Co-authored-by: wgr523 <wgr523@gmail.com>
2022-08-13 11:50:56 +05:30
Liam
833f70bdb7
xin-203 fix wrong config hash and update v2 params on mainnet ( #109 )
...
* fix wrong config hash and update v2 params on mainnet
* update config and all the test
* hard code binary into code
* add default config for testing
* update test timestamp
2022-07-12 16:56:55 +02:00
Jerome
cfb5c6ce39
pass the forensics Id at root level ( #107 )
2022-07-05 22:01:36 +10:00
Jerome
533fe250db
forensics shall send unique id ( #106 )
2022-07-05 00:31:09 +02:00
Jerome
3ebaea1945
update forensics proof data structure to accomedate vote type ( #104 )
...
* update forensics proof data structure to accomedate vote type
* refactor log
* change blocknum type to uint64
* fix test
Co-authored-by: Liam Lai <liam.icheng.lai@gmail.com>
2022-06-29 23:58:18 +02:00
Liam
0317e871d4
add initial function during load latest block from db ( #96 )
2022-05-29 11:28:08 +02:00
Jerome
7effc71547
allow forensics send msg to stats server ( #95 )
...
* allow forensics send msg to stats server
* add test for forensics reporting mechanism
2022-05-25 19:42:30 +10:00
Jerome
455cacc1b7
move XDC consensus types into core ( #93 )
2022-05-22 11:43:25 +10:00
wgr523
8fde52c512
Xin 145 ( #82 )
...
* add HandleProposedBlock() in procFutureBlocks()
* add proposedBlockHandler for downloader
2022-04-22 00:12:44 +08:00
Jerome
e493ddfd6d
add verifyTC and verifyTimeoutMessage ( #63 )
...
* add verifyTC and verifyTimeoutMessage
* remove v2 func from adaptor
2022-03-02 09:17:57 +11:00
Liam
ff0fcd3951
add test and fix issue on happy path ( #46 )
...
* add test and fix issue on happy path
* add prepare test
* update comment
2022-01-25 10:51:17 +03:00
Jerome
f8d3f9f8c6
Xin 113 is epoch switch ( #37 )
...
* add isEpochSwitch function and refactor utils
* fix broken first v2 epoch switch block
* use adaptor epoch switch function to determine v1 v2 epoch swtich block
* add test for the GetMasternodesByNumber and GetCurrentEpochSwitchBlock function
* add v2 test for isAuthroisedAddress
* Use GetCurrentEpochSwitchBlock in findNearestSignedBlock api
2022-01-14 21:38:38 +11:00
Gerui Wang
2969548f68
add warn for reorg
2021-12-21 16:06:16 +08:00
Liam Lai
5061dd9841
add few comments in code
2021-12-21 08:47:23 +03:00
Jianrong
d901d1df6e
race condition caused by old eth bug where read before write. We fixing it by passing down header in the snapshot to avoid touching ETH code. This is just a precaution to avoid undiscovered bugs in XDC as a result of fundmental ETH implementation change
2021-12-21 10:32:55 +11:00
olumuyiwadad
afe58d79fc
fix api trace block & Change option pending block.
2021-11-11 18:49:57 +05:30
olumuyiwadad
18bfb102b4
Update Test for blockchain.go
...
- TestBlocksHashCacheUpdate
- TestAreTwoBlocksSamePath
Collection test for BlocksHashCache
cases
1. When init new chain
2. when insertChain
3. when insertFork
4. When adding new block by mining
5. When adding new block by syncing with other nodes
2021-11-08 15:41:13 +05:30
olumuyiwadad
70e0496138
fetch data from StateDB instead of Contract.
2021-11-08 14:59:32 +05:30
olumuyiwadad
cca2a7d213
missing ValidatorMapping added.
2021-11-08 14:54:41 +05:30
Gerui Wang
a1e6ae4152
make statedb_utils.go (XDCValidator reader) correct, add statedb utils test
2021-11-03 21:05:25 +08:00
Jianrong
acc2e411a6
fix or skip tests due to PR-136 change
2021-10-20 20:17:47 +11:00
Jianrong
ce106abffe
fix tests related to consensus
2021-10-10 22:05:32 +11:00
Jianrong
e34311ff45
Remove unused consensus v1 methods
2021-10-10 16:04:34 +11:00
Jianrong
0aec2a1e9e
Seperate hooks from XDPoS adaptor
2021-10-10 16:02:19 +11:00
Jianrong
fcbc5a28e1
refactor XDPoS to accommodate multiple consensus engine versions
2021-10-10 16:02:16 +11:00
olumuyiwadad
7d08fa95ba
Merge branch 'apothem' into new_EVM_Upgrade
2021-09-23 17:05:46 +05:30
olumuyiwadad
cf18ceba33
Merge branch 'forking-incident-fix' of https://github.com/hash-laboratories-au/XDPoSChain into hash-laboratories-au-forking-incident-fix
2021-09-23 17:01:19 +05:30
olumuyiwadad
22b1e3a2b5
Update trc21_reader.go
2021-09-21 18:13:01 +05:30
olumuyiwadad
b5abbfed79
new EVM Upgrade
...
- Solidity Upgraded up to v0.8.0
- Fixed and Added eth_chainId
- Fix error in TransactionRecipet
- Reward halving issue fixed
2021-09-21 16:53:46 +05:30
olumuyiwadad
92ffe69ab4
Work around for the issue "return wrong list signers from snapshot"
...
Update signers in snapshot
Ignore signerCheck at checkpoint block 27307800
due to wrong snapshot at gap 27307799
2021-09-17 18:45:46 +05:30
olumuyiwadad
571c41f891
FIx Bad block error.
2021-09-17 17:59:06 +05:30
Liam
0a5c047600
remove duplicate update m1 call ( #8 )
2021-09-04 17:51:32 +10:00
Jianrong
9efb89dffb
fix simulator functions to choose between XDC faker and eth faker
2021-08-30 14:56:14 +10:00
Jianrong
fa2b341c9a
resolving broken eth tests
2021-08-29 17:14:10 +10:00
Jianrong
7b7e34ae00
Fix XDC forking incident with tests
2021-08-29 14:20:01 +10:00
Jianrong
0fdab2027c
add linting as the first CI task
2021-08-07 14:27:08 +10:00
AnilChinchawale
916b16de71
fix masternode stop block production.
2021-01-18 10:57:22 +05:30
AnilChinchawale
a8fc240b29
remove logs & add list of authorized signers
2020-12-30 18:00:37 +05:30
dev-vadim
dbe8c9d984
upgrade XDC.Network with v1.8.27.
2020-12-23 16:32:06 +05:30
diglspacedavid
474cc37036
upgrade codebase with ethereum:v1.8.13
2020-11-23 13:40:30 +05:30
Sinh Vu
c52f31d2c4
update max masternodes
2019-07-23 17:45:29 +07:00
Sinh Vu
3180921a7f
upgrade increase masternodes
2019-07-23 17:25:55 +07:00
Péter Szilágyi
0e63a70505
core: minor code polishes + rebase fixes
2019-04-08 12:04:31 +03:00
rjl493456442
f1b00cffc8
core: re-omit new log event when logs rebirth
2019-04-08 12:02:15 +03:00
Martin Holst Swende
af401d03a3
all: simplify timestamps to uint64 ( #19372 )
...
* 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
2019-04-08 12:00:42 +03:00
Anil Chinchawale
4adc9c0fdc
Update tx_pool.go
2019-04-01 14:33:59 +05:30
AnilChinchawale
ed6533e092
Added "xdc" prefix in address
2019-03-17 16:14:42 +05:30
AnilChinchawale
bf626ddc95
Core Updated
2019-03-16 16:00:19 +05:30
AnilChinchawale
153c8ef49d
File Updated | transaction & constants
2019-03-14 15:58:42 +05:30
MestryOmkar
1861c13bcd
fetcher-hotfix
2019-03-02 15:10:35 +05:30
MestryOmkar
10694b2c6f
fixed bypass unittest
2019-02-27 15:02:33 +05:30
parmarrushabh
147e1f0baf
create new func penalties for hard fork
2019-02-19 17:25:31 +05:30
Péter Szilágyi
2072c26a96
cmd, core, params: add support for Goerli
...
(cherry picked from commit b0ed083ead )
2019-02-19 10:53:47 +02:00
Péter Szilágyi
4da2092908
core: fix pruner panic when importing low-diff-large-sidechain
2019-02-09 17:45:23 +01:00
Martin Holst Swende
3ab9dcc3bd
core: repro #18977
2019-02-09 17:44:15 +01:00
Martin Holst Swende
3a95128b22
core: fix error in block iterator ( #18986 )
2019-02-09 17:36:20 +01:00
Martin Holst Swende
c7664b0636
core, cmd/puppeth: implement constantinople fix, disable EIP-1283 ( #18486 )
...
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!
2019-01-29 17:49:27 +01:00
AnilChinchawale
26cafb46ea
Updated changes in genesis
2019-01-19 04:40:21 +05:30
AnilChinchawale
fd51ea9fc1
Updated Core
2019-01-17 04:38:43 +05:30
AnilChinchawale
ffd60b3685
FIxed issue in core
2019-01-17 04:38:29 +05:30
AnilChinchawale
d67d59a659
Genesis updated
2019-01-16 04:37:52 +05:30
gary rong
d5cad488be
core, eth: fix database version ( #18429 )
...
* core, eth: fix database version
* eth: polish error message
2019-01-11 13:49:12 +02:00
Péter Szilágyi
c1c4301121
Merge pull request #18371 from jeremyschlatter/patch-1
...
core/types: update incorrect comment
2019-01-04 10:14:17 +02:00
Dave McGregor
33d233d3e1
vendor, crypto, swarm: switch over to upstream sha3 package
2019-01-04 09:26:07 +02:00
Jeremy Schlatter
6537ab5dd3
core/types: update incorrect comment
2018-12-28 17:58:03 -08:00
parmarrushabh
7833a10c16
remove run evm with signing tracsaction
2018-12-28 12:33:35 +05:30
parmarrushabh
973f9d1271
Fixed minor bug for get signers from penalties header.
2018-12-28 12:21:37 +05:30
Jordan Krage
27ce4eb78b
core: sanitize more TxPoolConfig fields ( #17210 )
...
* core: sanitize more TxPoolConfig fields
* core: fix TestTransactionPendingMinimumAllowance
2018-12-20 14:00:58 +01:00
Shuai Qi
fe26b2f366
core/state: rename 'new' variable ( #18301 )
2018-12-14 14:55:03 +01:00
qd-ethan
9940d93a43
Comment error ( #18303 )
2018-12-14 11:15:31 +01:00
Martin Holst Swende
83a9a73b89
cmd/geth, core, eth: implement Constantinople override flag ( #18273 )
...
* 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
2018-12-11 14:19:03 +02:00
Martin Holst Swende
42a914a84f
cmd/evm, core/vm, eth: implement api methods to do stdjson dump to local filesystem
2018-12-10 12:33:50 +02:00
MestryOmkar
08843fa176
set min gas price for tx
2018-12-10 11:12:07 +05:30
parmarrushabh
052ac145b6
adding debug log
2018-12-07 11:01:22 +05:30
Paweł Bylica
de39513ced
core, internal, eth, miner, les: Take VM config from BlockChain ( #17955 )
...
Until this commit, when sending an RPC request that called `NewEVM`, a blank `vm.Config`
would be taken so as to set some options, based on the default configuration. If some extra
configuration switches were passed to the blockchain, those would be ignored.
This PR adds a function to get the config from the blockchain, and this is what is now used
for RPC calls.
Some subsequent changes need to be made, see https://github.com/ethereum/go-ethereum/pull/17955#pullrequestreview-182237244
for the details of the discussion.
2018-12-06 14:34:49 +01:00
AnilChinchawale
7ca3b22aa8
fix unittest
2018-12-04 10:03:49 +05:30
AnilChinchawale
0cb5dbc04d
move cache to insert func
2018-12-04 09:59:50 +05:30
MestryOmkar
3227893d02
cache all after 1 epoch
2018-12-04 14:59:55 +05:30
parmarrushabh
88fa30a4ea
move cache data to insert func
2018-12-04 14:57:51 +05:30
parmarrushabh
4a12d746ff
tmp fix ethash unittests
2018-12-04 14:25:55 +05:30
parmarrushabh
2b7010d51f
add state variable to verifyHeader(), verifyHeaders() in the consensus
2018-12-02 12:21:48 +05:30
Martin Holst Swende
7c657fc789
tests, core: update tests and make STATICCALL cause touch-delete ( #18187 )
2018-11-29 10:51:57 +02:00
Martin Holst Swende
bfed28a421
core: more detailed metrics for block processing ( #18119 )
2018-11-28 10:29:05 +02:00
Jaynti Kanani
38592a13a3
fix mixHash/nonce for parity compatible network ( #18166 )
2018-11-26 09:59:04 +01:00
MestryOmkar
8eb3182487
tx from
2018-11-24 17:57:32 +05:30
MestryOmkar
b0cfa3037f
fixed error
2018-11-24 17:55:15 +05:30
parmarrushabh
c2414371ca
fix error read reward
2018-11-24 17:40:36 +05:30
mr_franklin
2a113f6d72
core: return error if repair block failed ( #18126 )
...
* core: return error if repair block failed
* make error a bit shorter
2018-11-23 11:16:14 +02:00
Péter Szilágyi
3ba0418a9a
Merge pull request #17973 from holiman/splitter2
...
core: better side-chain importing
2018-11-22 15:01:10 +02:00
parmarrushabh
8d7572ef1c
hot fix
2018-11-22 15:49:29 +05:30
parmarrushabh
2f4ae0f385
fixed error
2018-11-22 15:09:23 +05:30
Martin Holst Swende
e0d091e090
core: better printout of receipts in bad block reports ( #18156 )
...
* core/blockchain: better printout of receipts in bad block reports
* fix splleing
2018-11-22 11:00:16 +02:00
AnilChinchawale
428d3e2f9c
fix duplicate hook rewards with --announceTxs
2018-11-22 12:43:16 +05:30
Péter Szilágyi
333b5fb123
core: polish side chain importer a bit
2018-11-21 13:19:56 +02:00
mr_franklin
3fd87f2193
core: fix comment typo ( #18144 )
2018-11-21 12:52:02 +02:00
Martin Holst Swende
493903eede
core: better side-chain importing
2018-11-20 12:28:43 +02:00
parmarrushabh
b6dc253064
Update blockchain.go
2018-11-19 12:23:33 +05:30
AnilChinchawale
1f2a1b34bd
add runtime validator contract call
2018-11-19 11:43:40 +05:30
parmarrushabh
51c88fe8ce
create new api get reward
2018-11-19 11:21:42 +05:30
parmarrushabh
4c4fd0a37a
Fixed bug not validate zero gas price for tx deploy SMC.
2018-11-17 18:28:49 +05:30
Rahulraj04
6c67be797b
update logging
2018-11-17 16:37:14 +05:30
AnilChinchawale
43ad80bc0f
broadcast log when insert block
2018-11-17 16:21:52 +05:30
parmarrushabh
f5e8c999a2
set block difficulty belong to creator turn
2018-11-17 12:52:10 +05:30
Rahulraj04
bc027c4fc0
check nonce special transaction before promote
2018-11-17 12:34:24 +05:30
parmarrushabh
9f36d37558
Parallel process block from fetcher
2018-11-17 12:02:43 +05:30
Péter Szilágyi
accc0fab4f
core, eth/downloader: fix ancestor lookup for fast sync
2018-11-16 13:21:20 +02:00
Péter Szilágyi
434dd5bc00
cmd, core, eth, light, trie: add trie read caching layer
2018-11-15 12:22:13 +02:00
parmarrushabh
52ae30023a
refactor RW & pairRW connect for block , transaction
2018-11-14 10:40:05 +05:30
gary rong
1212c7b844
core: fix default trie cache limit ( #17860 )
2018-11-12 18:06:34 +02:00
AnilChinchawale
6f4bb10efd
sort by big.Int
2018-11-12 16:16:24 +05:30
MestryOmkar
bbadba469b
change difficulty block in XDPoS
2018-11-12 15:52:55 +05:30
parmarrushabh
f586154a8e
fix error transaction underpriced when add sign tx to pool(full)
2018-11-12 13:08:55 +05:30
AnilChinchawale
72bc872939
fix unit test: remove td test
2018-11-12 12:56:06 +05:30
AnilChinchawale
1eda4b653c
stop node when updateM1 fails
2018-11-12 12:51:18 +05:30
MestryOmkar
54543deb8a
fix reorg unit test
2018-11-12 12:44:22 +05:30
parmarrushabh
05ea5f10f7
fix unit test tx pool
2018-11-12 12:10:22 +05:30
Corey Lin
1ff152f3a4
rawdb: remove unused parameter for WritePreimages func ( #18059 )
...
* rawdb: remove unused parameter for WritePreimages func and modify a
spelling mistake
* rawdb: update the doc for function WritePreimages
2018-11-09 12:51:07 +02:00
parmarrushabh
3fc36efeb3
Fixed golint.
2018-11-09 10:49:11 +05:30
parmarrushabh
1396b1a10f
Fixed unit test for new m2 block header.
2018-11-09 16:29:54 +05:30
MestryOmkar
07b4be1284
Add new block header validator for store m2 data.
2018-11-09 16:11:13 +05:30
AnilChinchwale
8b92c4176c
move from SubscribeTx to Subscribe Special Tx in Double Validate
2018-11-09 15:00:22 +05:30
AnilChinchwale
360584a498
Revert adding double validation layer
2018-11-09 14:39:48 +05:30
parmarrushabh
161053b345
verify validators info at checkpoint block
2018-11-09 14:20:08 +05:30
parmarrushabh
7ebdbeed64
fix after reviewing
2018-11-09 13:07:34 +05:30
AnilChinchwale
9fc966c7db
Broadcast special Tx through pairRW
2018-11-09 12:56:56 +05:30
MestryOmkar
8e1ffd7c72
Add penalty feature for prevent signer without sign in epoc make slow
2018-11-09 12:49:54 +05:30
parmarrushabh
9d6344fbb4
Broadcast special Tx through pairRW
2018-11-09 12:45:18 +05:30
Felix Lange
870efeef01
core/state: remove lock ( #18065 )
...
The lock in StateDB is useless. It's only held in Copy, but Copy is safe
for concurrent use because all it does is read.
2018-11-08 21:37:19 +01:00
Péter Szilágyi
d0675e9d9c
Merge pull request #17982 from holiman/polish_contantinople_extcodehash
...
core/vm: check empty in extcodehash
2018-11-08 14:26:04 +02:00
Corey Lin
a5dc087845
core/vm, eth/tracers: use pointer receiver for GetRefund ( #18018 )
2018-11-08 13:07:15 +01:00
Felix Lange
0bcff8f525
eth/downloader: speed up tests by generating chain only once ( #17916 )
...
* core: speed up GenerateChain
Use a mock implementation of ChainReader instead of creating
and destroying a BlockChain object for each generated block.
* eth/downloader: speed up tests by generating chain only once
This change reworks the downloader tests so they share a common test
blockchain instead of generating a chain in every test. The tests are
roughly twice as fast now.
2018-11-07 15:07:43 +01:00
Martin Holst Swende
eea3ae42a3
core, eth/downloader: fix validation flaw, fix downloader printout flaw ( #17974 )
2018-11-07 14:47:11 +02:00
AnilChinchwale
9414ae6f2a
Add penalty feature for prevent signer without sign in epoc make slow
2018-11-07 12:05:58 +05:30
AnilChinchwale
551fd57271
Fixed unit test for penalty feature.
2018-11-07 10:46:09 +05:30
AnilChinchwale
f5152bf0cf
Add penalty feature for prevent signer without sign in epoc make slow…
2018-11-07 10:26:28 +05:30
parmarrushabh
b8cb600964
Optimize insert new block
2018-11-07 10:09:52 +05:30
MestryOmkar
b955291388
init double validation layer
2018-11-06 18:00:21 +05:30
AnilChinchawale
deb79f4a23
push Randomization implementation
2018-11-06 17:27:13 +05:30
parmarrushabh
944494f6e4
Revert Randomization implementation
2018-11-06 16:16:29 +05:30
MestryOmkar
20c5123739
Fixed unit test for block randomize.
2018-11-05 11:45:14 +05:30
AnilChinchawale
d81dc08a50
Get randomize m2 offer from validators in smart contract.
2018-11-05 11:12:22 +05:30
AnilChinchawale
0c1fc6e0ae
concurrence init messages from transactions when insert block
2018-11-05 17:41:45 +05:30
parmarrushabh
1857fe3991
remove delay when mine new block
2018-11-03 17:12:18 +05:30
parmarrushabh
4962300b5e
adding sort to masternode list
2018-11-02 14:27:17 +05:30
AnilChinchawale
7e7bc37c20
convert update M1 method from async to sync
2018-11-02 12:14:43 +05:30
parmarrushabh
51ef74203a
update return error when update M1
2018-10-31 18:58:34 +05:30
parmarrushabh
ce89b6b92d
making XDPoS as a separate package
2018-10-28 11:58:50 +05:30
MestryOmkar
9a6c1c5382
Fixed prevent tx zero gas price add to tx pool.
2018-10-27 18:03:27 +05:30
parmmarrushabh
dccf2ca3e9
Add signers and finality to block status rpc api.
2018-10-27 16:28:04 +05:30
Martin Holst Swende
1b6fd032e3
core/vm: check empty in extcodehash
2018-10-26 08:56:37 +02:00
MestryOmkar
cd3f0e37b4
move gap into genesis config
2018-10-24 14:29:03 +05:30
Felix Lange
7f22b59f87
core/state: simplify proof methods ( #17965 )
...
This fixes the import cycle build error in core/vm tests.
There is no need to refer to core/vm for a type definition.
2018-10-23 21:51:41 +02:00
Martin Holst Swende
4c0883e20d
core/vm: adds refund as part of the json standard trace ( #17910 )
...
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.
2018-10-23 16:28:18 +02:00
MestryOmkar
a9e0b66e20
tiny adjustment: m1gap
2018-10-23 11:53:58 +05:30
MestryOmkar
ec421b98b1
masternode should also count to his turn in case some of his friends are down
2018-10-22 10:53:15 +05:30
MestryOmkar
7adecc32d3
node waits to his turn until there is a new block comes in
2018-10-22 10:37:12 +05:30
Wuxiang
d98c45f70f
core: fix a typo ( #17941 )
2018-10-19 16:33:27 +03:00
Simon Jentzsch
97fb08342d
EIP-1186 eth_getProof ( #17737 )
...
* 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
2018-10-18 21:41:22 +02:00
Smilenator
2868acd80b
core/types: fix comment for func SignatureValues ( #17921 )
2018-10-16 12:45:28 +02:00
Martin Holst Swende
a352de6a08
core/vm: add shortcuts for trivial exp cases ( #16851 )
2018-10-16 00:51:39 +02:00
MestryOmkar
f814908442
get masternodes set from latest checkpoint block header instead of fr… …
2018-10-10 14:15:15 +05:30
Guillaume Ballet
97b2806686
core/asm: Use hexadecimal addresses in assembly dumps ( #17870 )
2018-10-09 10:27:07 +03:00
Wenbiao Zheng
31c4e3a118
core/types: Log.Index is the index in block, not receipt ( #17866 )
2018-10-08 13:15:19 +02:00
Péter Szilágyi
1d3d4a4d57
core/vm: reuse Keccak-256 hashes across opcode executions ( #17863 )
2018-10-08 13:14:29 +02:00
Martin Holst Swende
58e868b759
core/vm : fix failing testcase ( #17852 )
...
* core/vm : fix failing testcase
* core/vm: fix nitpick
2018-10-05 19:02:06 +02:00
Martin Holst Swende
092df3ab59
core/vm: SHA3 word cost for CREATE2 ( #17812 )
...
* core/vm: create2 address generation tests
* core/vm: per byte cost of CREATE2
* core/vm: fix linter issue in test
2018-10-05 10:32:35 +03:00
Martin Holst Swende
89a32451ae
core/vm: faster create/create2 ( #17806 )
...
* 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
2018-10-04 18:15:37 +03:00
Felföldi Zsolt
9d06b2c5f3
core: use ChainHeadEvent subscription in the chain indexer ( #17826 )
2018-10-03 17:25:25 +03:00
Péter Szilágyi
14bef9a2db
core: fix unnecessary ancestor lookup after a fast sync ( #17825 )
2018-10-03 13:42:19 +03:00
parmarrushabh
9f5cba7dc7
update new set of masternodes at end of each epoch (distance = m1Gap)
2018-09-30 12:00:33 +05:30
Ryan Schneider
b69942befe
core, internal/ethapi: add and use LRU cache for receipts ( #17610 )
2018-09-29 22:53:31 +02:00
reinerRubin
86ec213076
core/types: make tx signature values optional in JSON ( #17742 )
2018-09-29 22:47:59 +02:00
thumb8432
ffca6dfe01
core/types: fix typos ( #17762 )
2018-09-29 22:11:56 +02:00
Liang ZOU
6663e5da10
all: fix various comment typos ( #17748 )
2018-09-25 12:26:35 +02:00
Péter Szilágyi
ee92bc537f
Merge pull request #17383 from holiman/eip1283
...
Eip1283
2018-09-21 14:16:18 +03:00
Wuxiang
81080bf8cb
core: fix a typo ( #17733 )
2018-09-21 13:45:42 +03:00
gary rong
ba0a8b7887
core, eth: fix dependency cycle ( #17720 )
2018-09-20 20:02:15 +03:00
gary rong
d6254f827b
all: protect self-mined block during reorg ( #17656 )
2018-09-20 15:09:30 +03:00
Péter Szilágyi
0f2ba07c41
common, core, light: add block age into info logs
2018-09-20 12:56:35 +03:00
Guillaume Ballet
da29332c5f
core/vm: add switches to select evm+ewasm interpreters ( #17687 )
...
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.
2018-09-20 10:44:35 +03:00
Péter Szilágyi
faa69bea1c
core, eth: fix goimports for Go 1.11
2018-09-19 11:47:09 +03:00
Péter Szilágyi
5d921fa3a0
core, params: polish net gas metering PR a bit
2018-09-18 16:29:51 +03:00
Martin Holst Swende
caa2c23a38
core,state: finish implementing Eip 1283
2018-09-18 13:08:32 +03:00
Martin Holst Swende
58374e28d9
core, state: initial implementation of Eip-1283
2018-09-18 13:08:28 +03:00
Péter Szilágyi
cc21928e12
Merge pull request #17622 from karalabe/chain-maker-seal
...
consensus/clique, core: chain maker clique + error tests
2018-09-17 11:35:42 +03:00
Emil
86a03f97d3
all: simplify s[:] to s where s is a slice ( #17673 )
2018-09-14 22:07:13 +02:00
Liang ZOU
72c820c49e
core/vm: fix typo 'EVM EVM' ==> 'EVM' ( #17654 )
2018-09-13 12:48:15 +03:00
Péter Szilágyi
4bb25042eb
consensus/clique, core: chain maker clique + error tests
2018-09-11 16:40:00 +03:00
Paweł Bylica
ae992a5d73
core/vm: Hide read only flag from Interpreter interface ( #17461 )
...
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.
2018-09-07 18:13:25 +02:00
Hyung-Kyu Hqueue Choi
cf33d8b83c
core: fix typo in comment ( #17586 )
2018-09-05 10:29:51 +02:00
Martin Holst Swende
32f28a9360
core/vm, tests: update tests, enable constantinople statetests, fix SAR 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.
2018-09-04 10:49:18 +02:00
Wenbiao Zheng
6a33954731
core, eth, trie: use common/prque ( #17508 )
2018-09-03 17:33:21 +02:00
Péter Szilágyi
e8f229b82e
cmd, core, eth, miner, params: configurable gas floor and ceil
2018-08-29 12:40:12 +03:00
Felföldi Zsolt
63352bf424
core: safe indexer operation when syncing starts before the checkpoint ( #17511 )
2018-08-28 10:31:34 +03:00
gary rong
b69476b372
all: make indexer configurable ( #17188 )
2018-08-28 10:08:16 +03:00
Sheldon
0bec85f2e2
core: fix typos in comment ( #17531 )
2018-08-28 10:04:33 +03:00
Wenbiao Zheng
d1aa605f1e
all: remove the duplicate 'the' in annotations ( #17509 )
2018-08-27 11:49:29 +03:00
gary rong
40a71f28cf
miner: fix state commit, track old work packages too ( #17490 )
...
* miner: commit state which is relative with sealing result
* consensus, core, miner, mobile: introduce sealHash interface
* miner: evict pending task with threshold
* miner: go fmt
2018-08-23 16:02:57 +03:00
gary rong
c3f7e3be3b
core/statedb: deep copy logs ( #17489 )
2018-08-23 15:59:58 +03:00
Péter Szilágyi
e0d0e64ce2
cmd, core, miner: add --txpool.locals and priority mining
2018-08-22 09:43:57 +03:00
Aditya
c929030e28
core/types: fix docs about protected Vs ( #17436 )
2018-08-20 15:14:50 +03:00
gary rong
54216811a0
miner: regenerate mining work every 3 seconds ( #17413 )
...
* miner: regenerate mining work every 3 seconds
* miner: polish
2018-08-16 14:14:33 +03:00
parmarrushabh
a710ab8c68
Hot fixed for bug can't deploy smart contract to master node.
2018-08-16 14:51:17 +05:30
Felföldi Zsolt
2cdf6ee7e0
light: CHT and bloom trie indexers working in light mode ( #16534 )
...
This PR enables the indexers to work in light client mode by
downloading a part of these tries (the Merkle proofs of the last
values of the last known section) in order to be able to add new
values and recalculate subsequent hashes. It also adds CHT data to
NodeInfo.
2018-08-15 22:25:46 +02:00
gary rong
a1783d1697
miner: move agent logic to worker ( #17351 )
...
* miner: move agent logic to worker
* miner: polish
* core: persist block before reorg
2018-08-14 18:34:33 +03:00
gary rong
e0e0e53401
crypto: change formula for create2 ( #17393 )
2018-08-14 18:30:42 +03:00
Mymskmkt
fb368723ac
core: fix comment typo ( #17376 )
2018-08-13 11:40:52 +03:00
stormpang
6711f098d5
core/vm: fix comment typo ( #17319 )
...
antything --> anything
:P
2018-08-06 11:42:49 +03:00
Hyung-Kyu Hqueue Choi
0ab54de1a5
core/vm: update benchmarks for core/vm ( #17308 )
...
- 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>
2018-08-03 08:15:33 +03:00
Ha ĐANG
702b8a7aec
core/vm: fix typo in cryptographic hash function name ( #17285 )
2018-07-31 13:27:51 +03:00
Ha ĐANG
2cffd4ff3c
core: fix some small typos on comment code ( #17278 )
2018-07-30 14:10:48 +03:00
Oleg Kovalov
d42ce0f2c1
all: simplify switches ( #17267 )
...
* all: simplify switches
* silly mistake
2018-07-30 12:30:09 +03:00
parmarrushabh
dd9a1bbbf0
Fixed go lint.
2018-07-27 17:02:20 +05:30
Raghav Sood
11a402f747
core: report progress on log chain exports ( #17066 )
...
* core/blockchain: export progress
* core: polish up chain export progress report a bit
2018-07-26 14:26:24 +03:00
Guillaume Ballet
7abedf9bbb
core/vm: support for multiple interpreters ( #17093 )
...
- 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.
2018-07-25 08:56:39 -04:00
Antoine Rondelet
27a278e6e3
core: fixed typo in addresssByHeartbeat ( #17243 )
2018-07-25 14:25:14 +03:00
hadv
bc0a43191e
core: fix typo in comment code
2018-07-25 18:04:38 +07:00
Osuke
10780e8a00
core: fix txpool guarantee comment ( #17214 )
...
* fixed-typo
* core: fix txpool guarantee comment
2018-07-24 18:44:41 +03:00
gary rong
2433349c80
core/vm, params: implement EXTCODEHASH opcode ( #17202 )
...
* core/vm, params: implement EXTCODEHASH opcode
* core, params: tiny fixes and polish
* core: add function description
2018-07-24 18:06:40 +03:00
gary rong
cab1cff11c
core, crypto, params: implement CREATE2 evm instrction ( #17196 )
...
* 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
2018-07-24 17:22:03 +03:00
Wenbiao Zheng
d0082bb7ec
core: fix comment typo ( #17236 )
2018-07-24 13:17:12 +03:00
Sheldon
9e24491c65
core/bloombits, light: fix typos ( #17235 )
2018-07-24 11:24:27 +03:00
parmarrushabh
3f1c3839c9
Add feature send tx sign (validator block) from coinbase to smart con…
2018-07-22 16:39:59 +05:30
gary rong
dcdd57df62
core, ethdb: two tiny fixes ( #17183 )
...
* ethdb: fix memory database
* core: fix bloombits checking
* core: minor polish
2018-07-18 13:41:36 +03:00
Smilenator
30bdf817a0
core/types: polish TxDifference code and docs a bit ( #17130 )
...
* 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
2018-07-09 11:48:54 +03:00
Guillaume Ballet
4e5d1f1c39
core/vm: reuse bigint pools across transactions ( #17070 )
...
* core/vm: A pool for int pools
* core/vm: fix rebase issue
* core/vm: push leftover stack items after execution, not before
2018-07-03 13:06:42 +03:00
gary rong
a4a2343cdc
ethdb, core: implement delete for db batch ( #17101 )
2018-07-02 11:16:30 +03:00
AnilChinchawale
5f79d00d04
FIX UNITTESTS
2018-06-30 15:07:40 +05:30
Guillaume Ballet
598f786aab
core/vm: clear linter warnings ( #17057 )
...
* core/vm: clear linter warnings
* core/vm: review input
* core/vm.go: revert lint in noop as per request
2018-06-26 15:56:25 +03:00
Péter Szilágyi
d926bf2c7e
trie: cache collapsed tries node, not rlp blobs ( #16876 )
...
The current trie memory database/cache that we do pruning on stores
trie nodes as binary rlp encoded blobs, and also stores the node
relationships/references for GC purposes. However, most of the trie
nodes (everything apart from a value node) is in essence just a
collection of references.
This PR switches out the RLP encoded trie blobs with the
collapsed-but-not-serialized trie nodes. This permits most of the
references to be recovered from within the node data structure,
avoiding the need to track them a second time (expensive memory wise).
2018-06-21 11:28:05 +02:00
Wenbiao Zheng
9b1536b26a
core: remove dead code, limit test code scope ( #17006 )
...
* core: move test util var/func to test file
* core: remove useless func
2018-06-19 14:41:13 +03:00
Caesar Chad
ec192f18b4
core/asm: correct comments typo ( #16974 )
...
* core/asm/compiler: correct comments typo
core/asm/compiler: correct comments typo
* Correct comments typo
2018-06-14 16:24:35 +03:00
Wenbiao Zheng
52b1d09457
core: reduce nesting in transaction pool code ( #16980 )
2018-06-14 13:46:43 +03:00
Martin Holst Swende
947e0afeb3
core/vm: optimize MSTORE and SLOAD ( #16939 )
...
* 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
2018-06-14 12:23:37 +03:00
Caesar Chad
f04c0e341e
core/asm: correct comments typo ( #16975 )
...
core/asm/lexer: correct comments typo
2018-06-14 11:32:19 +03:00
John C. Vernaleo
8c4a7fa8d3
core: change comment to match code more closely ( #16963 )
2018-06-13 10:14:15 +03:00
Felföldi Zsolt
049f5b3572
core, eth, les: more efficient hash-based header chain retrieval ( #16946 )
2018-06-12 16:52:54 +03:00
Wenbiao Zheng
aab7ab04b0
core/rawdb: wrap db key creations ( #16914 )
...
* core/rawdb: use wrappered helper to assemble key
* core/rawdb: wrappered helper to assemble key
* core/rawdb: rewrite the wrapper, pass common.Hash
2018-06-11 16:06:26 +03:00
Martin Holst Swende
eac16f9824
core: improve getBadBlocks to return full block rlp ( #16902 )
...
* core: improve getBadBlocks to return full block rlp
* core, eth, ethapi: changes to getBadBlocks formatting
* ethapi: address review concerns
2018-06-11 11:03:40 +03:00
ledgerwatch
feb6620c34
core: relax type requirement for bc in ApplyTransaction ( #16901 )
2018-06-07 10:34:24 +02:00
Péter Szilágyi
01a7e267dc
Merge pull request #16882 from karalabe/streaming-ecrecover
...
core: concurrent background transaction sender ecrecover
2018-06-05 17:13:43 +03:00
kiel barry
cbfb40b0aa
params: fix golint warnings ( #16853 )
...
params: fix golint warnings
2018-06-05 12:31:34 +02:00
Péter Szilágyi
2ab24a2a8f
core: concurrent background transaction sender ecrecover
2018-06-05 11:03:55 +03:00
hadv
e3a993d774
core: fix typo in comment code
2018-06-05 09:56:45 +07:00
Péter Szilágyi
143c4341d8
core, eth, trie: streaming GC for the trie cache ( #16810 )
...
* core, eth, trie: streaming GC for the trie cache
* trie: track memcache statistics
2018-06-04 10:47:43 +03:00
Péter Szilágyi
342ec83d67
core: fix transaction event asynchronicity
2018-05-30 10:14:00 +03:00
Wenbiao Zheng
38c7eb0f26
trie: rename TrieSync to Sync and improve hexToKeybytes ( #16804 )
...
This removes a golint warning: type name will be used as trie.TrieSync by
other packages, and that stutters; consider calling this Sync.
In hexToKeybytes len(hex) is even and (even+1)/2 == even/2, remove the +1.
2018-05-29 17:48:43 +02:00
Péter Szilágyi
d51faee240
Merge pull request #16831 from abeln/patch-1
...
core/vm: fix typo in comment
2018-05-29 15:44:30 +03:00
kimmylin
426f62f1a8
core: improve test for TransactionPriceNonceSort ( #16413 )
2018-05-29 14:21:04 +02:00
Abel Nieto
d258eee211
core/vm: fix typo in comment
2018-05-29 13:22:00 +02:00
kiel barry
84f8c0cc1f
common: improve documentation comments ( #16701 )
...
This commit adds many comments and removes unused code.
It also removes the EmptyHash function, which had some uses
but was silly.
2018-05-29 12:42:21 +02:00
Ryan Schneider
55b579e02c
core: use a wrapped map to remove contention in TxPool.Get. ( #16670 )
...
* core: use a wrapped `map` and `sync.RWMutex` for `TxPool.all` to remove contention in `TxPool.Get`.
* core: Remove redundant `txLookup.Find` and improve comments on txLookup methods.
2018-05-23 15:55:42 +03:00
Abel Nieto
be22ee8dda
core/vm: fix typo in instructions.go ( #16788 )
2018-05-23 15:02:10 +03:00
gary rong
fbf57d53e2
core/types: convert status type from uint to uint64 ( #16784 )
2018-05-23 11:10:24 +03:00
Péter Szilágyi
ab6bdbd9b0
Merge pull request #16758 from hadv/fix/typos
...
Fix some typos in comment code and output log
2018-05-19 19:40:55 +03:00
hadv
f2fdb75dd9
core, consensus: fix some typos in comment code and output log
2018-05-19 15:44:36 +07:00
Péter Szilágyi
49719e21bc
core, eth: minor txpool event cleanups
2018-05-18 12:08:24 +03:00
rjl493456442
a2e43d28d0
all: collate new transaction events together
2018-05-18 11:46:44 +03:00
gary rong
7beccb29be
all: get rid of error when creating memory database ( #16716 )
...
* all: get rid of error when create mdb
* core: clean up variables definition
* all: inline mdb definition
2018-05-09 15:24:25 +03:00
Péter Szilágyi
6cf0ab38bd
core/rawdb: separate raw database access to own package ( #16666 )
2018-05-07 14:35:06 +03:00
Péter Szilágyi
579ac6287b
Merge pull request #16576 from CrispinFlowerday/bugfix/local_underpriced_txs
...
core: ensure local transactions aren't discarded as underpriced
2018-05-02 11:34:47 +03:00
kiel barry
a7720b5926
core: golint updates for this or self warning ( #16633 )
2018-05-02 11:27:59 +03:00
Crispin Flowerday
0afd767537
core: ensure local transactions aren't discarded as underpriced
...
This fixes an issue where local transactions are discarded as
underpriced when the pool and queue are full.
2018-05-02 11:04:40 +03:00
Péter Szilágyi
7a7428a027
core, eth: fix tracer dirty finalization
2018-04-27 14:29:18 +03:00
Felix Lange
b724d1aada
core/state: cache missing storage entries ( #16584 )
2018-04-27 12:13:23 +03:00
kimmylin
86be91b3e2
core/types: avoid duplicating transactions on changing signer ( #16435 )
2018-04-24 10:39:03 +03:00
Wuxiang
8f8774cf6d
all: fix various typos ( #16533 )
...
* fix typo
* fix typo
* fix typo
2018-04-19 16:32:02 +03:00
dm4
c514fbccc0
core/asm: accept uppercase instructions ( #16531 )
2018-04-19 15:31:30 +02:00
dm4
49e38c970e
core/asm: remove unused condition ( #16487 )
2018-04-18 01:08:31 +02:00
thomasmodeneis
ba1030b6b8
build: enable goimports and varcheck linters ( #16446 )
2018-04-18 00:53:50 +02:00
Péter Szilágyi
db48d312e4
core: txpool stable underprice drop order, perf fixes
2018-04-12 12:54:22 +03:00
Martin Holst Swende
7205366c9f
core/state: fix ripemd-cornercase in Copy
2018-04-11 15:03:49 +02:00
Martin Holst Swende
0c7b99b8cc
core/state: fix bug in copy of copy State
2018-04-11 10:23:01 +02:00
Felix Lange
3caf16b15f
core: remove stray account creations in state transition ( #16470 )
...
The 'from' and 'to' methods on StateTransitions are reader methods and
shouldn't have inadvertent side effects on state.
It is safe to remove the check in 'from' because account existence is
implicitly checked by the nonce and balance checks. If the account has
non-zero balance or nonce, it must exist. Even if the sender account has
nonce zero at the start of the state transition or no balance, the nonce
is incremented before execution and the account will be created at that
time.
It is safe to remove the check in 'to' because the EVM creates the
account if necessary.
Fixes #15119
2018-04-10 15:33:25 +02:00
Felix Lange
c7ab3e5544
common: delete StringToAddress, StringToHash ( #16436 )
...
* 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
2018-04-10 14:12:07 +03:00
Péter Szilágyi
39f4c80155
Merge pull request #15225 from holiman/test_removefrom_dirtyset
...
Change handling of dirty objects in state
2018-04-10 12:28:30 +03:00
Martin Holst Swende
8c31d2897b
core: add blockchain benchmarks
2018-04-10 11:20:06 +02:00
Martin Holst Swende
14c9215dd3
state: handle nil in journal dirties
2018-04-10 11:20:02 +02:00
dm4
3ebcf92b42
cmd/evm: print vm output when debug flag is on ( #16326 )
2018-04-06 12:43:36 +02:00
Steven Roose
ec8ee611ca
core/types: remove String methods from struct types ( #16205 )
...
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.
2018-04-05 14:13:02 +02:00
Jia Chenhui
5909482fb5
core/state: avoid redundant addition to code size cache ( #16427 )
2018-04-03 17:13:19 +02:00
Péter Szilágyi
d985b9052a
core/state: avoid linear overhead on journal dirty listing
2018-03-28 09:32:02 +03:00
Martin Holst Swende
958ed4f3d9
core/state: rework dirty handling to avoid quadratic overhead
2018-03-28 09:29:28 +03:00
Jia Chenhui
1a8894b3d5
core/state: uniform parameter style ( #16398 )
...
- Uniform code style.
2018-03-28 09:26:37 +03:00
hydai
6134990709
core/vm: Fixed typos in core/vm/interpreter.go
2018-03-27 12:29:04 +08:00
hydai
c3dc814fea
core/vm: Fixed typo in core/vm/evm.go
2018-03-26 21:40:00 +08:00
Jia Chenhui
e506d384e9
core/state: fix typo ( #16370 )
2018-03-26 14:45:34 +03:00
hydai
7c131f4d6d
core/asm: fixed typo (posititon -> position) ( #16366 )
2018-03-26 13:48:39 +03:00
hydai
84c5db5409
core/vm: remove JIT VM codes ( #16362 )
2018-03-26 13:48:04 +03:00
Péter Szilágyi
1fae50a199
core: minor evm polishes and optimizations
2018-03-26 12:28:46 +03:00
Martin Holst Swende
faed47b3c5
Merge pull request #15990 from markya0616/sim_backend_block_hash
...
accounts/abi, core: add AddTxWithChain in BlockGen for simulation
2018-03-19 08:29:54 +01:00
hydai
a063876749
core/asm: fixed typo (labal -> label) ( #16313 )
2018-03-14 11:59:06 +02:00
Martin Holst Swende
4871e25f5f
core/vm: optimize eq, slt, sgt and iszero + tests ( #16047 )
...
* 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
2018-03-08 14:48:19 +02:00
Kyuntae Ethan Kim
63687f04e4
core: check transaction/receipt count match when reconstructing blocks ( #16272 )
2018-03-07 12:05:14 +02:00
Péter Szilágyi
2b5d1a4a4c
core: update txpool tests for the removal fix
2018-03-07 10:58:11 +02:00
cui
f8601430fd
core: should enqueue the invalids tx anyway
...
even the pending is empty we shoud enqueue the invalid txs
2018-03-07 10:07:50 +02:00
Péter Szilágyi
bd6879ac51
core/vm, crypto/bn256: switch over to cloudflare library ( #16203 )
...
* 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
2018-03-05 14:33:45 +02:00
Péter Szilágyi
b7e57ca1d0
cmd/evm, core/vm, internal/ethapi: don't disable call gas metering
2018-03-05 14:01:13 +02:00
Péter Szilágyi
ca64a122d3
eth/downloader: save and load trie sync progress ( #16224 )
2018-03-03 00:52:39 +01:00
Mark Rushakoff
98ec5e5011
core/asm: rename isAlphaNumeric to isLetter ( #16212 )
...
The function would return false for numbers, so isLetter is a more
accurate description of the behavior.
2018-02-28 12:20:07 +02:00
Martin Holst Swende
f83237573f
core: make current*Block atomic, and accessor functions mutex-free ( #16171 )
...
* core: make current*Block atomic, and accessor functions mutex-free
* core: fix review concerns
* core: fix error in atomic assignment
* core/light: implement atomic getter/setter for headerchain
2018-02-26 11:53:10 +02:00
Péter Szilágyi
89f914c030
core: flush out trie cache more meaningfully on stop ( #16143 )
...
* core: flush out trie cache more meaningfully on stop
* core: upgrade legacy tests to chain maker
2018-02-23 14:02:33 +02:00
Martin Holst Swende
44d40ffce1
core, vm, common: define constantinople fork + shift ( #16045 )
...
* 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
2018-02-23 12:32:57 +02:00
Anton Evangelatov
ae9f97221a
metrics: pull library and introduce ResettingTimer and InfluxDB reporter ( #15910 )
...
* go-metrics: fork library and introduce ResettingTimer and InfluxDB reporter.
* vendor: change nonsense/go-metrics to ethersphere/go-metrics
* go-metrics: add tests. move ResettingTimer logic from reporter to type.
* all, metrics: pull in metrics package in go-ethereum
* metrics/test: make sure metrics are enabled for tests
* metrics: apply gosimple rules
* metrics/exp, internal/debug: init expvar endpoint when starting pprof server
* internal/debug: tiny comment formatting fix
2018-02-23 11:56:08 +02:00
Péter Szilágyi
0b3e23f636
core: yeah, funny file, drop it
2018-02-22 15:41:48 +02:00
ferhat elmas
dc7ca52b3b
core: handle ignored error ( #16065 )
...
- according to implementation of `IntrinsicGas`
we can continue execution since problem will be detected
later. However, early return is future-proof for changes.
2018-02-14 22:02:51 +02:00
ferhat elmas
ff225db813
core/vm: remove unused hashing ( #16075 )
2018-02-14 15:41:05 +02:00
Felix Lange
a5c0bbb4f4
all: update license information ( #16089 )
2018-02-14 13:49:11 +01:00
Felix Lange
b007412db1
core: soften up state memory force-commit log messages ( #16080 )
...
Talk about "state" instead of "trie timing", "trie memory" and remove
the overzealous warning when the limit is just reached. Since the time
limit is always reached on slow machines, move the message to info level
so users don't freak out about internal details.
2018-02-13 15:12:55 +02:00
Péter Szilágyi
69c1f2c2a7
core: force import known but rolled back blocks
2018-02-12 11:54:14 +02:00
Péter Szilágyi
55599ee95d
core, trie: intermediate mempool between trie and database ( #15857 )
...
This commit reduces database I/O by not writing every state trie to disk.
2018-02-05 17:40:32 +01:00
Péter Szilágyi
fdb34b7a7c
Merge pull request #15996 from karalabe/drop-redundant-methods
...
core, eth, les, light: get rid of redundant methods
2018-01-31 12:46:38 +02:00
Martin Holst Swende
017b9f7eac
core, ethdb: reuse database batches ( #15989 )
...
* leveldb: Update leveldb to 211f780 (poolfix)
* core, ethdb: reuse database batches
2018-01-30 19:03:31 +02:00
Péter Szilágyi
566d5c0777
core, eth, les, light: get rid of redundant methods
2018-01-30 18:42:00 +02:00
mark.lin
c1d70ea970
accounts/abi, core: add AddTxWithChain in BlockGen for simulation
2018-01-29 18:47:08 +08:00
Péter Szilágyi
84be009154
core: sorted reorg insertion order for proper head header updating
2018-01-22 14:11:07 +02:00
George Ornbo
370dca4491
core/vm: Fix comment typo
2018-01-16 15:47:33 +00:00
Jim McDonald
18a7d31338
miner: avoid unnecessary work ( #15883 )
2018-01-15 12:57:06 +02:00
Felix Lange
9d06026c19
all: regenerate codecs with gencodec commit 90983d99de ( #15830 )
...
Fixes #15777 because null is now allowed for hexutil.Bytes.
2018-01-08 15:13:22 +02:00
Felix Lange
5c2f1e0014
all: update generated code ( #15808 )
...
* 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
2018-01-08 14:15:57 +02:00
Felix Lange
1c2378b926
tests: update to upstream commit 2bb0c3da3b ( #15806 )
...
Also raise traceLimit once again and print the VM
error and output on failure.
2018-01-04 13:18:30 +01:00
Péter Szilágyi
6f69cdd109
all: switch gas limits from big.Int to uint64
2018-01-03 14:45:35 +02:00
ferhat elmas
5866626b08
core, p2p/discv5: use time.NewTicker instead of time.Tick ( #15747 )
2018-01-02 12:50:46 +01:00
gary rong
5f8888e116
accounts, consensus, core, eth: make chain maker consensus agnostic ( #15497 )
...
* accounts, consensus, core, eth: make chain maker consensus agnostic
* consensus, core: move CalcDifficulty to Engine interface
* consensus: add docs for calcDifficulty function
* consensus, core: minor comment fixups
2017-12-22 14:37:50 +02:00
Péter Szilágyi
5258785c81
cmd, core, eth/tracers: support fancier js tracing ( #15516 )
...
* 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
2017-12-21 13:56:11 +02:00
Péter Szilágyi
7138de7b55
core: silence txpool reorg warning (annoying on import) ( #15725 )
2017-12-21 10:20:10 +02:00
Kurkó Mihály
b4cf57a581
core: fix typos ( #15720 )
2017-12-20 19:08:51 +02:00
Péter Szilágyi
5e1581c2c3
core: fix panic when stat-ing a tx from a queue-only account ( #15714 )
2017-12-20 12:34:43 +02:00
Paweł Bylica
fb5f25eeee
core/vm: Remove snapshot param from Interpreter.Run()
2017-12-15 13:33:35 +01:00
Zach
3da1bf8ca1
all: use gometalinter.v2, fix new gosimple issues ( #15650 )
2017-12-12 19:05:47 +01:00
Airead
8092106abc
core/types: fix typo in comment ( #15619 )
2017-12-07 10:06:44 +01:00
Felix Lange
be12392fba
core/vm: track 63/64 call gas off stack ( #15563 )
...
* 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
2017-11-28 21:05:49 +02:00
Péter Szilágyi
5dea0f2aa4
core/state: copy trie too, not just content
2017-11-24 14:20:49 +02:00
Ricardo Domingos
9ff9d04a69
all: fix code comment typos ( #15547 )
...
* console: fix typo in comment
* contracts/release: fix typo in comment
* core: fix typo in comment
* eth: fix typo in comment
* miner: fix typo in comment
2017-11-24 11:20:01 +02:00
Péter Szilágyi
b0190189a3
core/vm, internal/ethapi: tracer no full storage, nicer json output ( #15499 )
...
* core/vm, internal/ethapi: tracer no full storage, nicer json output
* core/vm, internal/ethapi: omit disabled trace fields
2017-11-16 18:53:18 +02:00
Péter Szilágyi
463014126f
core/bloombits: handle non 8-bit boundary section matches
2017-11-15 14:10:35 +02:00
Péter Szilágyi
bce5d837b5
Merge pull request #14582 from holiman/jumpdest_improv
...
core/vm: improve jumpdest analysis
2017-11-15 10:52:14 +02:00
Péter Szilágyi
43c8a1914c
Merge pull request #15470 from karalabe/clique-sametd-splitter
...
core: split same-td blocks on block height
2017-11-15 10:44:18 +02:00
Jay Guo
924098c6e5
core/vm: fix typos in jump_table.go
2017-11-14 17:57:37 +08:00
Martin Holst Swende
96ddf27a48
core/vm: copyright header on test-file
2017-11-13 22:04:53 +01:00
Péter Szilágyi
54ce3887d8
core: split same-td blocks on block height
2017-11-13 17:07:05 +02:00
ferhat elmas
86f6568f66
build: enable unconvert linter ( #15456 )
...
* build: enable unconvert linter
- fixes #15453
- update code base for failing cases
* cmd/puppeth: replace syscall.Stdin with os.Stdin.Fd() for unconvert linter
2017-11-10 19:06:45 +02:00
ferhat elmas
9619a61024
all: gofmt -w -s ( #15419 )
2017-11-08 11:45:52 +01:00
Jim McDonald
0131bd6ff9
core: respect price bump threshold ( #15401 )
...
* core: allow price bump at threshold
* core: test changes to allow price bump at threshold
* core: reinstate tx replacement test underneath threshold
* core: minor test failure message cleanups
2017-10-30 13:05:00 +02:00
ferhat elmas
07e8c177e7
core, swarm: typo fixes
2017-10-30 01:23:23 +01:00
Felföldi Zsolt
8d434f6a6f
les, core/bloombits: post-LES/2 fixes ( #15391 )
...
* les: fix topic ID
* core/bloombits: fix interface conversion
2017-10-27 17:18:53 +03:00
Péter Szilágyi
0095531a58
core, eth, les: fix messy code ( #15367 )
...
* core, eth, les: fix messy code
* les: fixed tx status test and rlp encoding
* core: add a workaround for light sync
2017-10-25 12:18:44 +03:00
Felföldi Zsolt
ca376ead88
les, light: LES/2 protocol version ( #14970 )
...
This PR implements the new LES protocol version extensions:
* new and more efficient Merkle proofs reply format (when replying to
a multiple Merkle proofs request, we just send a single set of trie
nodes containing all necessary nodes)
* BBT (BloomBitsTrie) works similarly to the existing CHT and contains
the bloombits search data to speed up log searches
* GetTxStatusMsg returns the inclusion position or the
pending/queued/unknown state of a transaction referenced by hash
* an optional signature of new block data (number/hash/td) can be
included in AnnounceMsg to provide an option for "very light
clients" (mobile/embedded devices) to skip expensive Ethash check
and accept multiple signatures of somewhat trusted servers (still a
lot better than trusting a single server completely and retrieving
everything through RPC). The new client mode is not implemented in
this PR, just the protocol extension.
2017-10-24 15:19:09 +02:00
Péter Szilágyi
6d6a5a9337
cmd, consensus, core, miner: instatx clique for --dev ( #15323 )
...
* 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
2017-10-24 13:40:42 +03:00
Péter Szilágyi
0af1ab0c86
core: avoid warning when loading the transaction journal
2017-10-20 14:42:20 +03:00
Péter Szilágyi
0e7d019e0e
core: fire tx event on replace, expand tests
2017-10-20 14:42:19 +03:00
Péter Szilágyi
a91e682234
core/vm: check opcode stack before readonly enforcement
2017-10-14 15:42:48 +03:00
Jim McDonald
c599b78f62
core/types: fix test for TransactionsByPriceAndNonce
2017-10-11 11:35:44 +01:00
Péter Szilágyi
629b5837e9
core: revert invalid block dedup code ( #15235 )
2017-10-03 18:59:53 +02:00
Péter Szilágyi
7e9e3a134b
core/types, internal: swap Receipt.Failed to Status
2017-10-02 14:04:22 +03:00
Felix Lange
d78ad226c2
ethclient, mobile: add TransactionSender ( #15127 )
...
* 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.
2017-10-01 11:03:28 +02:00
Péter Szilágyi
2ab2a9f131
core/bloombits, eth/filters: handle null topics ( #15195 )
...
When implementing the new bloombits based filter, I've accidentally broke null
topics by removing the special casing of common.Hash{} filter rules, which
acted as the wildcard topic until now.
This PR fixes the regression, but instead of using the magic hash
common.Hash{} as the null wildcard, the PR reworks the code to handle nil
topics during parsing, converting a JSON null into nil []common.Hash topic.
2017-09-27 12:14:52 +02:00
Péter Szilágyi
229bf51f0d
Merge pull request #15181 from fjl/state-revert-log-index
...
core/state: revert log index when removing logs
2017-09-26 17:11:46 +03:00
cdetrio
673007d7ae
core/vm: standard vm traces ( #15035 )
2017-09-22 10:22:56 +02:00
Felix Lange
a0d783094e
core/state: revert log index when removing logs
2017-09-21 20:46:21 +02:00
Péter Szilágyi
701d60c889
params: enable Byzantium on Ropsten/tests, fix failures
2017-09-14 10:59:05 +03:00
Martin Holst Swende
9be07de539
params: Updated finalized gascosts for ECMUL/MODEXP ( #15135 )
...
* 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
2017-09-14 10:35:54 +03:00
Péter Szilágyi
5bbd7fb390
consensus, core, params: rebrand Metro to Byzantium
2017-09-14 10:10:46 +03:00
Péter Szilágyi
10b3f97c9d
core: only fire one chain head per batch ( #15123 )
...
* core: only fire one chain head per batch
* miner: announce chan events synchronously
2017-09-11 13:13:05 +03:00
Felix Lange
42a5b54bf5
core/vm: improve bitvec comments
2017-09-10 21:04:36 +02:00
Felix Lange
10181b57a9
core, eth/downloader: commit block data using batches ( #15115 )
...
* ethdb: add Putter interface and Has method
* ethdb: improve docs and add IdealBatchSize
* ethdb: remove memory batch lock
Batches are not safe for concurrent use.
* core: use ethdb.Putter for Write* functions
This covers the easy cases.
* core/state: simplify StateSync
* trie: optimize local node check
* ethdb: add ValueSize to Batch
* core: optimize HasHeader check
This avoids one random database read get the block number. For many uses
of HasHeader, the expectation is that it's actually there. Using Has
avoids a load + decode of the value.
* core: write fast sync block data in batches
Collect writes into batches up to the ideal size instead of issuing many
small, concurrent writes.
* eth/downloader: commit larger state batches
Collect nodes into a batch up to the ideal size instead of committing
whenever a node is received.
* core: optimize HasBlock check
This avoids a random database read to get the number.
* core: use numberCache in HasHeader
numberCache has higher capacity, increasing the odds of finding the
header without a database lookup.
* core: write imported block data using a batch
Restore batch writes of state and add blocks, tx entries, receipts to
the same batch. The change also simplifies the miner.
This commit also removes posting of logs when a forked block is imported.
* core: fix DB write error handling
* ethdb: use RLock for Has
* core: fix HasBlock comment
2017-09-09 19:03:07 +03:00
Martin Holst Swende
d6681ed360
core/vm: Rename + updated doc on jumpdest analysis
2017-09-08 12:47:44 +02:00
Mark
c1740e4540
core/types, miner: avoid tx sender miscaching ( #14773 )
2017-09-07 23:22:27 +02:00
Fiisio
02b4d074f6
core/asm: use ContainsRune instead of IndexRune ( #15098 )
2017-09-07 23:11:48 +02:00
Pawan Singh Pal
69c8be7c86
core: delete dao.go ( #15113 )
...
- dao.go is already present in consensus/misc
- core/dao.go is not used anywhere in the codebase
2017-09-07 23:08:06 +02:00
Péter Szilágyi
c4d21bc8e5
Merge pull request #14631 from zsfelfoldi/bloombits2
...
core/bloombits, eth/filter: transformed bloom bitmap based log search
2017-09-06 13:00:35 +03:00
Péter Szilágyi
564c8f3ae6
core/bloombits: drop nil-matcher special case
2017-09-06 11:14:22 +03:00
Zsolt Felfoldi
451ffdb62b
core/bloombits: use general filters instead of addresses and topics
2017-09-06 11:14:21 +03:00
Zsolt Felfoldi
6ff2c02991
core/bloombits: AddBloom index parameter and fixes variable names
2017-09-06 11:14:20 +03:00
Péter Szilágyi
f585f9eee8
core, eth: clean up bloom filtering, add some tests
2017-09-06 11:14:19 +03:00
Zsolt Felfoldi
4ea4d2dc34
core, eth: add bloombit indexer, filter based on it
2017-09-06 11:13:13 +03:00
Péter Szilágyi
cc313e78b7
core: use blocks and avoid deep reorgs in txpool
2017-09-05 19:50:29 +03:00
Péter Szilágyi
da7d57e07c
core: make txpool operate on immutable state
2017-09-05 13:34:41 +03:00
Martin Holst Swende
e7408b5552
core/vm: Make MaxCodesize non-retroactive ( #15072 )
...
* core/vm: Make max_codesize only applicable post Spurious Dragon/158/155/161/170
* tests: Remove expected failure
2017-09-04 12:53:25 +03:00
Martin Holst Swende
1901521ed0
core: Fix flaw where underpriced locals were removed ( #15081 )
...
* core: Fix flaw where underpriced locals were removed
* core: minor code cleanups for tx pool tests
2017-09-04 12:48:36 +03:00
Martin Holst Swende
23b51a68cb
core/vm: avoid state lookup during gas calc for call ( #15061 )
2017-09-04 10:56:45 +02:00
Martin Holst Swende
07635e43e2
core/vm: renamed struct member + go fmt
2017-08-28 13:33:24 +02:00
Martin Holst Swende
64a3a3d23c
core/vm: Fix testcase input for ecmul
2017-08-28 13:30:26 +02:00
Martin Holst Swende
bc2a5578c0
core/vm: more benchmarks
2017-08-27 14:00:32 +02:00
Péter Szilágyi
08f27428b4
core, tests: implement Metropolis EIP 684
2017-08-25 13:00:27 +03:00
Péter Szilágyi
27a5622e99
Merge pull request #15028 from karalabe/metropolis-iceage
...
consensus, core, tests: implement Metropolis EIP 649
2017-08-25 11:00:51 +03:00
Felix Lange
ad16aeb0a2
core/types: encode receipt status in PostState field
...
This fixes a regression where the new Failed field in ReceiptForStorage
rejected previously stored receipts. Fix it by removing the new field
and store status in the PostState field. This also removes massive RLP
hackery around the status field.
2017-08-24 23:51:50 +02:00
Péter Szilágyi
b872961ec8
consensus, core, tests: implement Metropolis EIP 649
2017-08-24 17:16:39 +03:00
Felix Lange
54b1de67e2
core/vm: make jumpdest code nicer
2017-08-24 13:09:53 +02:00
nkbai
68955ed2eb
core/types: fix create indicator in Transaction.String ( #15025 )
2017-08-24 12:48:13 +02:00
Péter Szilágyi
ff9a868232
core/state: revert metro suicide map addition ( #15024 )
2017-08-24 12:42:00 +02:00
Péter Szilágyi
3c48a25762
Merge pull request #15014 from rjl493456442/metropolis-eip658
...
core: add status as a consensus field in receipt
2017-08-23 14:39:37 +03:00
Martin Holst Swende
286ec5df40
cmd/evm, core/vm, internal/ethapi: Show error when exiting ( #14985 )
...
* cmd/evm, core/vm, internal/ethapi: Add 'err' to tracer interface CaptureEnd
* cmd/evm: fix nullpointer when there is no error
2017-08-23 14:37:18 +03:00
Péter Szilágyi
4ee92f2d19
core/types: reject Metro receipts with > 0x01 status bytes
2017-08-23 13:57:15 +03:00
rjl493456442
28aea46ac0
core: implement Metropolis EIP 658, receipt status byte
2017-08-22 18:35:17 +03:00
Ti Zhou
2fd5ba6bd4
core/vm: fix typo in method documentation ( #15019 )
...
Signed-off-by: Ti Zhou <tizhou1986@gmail.com>
2017-08-22 12:43:36 +03:00
Péter Szilágyi
afdfdebd87
Merge pull request #14983 from karalabe/metropolis-revert
...
core/vm: implement REVERT metropolis opcode
2017-08-21 12:23:03 +03:00
Miya Chen
bf1e263128
core, light: send chain events using event.Feed ( #14865 )
2017-08-18 12:58:36 +02:00
Péter Szilágyi
f9fb70d2ee
core/vm: rework reversion to work on a higher level
2017-08-17 16:50:35 +03:00
Péter Szilágyi
1335a6cc8c
core/vm, crypto/bn256: fix bn256 use and pairing corner case
2017-08-17 16:46:46 +03:00
Jeffrey Wilcke
b70a73cd3e
core/vm: implement REVERT metropolis opcode
2017-08-16 15:32:59 +03:00
Péter Szilágyi
4e0fea4d30
core/vm: polish RETURNDATA, add missing returns to CALL*
2017-08-16 13:43:14 +03:00
Jeffrey Wilcke
9bd6068fef
core/vm: implement RETURNDATA metropolis opcodes
2017-08-16 13:43:08 +03:00
Péter Szilágyi
3df7142b3e
core/vm: minor polishes, fix STATICCALL for precompiles
...
* 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
2017-08-15 14:40:12 +03:00
Jeffrey Wilcke
3d123bcde6
core/vm: implement metropolis static call opcode
2017-08-15 13:03:49 +03:00
Péter Szilágyi
f8d8b56b28
core/vm: optimize copy-less data retrievals
2017-08-14 17:08:49 +03:00
Martin Holst Swende
d8aaa3a215
core/vm: benchmarking of metro precompiles
2017-08-14 15:37:09 +03:00
Péter Szilágyi
6131dd55c5
core/vm: polish precompile contract code, add tests and benches
...
* Update modexp gas calculation to new version
* Fix modexp modulo 0 special case to return zero
2017-08-14 15:27:44 +03:00
Martin Holst Swende
967e097faa
core/vm: Address review concerns
2017-08-14 10:57:54 +02:00
Jeffrey Wilcke
7bbdf3e268
core: add Metropolis pre-compiles (EIP 197, 198 and 213)
2017-08-11 15:24:54 +03:00
Joel Burget
833eeb9f23
core/vm/runtime: remove unused state parameter to NewEnv ( #14953 )
...
* core: Remove unused `state` parameter to `NewEnv`.
`cfg.State` is used instead.
* core/vm/runtime: remove unused import
2017-08-11 14:29:32 +03:00
Felix Lange
374c49e0ac
Merge pull request #14522 from ethereum/go-ethereum/chainproc2
2017-08-08 13:37:59 +02:00
Péter Szilágyi
1c45f2f42e
core: fix txpool journal and test races
2017-08-08 12:22:01 +03:00
Péter Szilágyi
8edaaa227d
core: polish chain indexer a bit
2017-08-07 17:38:33 +03:00
Zsolt Felfoldi
bd74882d83
core: implement ChainIndexer
2017-08-07 17:37:08 +03:00
Péter Szilágyi
2b50367fe9
core: fix blockchain goroutine leaks in tests
2017-08-07 16:00:47 +03:00
Péter Szilágyi
5b742fb82b
core: bump timeout test to avoid flakyness on overloaded ci
2017-08-07 12:53:32 +03:00
evgk
0cc9b8791e
core/vm: fix typo in comment ( #14894 )
2017-08-04 01:31:18 +02:00
njupt-moon
53f3460ab5
core/asm: fix hex number lexing ( #14861 )
2017-07-31 13:02:36 +02:00
Mark
4f9789b28d
core: avoid write existing block again ( #14849 )
2017-07-31 11:59:07 +02:00
Péter Szilágyi
3d32690b54
cmd, core, eth: journal local transactions to disk ( #14784 )
...
* core: reduce txpool event loop goroutines and sync structs
* cmd, core, eth: journal local transactions to disk
* core: journal replacement pending transactions too
* core: separate transaction journal from pool
2017-07-28 15:09:39 +02:00
cdetrio
ffebf00114
core/vm/runtime: fix evm command to use --gasprice flag value
2017-07-25 13:08:29 -04:00
Felix Lange
3e0dbe0eaa
core/vm: remove logging and add section labels to struct logs ( #14782 )
2017-07-19 14:32:45 +02:00
Péter Szilágyi
c65f10a17b
Merge pull request #14733 from karalabe/metro-eip100
...
consensus/ethash, core: implement Metropolis EIP 100
2017-07-17 12:43:13 +03:00
Péter Szilágyi
a56f3dc0d9
core, ethclient: implement Metropolis EIP 98 ( #14750 )
...
Implements ethereum/EIPs#98
2017-07-17 10:34:53 +02:00
Martin Holst Swende
47359301a2
core: blocknumber in genesis as hex ( #14812 )
2017-07-17 10:33:13 +02:00
Péter Szilágyi
0ff35e170d
core: remove redundant storage of transactions and receipts ( #14801 )
...
* core: remove redundant storage of transactions and receipts
* core, eth, internal: new transaction schema usage polishes
* eth: implement upgrade mechanism for db deduplication
* core, eth: drop old sequential key db upgrader
* eth: close last iterator on successful db upgrage
* core: prefix the lookup entries to make their purpose clearer
2017-07-14 19:39:53 +03:00
Felix Lange
225de7ca0a
tests: update tests and implement general state tests ( #14734 )
...
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.
2017-07-11 13:49:14 +02:00
Péter Szilágyi
4f7a38001f
Merge pull request #14737 from holiman/txpool_localaccounts
...
Txpool localaccounts
2017-07-10 12:43:23 +03:00
Péter Szilágyi
34ec9913f6
core: test locals support in txpool queue limits, fix
...
The commit reworks the transaction pool queue limitation tests
to cater for testing local accounts, also testing the nolocal flag.
In addition, it also fixes a panic if local transactions exceeded
the global queue allowance (no accounts left to drop from) and also
fixes queue eviction to operate on all accounts, not just the one
being updated.
2017-07-06 11:51:59 +03:00
ligi
f25486c3fb
core: fix typo in error message ( #14763 )
2017-07-06 00:19:38 +02:00
Péter Szilágyi
88b4fe7d21
core: handle nolocals during add, exepmt locals from expiration
2017-07-05 17:16:42 +03:00
Péter Szilágyi
5e38f7a664
cmd, core: add --txpool.nolocals to disable local price exemptions
2017-07-05 17:06:05 +03:00
Péter Szilágyi
48ee7f9de7
core, eth, les: polish txpool API around local/remote txs
2017-07-05 16:51:55 +03:00
Péter Szilágyi
8f12d76a47
params: remove redundant consts, disable metro on AllProtocolChanges
2017-07-04 12:28:58 +03:00
Martin Holst Swende
a633a2d7ea
core: Prevent local tx:s from being discarded
2017-06-30 22:55:10 +02:00
Martin Holst Swende
67aff49822
core: Change local-handling to use sender-account instead of tx hashes
2017-06-30 22:43:26 +02:00
Péter Szilágyi
8c313eed26
consensus, core: EIP 100 polishes, fix chain maker diff
...
This PR polishes the EIP 100 difficulty adjustment algorithm
to match the same mechanisms as the Homestead was implemented
to keep the code uniform. It also avoids a few memory allocs
by reusing big1 and big2, pulling it out of the common package
and into ethash.
The commit also fixes chain maker to forward the uncle hash
when creating a simulated chain (it wasn't needed until now
so we just skipped a copy there).
2017-06-30 16:42:09 +03:00
Martin Holst Swende
8bbd598ef4
core: fix an off-by-one when the block import counts blocks
2017-06-29 14:19:10 +02:00
Péter Szilágyi
dfd076244d
Merge pull request #14718 from holiman/gascalc_fix
...
core/vm: fix overflow in gas calculation formula
2017-06-28 13:12:13 +03:00
Martin Holst Swende
6dc32e897a
core/vm: add benchmarks for some ops and precompiles ( #14641 )
2017-06-28 11:45:45 +02:00
Martin Holst Swende
e4301564c2
core/vm : fix testcase for gas calculation
2017-06-28 10:47:07 +02:00
Martin Holst Swende
bae7565231
core/vm: fix overflow in gas calculation formula
2017-06-28 09:51:31 +02:00
Felix Lange
9e5f03b6c4
core/state: access trie through Database interface, track errors ( #14589 )
...
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).
2017-06-27 15:57:06 +02:00
Péter Szilágyi
f321ed23fb
Merge pull request #14687 from markya0616/unused_events
...
core: remove unused events
2017-06-26 13:27:39 +03:00
mark.lin
beb708e6d7
core: remove unused events
2017-06-23 10:39:38 +08:00
Péter Szilágyi
b664bedcf2
Merge pull request #14673 from holiman/txfix
...
core: add testcase for txpool
2017-06-22 23:01:43 +03:00
Péter Szilágyi
eebde1a2e2
core: ensure transactions correctly drop on pool limiting
2017-06-22 21:03:54 +03:00
Martin Holst Swende
b0b3cf2eeb
core: add testcase for txpool
2017-06-22 20:36:07 +03:00
Felix Lange
0042f13d47
eth/downloader: separate state sync from queue ( #14460 )
...
* eth/downloader: separate state sync from queue
Scheduling of state node downloads hogged the downloader queue lock when
new requests were scheduled. This caused timeouts for other requests.
With this change, state sync is fully independent of all other downloads
and doesn't involve the queue at all.
State sync is started and checked on in processContent. This is slightly
awkward because processContent doesn't have a select loop. Instead, the
queue is closed by an auxiliary goroutine when state sync fails. We
tried several alternatives to this but settled on the current approach
because it's the least amount of change overall.
Handling of the pivot block has changed slightly: the queue previously
prevented import of pivot block receipts before the state of the pivot
block was available. In this commit, the receipt will be imported before
the state. This causes an annoyance where the pivot block is committed
as fast block head even when state downloads fail. Stay tuned for more
updates in this area ;)
* eth/downloader: remove cancelTimeout channel
* eth/downloader: retry state requests on timeout
* eth/downloader: improve comment
* eth/downloader: mark peers idle when state sync is done
* eth/downloader: move pivot block splitting to processContent
This change also ensures that pivot block receipts aren't imported
before the pivot block itself.
* eth/downloader: limit state node retries
* eth/downloader: improve state node error handling and retry check
* eth/downloader: remove maxStateNodeRetries
It fails the sync too much.
* eth/downloader: remove last use of cancelCh in statesync.go
Fixes TestDeliverHeadersHang*Fast and (hopefully)
the weird cancellation behaviour at the end of fast sync.
* eth/downloader: fix leak in runStateSync
* eth/downloader: don't run processFullSyncContent in LightSync mode
* eth/downloader: improve comments
* eth/downloader: fix vet, megacheck
* eth/downloader: remove unrequested tasks anyway
* eth/downloader, trie: various polishes around duplicate items
This commit explicitly tracks duplicate and unexpected state
delieveries done against a trie Sync structure, also adding
there to import info logs.
The commit moves the db batch used to commit trie changes one
level deeper so its flushed after every node insertion. This
is needed to avoid a lot of duplicate retrievals caused by
inconsistencies between Sync internals and database. A better
approach is to track not-yet-written states in trie.Sync and
flush on commit, but I'm focuing on correctness first now.
The commit fixes a regression around pivot block fail count.
The counter previously was reset to 1 if and only if a sync
cycle progressed (inserted at least 1 entry to the database).
The current code reset it already if a node was delivered,
which is not stong enough, because unless it ends up written
to disk, an attacker can just loop and attack ad infinitum.
The commit also fixes a regression around state deliveries
and timeouts. The old downloader tracked if a delivery is
stale (none of the deliveries were requestedt), in which
case it didn't mark the node idle and did not send further
requests, since it signals a past timeout. The current code
did mark it idle even on stale deliveries, which eventually
caused two requests to be in flight at the same time, making
the deliveries always stale and mass duplicating retrievals
between multiple peers.
* eth/downloader: fix state request leak
This commit fixes the hang seen sometimes while doing the state
sync. The cause of the hang was a rare combination of events:
request state data from peer, peer drops and reconnects almost
immediately. This caused a new download task to be assigned to
the peer, overwriting the old one still waiting for a timeout,
which in turned leaked the requests out, never to be retried.
The fix is to ensure that a task assignment moves any pending
one back into the retry queue.
The commit also fixes a regression with peer dropping due to
stalls. The current code considered a peer stalling if they
timed out delivering 1 item. However, the downloader never
requests only one, the minimum is 2 (attempt to fine tune
estimated latency/bandwidth). The fix is simply to drop if
a timeout is detected at 2 items.
Apart from the above bugfixes, the commit contains some code
polishes I made while debugging the hang.
* core, eth, trie: support batched trie sync db writes
* trie: rename SyncMemCache to syncMemBatch
2017-06-22 15:26:03 +03:00
Martin Holst Swende
9a44e1035e
cmd/evm, core/vm: add --nomemory, --nostack to evm ( #14617 )
2017-06-21 14:52:31 +02:00
Péter Szilágyi
335abdceb1
Merge pull request #14581 from holiman/byte_opt
...
core/vm: improve opByte
2017-06-13 14:44:19 +03:00
Martin Holst Swende
ac9865791a
core/vm, common/math: Add doc about Byte, fix format
2017-06-08 23:16:05 +02:00
Martin Holst Swende
80f7c6c299
cmd/evm: add --prestate, --sender, --json flags for fuzzing ( #14476 )
2017-06-07 17:09:08 +02:00
bailantaotao
bc24b7a912
core/types: use Header.Hash for block hashes ( #14587 )
...
Fixes #14586
2017-06-07 12:06:25 +02:00
Martin Holst Swende
1496b3aff6
common/math, core/vm: Un-expose bigEndianByteAt, use correct terms for endianness
2017-06-06 18:38:38 +02:00
Lewis Marshall
04d2de9119
core: Fix VM error logging
...
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-06-05 23:51:32 +01:00
Martin Holst Swende
f4b5f67ee0
core/vm: improved jumpdest analysis
2017-06-05 09:15:46 +02:00
Martin Holst Swende
3285a0fda3
core/vm, common/math: Add fast getByte for bigints, improve opByte
2017-06-05 08:44:11 +02:00
Nick Johnson
d5a79934dc
core/vm: Use a bitmap instead of a map for jumpdest analysis
...
t push --force
2017-06-01 19:14:05 +01:00
Péter Szilágyi
cba33029a8
core: only reorg changed account, not all
2017-05-31 23:26:24 +03:00
Péter Szilágyi
9702badd83
core: don't uselessly recheck transactions on dump
2017-05-31 21:29:50 +03:00
Péter Szilágyi
280609c99b
core: check for gas limit exceeding txs too on new block
2017-05-30 00:31:37 +03:00
Péter Szilágyi
08959bbc70
cmd, core, eth: configurable txpool parameters
2017-05-29 11:29:46 +03:00
Péter Szilágyi
c98bce709c
core: fix minor accidental typos and comment errors
2017-05-25 17:22:45 +03:00
changhong
17f0b11942
core: typos and comments improve
...
1. fix typos
2. methods recevier of struct should be same
3. comments improve
(cherry picked from commit 1ba9795395 )
2017-05-25 17:14:33 +03:00
Jeffrey Wilcke
846d091bd2
core/vm: allocate stack to 1024
...
Pre allocate the stack to 1024 optimising stack pushing, reducing calls
to runtime.makeslice and runtime.mallocgc
2017-05-25 11:37:04 +02:00
Felix Lange
ef25b826e6
Merge pull request #14502 from karalabe/mobile-import-ecdsa
...
Enforce 256 bit keys on raw import, support raw mobile imports
2017-05-24 22:30:47 +02:00
Péter Szilágyi
aa73420207
accounts/keystore, crypto: enforce 256 bit keys on import
2017-05-23 14:58:03 +03:00
Jeffrey Wilcke
10582a97ca
core/vm: expose intpool to stack dup method
...
Improve the duplication method of the stack to reuse big ints by passing
in an existing integer pool.
2017-05-23 10:52:11 +02:00
Jeffrey Wilcke
e16a7ef60f
core/vm: capped int pool
2017-05-23 10:40:09 +02:00
Jeffrey Wilcke
a816e75662
core/vm: improved push instructions
...
Improved push instructions by removing unnecessary big int allocations
and by making it int instead of big.Int
2017-05-23 10:39:53 +02:00
Valentin Wüstholz
04b668b232
core/vm: improve error message for invalid opcodes
2017-05-22 17:48:07 +02:00
Jeffrey Wilcke
e7119ce12d
core/state: fixed (self)destructed objects
...
Add the object to the list of destructed objects during a selfdestruct /
suicide operation and also remove it from the list once the journal
reverts.
2017-05-18 09:05:58 +02:00
Jeffrey Wilcke
a5f6a1cb7c
consensus, core, core/vm, parems: review fixes
2017-05-18 09:05:58 +02:00
Jeffrey Wilcke
e6aff513db
core/types: corrected abstract signing address
2017-05-18 09:05:58 +02:00
Jeffrey Wilcke
10a57fc3d4
consensus, core/*, params: metropolis preparation refactor
...
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)
2017-05-18 09:05:58 +02:00
Péter Szilágyi
a2f23ca9b1
cmd, core, eth, miner: remove txpool gas price limits ( #14442 )
2017-05-16 21:07:27 +02:00
Péter Szilágyi
60293820b7
core: fix processing regression during receipt import
2017-05-08 12:09:35 +03:00
Péter Szilágyi
d51a9fd6b7
cmd, core, params: add --rinkeby flag for fast connectivity
2017-05-04 12:36:20 +03:00
Péter Szilágyi
ba3bcd16a6
Merge pull request #14350 from fjl/trie-iterator-skip-2
...
eth: add debug_storageRangeAt
2017-04-25 11:10:20 +03:00
Felix Lange
207bd7d2cd
eth: add debug_storageRangeAt
2017-04-25 02:14:32 +02:00
Felix Lange
4047ccad2f
trie: add start key to NodeIterator constructors
...
The 'step' method is split into two parts, 'peek' and 'push'. peek
returns the next state but doesn't make it current.
The end of iteration was previously tracked by setting 'trie' to nil.
End of iteration is now tracked using the 'iteratorEnd' error, which is
slightly cleaner and requires less code.
2017-04-25 02:14:31 +02:00
Felix Lange
a13e920af0
trie: clean up iterator constructors
...
Make it so each iterator has exactly one public constructor:
- NodeIterators can be created through a method.
- Iterators can be created through NewIterator on any NodeIterator.
2017-04-25 02:14:31 +02:00
Felix Lange
7b2fc0643f
core, light: delete SplitStatTy, ChainSplitEvent (unused)
2017-04-21 18:56:00 +02:00
Péter Szilágyi
edef84da2b
core: make genesis incompatibility error more explicit
2017-04-20 14:14:13 +03:00