* added new api to support conditional transactions (EIP-4337) (#700)
* Refactored the code and updated the miner to check for the validity of options (#793)
* refactored the code and updated the miner to check for the validity of options
* added new errors -32003 and -32005
* added unit tests
* addressed comments
* Aa 4337 update generics (#799)
* poc
* minor bug fix
* use common.Hash
* updated UnmarshalJSON function (reference - tynes)
* fix
* done
* linters
* with test
* undo some unintentional changes
---------
Co-authored-by: Pratik Patil <pratikspatil024@gmail.com>
* handelling the block range and timestamp range, also made timestamp a pointer
---------
Co-authored-by: Evgeny Danilenko <6655321@bk.ru>
* Added filtering of conditional transactions in txpool (#920)
* added filtering of conditional transactions in txpool
* minor fix in ValidateKnownAccounts
* bug fix
* Supporting nil knownAccounts
* lints
* bundled transactions are not announced/broadcasted to the peers
* fixed after upstream merge
* few fixes
* sentry reject conditional transaction
* Changed the namespace of conditional transaction API from `eth` to `bor` (#985)
* added conditional transaction to bor namespace
* test comit
* test comit
* added conditional transaction
* namespapce changed to bor
* cleanup
* cleanup
* addressed comments
* reverted changes in ValidateKnownAccounts
* addressed comments and removed unwanted code
* addressed comments
* bug fix
* lint
* removed licence from core/types/transaction_conditional_test.go
---------
Co-authored-by: Evgeny Danilenko <6655321@bk.ru>
Prior to this change, it was possible that transactions are erroneously deemed as 'future' although they are in fact 'pending', causing them to be dropped due to 'future' not being allowed to replace 'pending'.
This change fixes that, by doing a more in-depth inspection of the queue.
Currently, most of transaction validation while holding the txpool mutex: one exception being an early-on signature check.
This PR changes that, so that we do all non-stateful checks before we entering the mutex area. This means they can be performed in parallel, and to enable that, certain fields have been made atomic bools and uint64.
This adds two new rules to the transaction pool:
- A future transaction can not evict a pending transaction.
- A transaction can not overspend available funds of a sender.
---
Co-authored-by: dwn1998 <42262393+dwn1998@users.noreply.github.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
* common, core, eth, les, trie: make prque generic
* les/vflux/server: fixed issues in priorityPool
* common, core, eth, les, trie: make priority also generic in prque
* les/flowcontrol: add test case for priority accumulator overflow
* les/flowcontrol: avoid priority value overflow
* common/prque: use int priority in some tests
No need to convert to int64 when we can just change the type used by the
queue.
* common/prque: remove comment about int64 range
---------
Co-authored-by: Zsolt Felfoldi <zsfelfoldi@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
This PR changes the API so that uint64 is used for fork timestamps.
It's a good choice because types.Header also uses uint64 for time.
Co-authored-by: Felix Lange <fjl@twurst.com>
Implementation of https://eips.ethereum.org/EIPS/eip-3860, limit and meter initcode. This PR enables EIP-3860 as part of the Shanghai fork.
Co-authored-by: lightclient@protonmail.com <lightclient@protonmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>