Commit Graph

2367 Commits

Author SHA1 Message Date
Andrew Ashikhmin
d14c223881
Simplify miner gas limit post EIP-1559. Default to 30M (#3205) 2022-01-05 16:36:24 +07:00
Alex Sharov
156287a982
Sanity check p2p block (#3197) 2022-01-04 15:46:22 +07:00
Alexandr Borodulin
8203cdf4cd
Added salt to starknet transaction for cairo contract address generation (#3178)
Co-authored-by: Aleksandr Borodulin <a.borodulin@axioma.lv>
2022-01-03 12:32:22 +07:00
Alex Sharov
40205fb7ca
Torrent: continue download after reboot, --torrent.verbosity flag (#3161) 2021-12-24 10:44:14 +07:00
Giulio rebuffo
c596bb4306
Added WatchTheBurnStage + erigon_watchTheBurn json rpc call (#3137)
* added blockIssuance type

* added stage

* bug fixing

* simplifications

* minimalised

* fixed burned computation

* stage complete

* stage issuance

* reposition

* finished

* lint
2021-12-16 22:08:27 +00:00
brendan-kelly
3d048b7f1a
Add chain config and CLI changes for Binance Smart Chain support (#3131)
* Add chain config and CLI changes for Binance Smart Chain support

* Remove BSC hashes for now

* Add an if statement for BSC forks

* Fix up if statement

* Compiles

* Remove extra dependencies from go.mod/go.sum

* Add a TODO

* Potentially fix the tests
2021-12-16 07:26:44 +00:00
Frojdi Dymylja
499c27d2e1
change: port js tracer changes (#3128)
* change: expose callCtx as ScopeContext

* change: update tracer API

* change: logger API
update: jst tracer

* add: port jst tracer 2

* add: port jst tracer 3

* add: access list tracer

* chore: lint
2021-12-15 13:19:58 +00:00
ledgerwatch
d836e9e2d7
[beta] Skip analysis and preverified hashes (#3130)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-12-14 21:55:47 +00:00
ledgerwatch
bcdff3cb9b
Txpool tracing by sender addresses (#3113)
* Txpool tracing by sender addresses

* Update to latest erigon-lib

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-12-14 16:15:54 +00:00
Andrew Ashikhmin
d739810dc5
Serenity engine: fall back to eth1 engine before the Merge (#3112)
* (EIP-4399) MixDigest is utilized for RANDOM

* Add GetTd to ChainHeaderReader

* Remove unused VerifyHeaders from consensus consensus

* Introduce params.MaxGasLimit

* Serenity engine: fall back to eth1 engine before the Merge

* Serenity engine in CreateConsensusEngine

* ethOne -> eth1Engine
2021-12-13 18:29:38 +01:00
Alexandr Borodulin
22a9a9b27d
Add error tests for starknet_sendRawTransaction method (#3102)
* Add error tests for starknet_sendRawTransaction method

* Noop tx pool

* Rename cairo tx to starknet tx, refactor starknet send raw transaction test

* Remove noop tx pool

* Transaction struct

Co-authored-by: Aleksandr Borodulin <a.borodulin@axioma.lv>
2021-12-12 22:24:21 +00:00
brendan-kelly
ee99f17fbe
Add Parlia consensus engine for Binance Smart Chain support (#3086)
* Add Parlia consensus engine for Binance Smart Chain support

* Leave RamanujanBlock as nil in params/config.go

* Run `go fmt` on files needing it

* Add comment for PoSA

* Remove empty branches and ineffectual assignments in parlia.go

* Remove commented imports

* Fix compilation error

* Remove EIP155Signer in transaction_signing.go

* Fix compilation issue

* Fix go fmt issues

* Remove Ramanujan from print statement

* Remove references to EthAPIBackend approach

* Fix Finalize method across consensus engines

* Run go fmt

* More linting

* Remove more changes

* remove a comment

* Remove unneeded hashing function

* Remove bytes check and fix actual vs expected mistake
2021-12-11 00:07:10 +00:00
Andrew Ashikhmin
d0dbf014f3
Update consensus tests to 10.2. EIP-2681 (#3103)
* ArrowGlacier fork config

* core/vm: implement EIP-2681: Limit account nonce to 2^64-1 (#23853)

This retroactively implements requirements or EIP-2681 for the account nonce upper limit.

* Update consesus tests to 10.2

* Handle TransactionWithHighNonce64Minus1

* Check intrinsic gas in transaction tests

* Refactor overflow protection in IntrinsicGas

* Remove remnants of vm tests

* Update difficulty tests to the new format

Co-authored-by: Andrei Maiboroda <andrei@ethereum.org>
2021-12-07 18:24:59 +01:00
Alexandr Borodulin
bbb3cc978f
Starknet getcode (#3038)
* deploy_cairo_smartcontract

* deploy_cairo_smartcontract / 2

Add new transaction type for cairo and vm factory

* starknet_getcode

* deploy_cairo_smartcontract / 3

* deploy_cairo_smartcontract / 4

* deploy_cairo_smartcontract / 5

Co-authored-by: Aleksandr Borodulin <a.borodulin@axioma.lv>
2021-12-06 14:58:53 +00:00
ledgerwatch
494853ae39
Update skip analysis and preverified hashes (#3097)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-12-06 12:40:06 +00:00
Andrew Ashikhmin
759fb00593
[beta] Stricter uint256 RLP decoding. Update consensus tests to 10.1 (#3089)
* Clean up test runners. Don't run legacy tests

* Cherry pick https://github.com/ethereum/go-ethereum/pull/22927

* Tests update 10.1: Transaction Tests

* Port decodeBigInt changes to decodeUint256

* Introduce (*Stream) Uint256Bytes

* Temporarily disable stTransactionTest/HighGasPrice

* linter

* ttWrongRLP transaction tests pass now

* Fix stTransactionTest/HighGasPrice

Co-authored-by: Felix Lange <fjl@twurst.com>
2021-12-06 08:00:54 +00:00
Alex Sharov
178fd1931d
Genesis sync from existing snapshots (#3087) 2021-12-05 09:03:08 +07:00
Giulio rebuffo
3c95db0078
Fixed Proof-of-stake transition (#3075)
* added download channel to stage headers

* added direct execution

* now channel of headers rather than bodies

* simplifications

* fixed ttd headerForward

* garbage removed

* added some more stepping stones

* better transition

* covered edge case

* added names to returned values

* clean
2021-12-03 11:55:00 +01:00
Andrew Ashikhmin
094ab5e77d
[EIP-4399] Remove newly added Header.Random (reuse mixHash instead) (#3069)
* [EIP-4399] Remove newly added Header.Random (reuse mixHash instead)

* add a TODO

* Update mock payload hashes
2021-12-01 13:41:31 +01:00
Giulio rebuffo
d7ee2b1447
Merge pull request #2997 from ledgerwatch/enginev1
Added ExecutePayloadV1 to engine_ namespace [the merge]
2021-11-30 19:21:17 +01:00
TBC Dev
e98f39b2c4
Fix Header.EncodingSize() to match EncodeRLP() with EIP-3675 (#3053)
* Fix Header.EncodingSize() to match EncodeRLP() with EIP-3675

* Fix error messages for Random in DecodeRLP()
2021-11-30 14:23:34 +00:00
ledgerwatch
feebc7d3e6
save (#3059) (#3060)
Co-authored-by: Alex Sharov <AskAlexSharov@gmail.com>
2021-11-30 12:36:01 +00:00
TBC Dev
5eca3beea9
Avoid redundant BitLen() (#3056)
* Prefer uint256.IsZero() or big.Sign() for 0-testing over BitLen()

* Avoid redundant BitLen()
2021-11-29 22:35:51 +00:00
Giulio Rebuffo
e76bc807bb better api 2021-11-29 15:47:08 +01:00
TBC Dev
ae4819ddad
Prefer Block.NumberU64() over Block.Number.Uint64() (#3051) 2021-11-29 11:32:41 +00:00
Giulio rebuffo
cfed35921c
Merge branch 'devel' into enginev1 2021-11-29 09:57:56 +01:00
TBC Dev
57d641b6f9
Avoid redundant Block.Header() deep-copy (#3050)
* Add separate Block.Nonce() and Block.NonceU64()

* Add Block.Seal()

* Avoid redundant Block.Header() deep-copy

* Add warning comment for Block.Header()
2021-11-29 08:52:36 +00:00
ledgerwatch
c3e361eadb
Update skip analysis and preverified (#3045)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-11-28 12:59:11 +00:00
TBC Dev
2f0758e817
ChainSegment efficiency (#3042)
* De-dup blockHeaders66() and blockHeaders65()

* Simplify loops and EOL detection

* Add ChainSegmentHeader struct and refactor

* Add RawRlpHash() to avoid re-encode for header hash

* Avoid multiple redundant rlpHash()

* Sort headers by height,hash to make dups consecutive

* Flip condition to reduce map lookups

* Remove redundant check

* Use rlp.RawValue rather than []byte to help self-document
2021-11-27 17:28:17 +00:00
Giulio Rebuffo
768617f412 added proper errors 2021-11-24 23:19:40 +01:00
Giulio Rebuffo
435d1d1519 channels implemented 2021-11-24 23:00:00 +01:00
Alex Sharov
6d24a30a01
Drop txpool v1 (#3017)
* drop_txpool_v1

* drop_txpool_v1

Co-authored-by: Alex Sharp <alexsharp@alexs-macbook-pro.home>
2021-11-22 18:38:51 +00:00
Giulio Rebuffo
21cbc19f21 using batch over tx 2021-11-21 23:11:50 +01:00
Giulio Rebuffo
23883d9104 merge 2021-11-21 21:55:41 +01:00
ledgerwatch
f0ca5eacd8
Update skip_analysis.go (#3009) 2021-11-21 16:43:47 +00:00
ledgerwatch
b073787f1d
eth_getTransactionReceipt not to return unrelated txs (#2998)
* Cleanup

* Restore

* Fix for existing tx

* Cleanup

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-11-21 09:22:29 +00:00
Giulio Rebuffo
224441cb07 initial commit2 2021-11-20 17:27:11 +01:00
Alex Sharov
5b634a790e
Canonical tx ids (#2986)
* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save
2021-11-18 14:07:55 +00:00
Giulio rebuffo
44fe9765f3
Merge pull request #2978 from ledgerwatch/eip4399
[Eip4399 part 3/3] Supplant DIFFICULTY opcode with RANDOM
2021-11-17 19:47:11 +01:00
Giulio rebuffo
e6916d4d00
[EIP-4399 2/3] Added total difficulty stage and transition logic (#2964)
* added diff stage

* added td stage

* improvements + more tests

* added err check

* added err check

* transition raw interfaces

* interface for transition

* unwind updates

* maybe this fix

* now fixed?

* fixes

* better db-format

* better db-format

* sum and mod

* sum and mod

* fixed headers unwind
2021-11-17 15:50:41 +00:00
ledgerwatch
2ad6ca10cf
Ropsten and main net preverified hashes, skip analysis (#2973)
* Ropsten preverified hashes

* Pre-verified hashes for mainnet, skip analysis

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-11-16 20:14:26 +00:00
Giulio Rebuffo
94d477cdd9 EIP 4399 finalized 2021-11-15 21:23:56 +01:00
alex.sharov
bca0d1d473 Increase default txpool size 2021-11-15 10:16:03 +07:00
Giulio rebuffo
0b1027ea2c
added random field to block type (#2962) 2021-11-15 10:05:53 +07:00
TBC Dev
9e5ae33eb0
Use IsZero() instead of Sign() for uint256.int (#2960) 2021-11-14 22:18:47 +07:00
ledgerwatch
c0fffb6f0a
Update skip_analysis.go (#2915) 2021-11-04 11:15:01 +00:00
Alex Sharov
1a45f26a7c
move (#2910) 2021-11-04 08:25:40 +00:00
Andrew Ashikhmin
1214302a19
Arrow Glacier network upgrade (#2896) 2021-10-31 20:31:18 +07:00
ledgerwatch
3f21910963
Update preverified headers (main net, roosten), update skip analysis block (#2875)
* Preverified headers

* Update skip analysis

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-10-27 17:16:20 +01:00
Alex Sharov
a28a0b7744
PoolV2: set default limit to sub-pools 10K (#2855) 2021-10-21 15:59:39 +07:00