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
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
Daniel Liu
ffa38cd8d1
fix bug and eliminate loop in func PadTo32Bytes
2024-01-24 16:31:13 +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
wgr523
3e0505a0c7
cherry-pick from d8ada03eac ( #255 )
2023-05-25 14:23:27 +10:00
Jianrong
acc2e411a6
fix or skip tests due to PR-136 change
2021-10-20 20:17:47 +11:00
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
571c41f891
FIx Bad block error.
2021-09-17 17:59:06 +05:30
dev-vadim
dbe8c9d984
upgrade XDC.Network with v1.8.27.
2020-12-23 16:32:06 +05:30
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
Dave McGregor
33d233d3e1
vendor, crypto, swarm: switch over to upstream sha3 package
2019-01-04 09:26:07 +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
Martin Holst Swende
7c657fc789
tests, core: update tests and make STATICCALL cause touch-delete ( #18187 )
2018-11-29 10:51:57 +02: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
Martin Holst Swende
1b6fd032e3
core/vm: check empty in extcodehash
2018-10-26 08:56:37 +02:00
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
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
Martin Holst Swende
a352de6a08
core/vm: add shortcuts for trivial exp cases ( #16851 )
2018-10-16 00:51:39 +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