Ömer Faruk Irmak
e9259b783f
feat: implement and integrate counter-based CCC ( #982 )
...
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
Co-authored-by: Zhang Zhuo <mycinbrin@gmail.com>
Co-authored-by: Xi Lin <zimpha@gmail.com>
2024-09-04 13:33:51 +03:00
Péter Garamvölgyi
bfe803001b
feat: update L1 data fee in Curie hard fork ( #755 )
...
* update fee calculation
* add missing GPO slots to trace
* add placeholder for contract update logic
* nit
* update fee calculation
* update formula
* update GPO slots
* update L1GPO bytecode
* apply Curie in new worker
* move bytecode to config
* create an empty block for curie hard fork
* initialize L1GasPriceOracle storage slots
* add comments
* add test
* add IsCurie to traces and tests
* group GPO storage slots into a struct
* update unit test
* chore: auto version bump [bot]
* trigger ci
* update bytecode
* remove leading 0x
* update comments
* include rollup fee tests in CI
---------
Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com>
Co-authored-by: Thegaram <Thegaram@users.noreply.github.com>
2024-05-28 14:12:39 +02:00
Péter Garamvölgyi
0f0cd99f7a
feat: update upcoming fork names ( #680 )
...
* feat: update upcoming fork names
* bump version
* Apply suggestions from code review
Co-authored-by: Nazarii Denha <dengaaa2002@gmail.com>
* bump version
---------
Co-authored-by: Nazarii Denha <dengaaa2002@gmail.com>
2024-03-26 14:41:32 +00:00
Péter Garamvölgyi
ccec84ce63
feat: re-enable EIP-1559 in Banach hard fork ( #634 )
...
* feat: re-enable EIP-1559 in Banach hard fork
* enable BASEFEE opcode
* do not double gas limit on Banach fork block
* do not burn base fee
* update base fee calculation logic
* fix gas price oracle
* fix ethapi backend
* typo
* reorder worker code
* update genesis base fee
* add MaximumL2BaseFee
* add base fee metrics
* handle nil base fee
* revert state-transition change
* bump version
* remove TODO
* update test
* fix typo
* fix typo
* update traces
* fix test
* update london to banach
* handle error
* bump version
* bump version
2024-03-11 13:57:52 +00:00
HAOYUatHZ
88349c600d
feat: add mux tracer for native call tracer and native prestate tracers ( #615 )
...
* hack to use native tracers
* update
* fix
* add prestate
* fix marshal
* format
* draft
* move
* separate `MuxTracer`
* fix
* update miner/worker.go
* update api
* rename
* remove
* bump go version
* bump golangci
* goimports lint
* fix tests
* minor
* clean up
* fix tests
* sync error handling
* bump go version in Dockerfiles
* bump version
* lint: disable `goconst` & `goimports`
* bump version again
* add comments
---------
Co-authored-by: lightsing <light.tsing@gmail.com>
2024-01-18 14:58:27 +08:00
Haichen Shen
e8d9d60cf0
fix: use FeeVault address in the EVM BlockContext ( #473 )
...
* fix: use Feevault address in the EVM BlockContext
* bump version
* revert format change
* fix
2023-08-19 14:01:14 +02:00
HAOYUatHZ
2f9edf73ca
feat(rollup): add circuits capacity checker ( #321 )
...
* add proof for predeployed storages
* reverse inneeded code
* update for mainbranch merging
* add pertx storage trace
* dummy tx proof
* add txstorage trace
* add coinbase storage as trace
* enable (sync) tracing by default
* basic
* init cgo framework
* fix break loop
* integrate the right zkevm version (#323 )
* finish rust codes
* use dylib (#325 )
* flip
* ?
* use cdylib
* revert
* fix
* apply_tx
* rename
* fixing types
fixing types
fixing types
* clean up
* ExecutionResults (#328 )
* filling
* filling
* more
* clean up
* filling
* coinbase
* add
* MPTWitness
* ExecutionResults WIP
* L1fee
L1fee
* sender
* to
* Failed & ReturnValue
* createdAcc & after
* remove MPTWitness
* txStorageTrace
* add FeeRecipient
* add StorageTrace
* fix FFI types
* better logger
* cargo fmt
* fix
* add build tags
* update Makefile
* fix library
* improve ld path
* correctly deal with circuit_capacity_checker returned result
* fix return value
* update cargo (#333 )
* update cargo
* update
* update go
* refactor
* raname `circuits capacity checker` to `circuit capacity checker`
* some refactorings
* [Fix] storage proof generation in capacity checker (#348 )
* make per-tx storage and deletion proof work
* format
* fix misplaced markdeletion
---------
Co-authored-by: HAOYUatHZ <haoyu@protonmail.com>
* docker (#363 )
* update Dockerfile
* build: update go version to 1.19
* update
* fix
* fix
* try
* simplify
* revert go version
update l2geth Dockerfiles
* fix
* fix coinbase
* fix (#369 )
* format
* Update version.go
* address comments
* Capacity refactor (#374 )
* init
* id
* support multiple instances
* fix id
* fix conflicts
* refactor to use same codes (#379 )
* re-init
* WIP
* WIP
* refactor
* go
* minor
* fix storage proof of l1gas price oracle
* move 1
* move 2
* move 3
* move 4
* move 5
move 5
* move 6
move 6
* move 7
* move 8
* move 9
* move 10
* clean up
clean up
---------
Co-authored-by: Ho Vei <noelwei@gmail.com>
* finish basic
* minor
* config capacity check in block_validator (#380 )
* init
* done
ref
* fix tests
fix tests
fix tests
fix tests
* add more comments
* apply_block
* improve logs
* cargo fmt
* Capacity big refactor (#383 )
* CreateTraceEnv
* WIP
* draft
more
fix
* for test
* fortet
* clean up
* add more comments
* goimports -local github.com/scroll-tech/go-ethereum -w .
* fix typos
* attempt 1
* attempt 2
* attempt 3
* gogogo
* clean up
* fix
* fix
* rename
* minor
* fix
* minor
* minor
* improve doc
* use dedicated `checkCircuitCapacity` flag (#394 )
* refactor
* fix
* add lock
* [feat] capacity checking: upgrade libzkp (#395 )
* upgrade
* upgrade libzkp
* write RowConsumption (#396 )
* write RowConsumption
* name alignments
* revert some formatting
* add lock to CircuitCapacityChecker in BlockValidator
* remove mutex pointer
* improve github workflow
* improve
* store row consumption in mining (#397 )
* prepare
* finish
* add more logs
* mark `ApplyBlock` as ready
* update libzkp (#401 )
* fix
* Capacity detail (#402 )
* fix(block-validation): consider skipping in ValidateL1Messages (#405 )
* fix(block-validation): consider skipping in ValidateL1Messages
* fix(block): consider skipping in L1MessageCount
* fix l1 validation tests
* fix NumL1Messages
* fix impl.go return types
fix
* better error handling (#407 )
* add
add
* add
* add
* add
* add
* cargo fmt
* add
* update
* add
* WIP
* minor
* gogogo
* gogogo
* fix
* fix
* fix
* cargo clippy
* improve
* improve
* creation lock (#408 )
* creation lock
* update
* Debug log (#409 )
* add more logs
* more
* more
* fix
* improve
* Update cmd/utils/flags.go
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
* refactor worker.commit()
* avoid re-calculate
* txpool ccc err handling (#411 )
* more explicit error comments
* add more logs
* fix unnecessary commit
* add more logs
* fix `ineffassign`
* add more comments
* log id for `NewCircuitCapacityChecker` (#414 )
add log to `NewCircuitCapacityChecker`
* Persist skip info for block where all L1 msgs are skipped (#415 )
persist skip info for block where all L1 msgs are skipped
* Update version.go
---------
Co-authored-by: Ho Vei <noelwei@gmail.com>
Co-authored-by: Zhang Zhuo <mycinbrin@gmail.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
2023-08-01 13:52:31 +08:00
maskpp
43be9a6450
feat(abigen): Add flag let be able to add user tmpl file. ( #362 )
...
* Add user tmpl file.
* Update accounts/abi/bind/template.go
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
* Update cmd/abigen/main.go
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
* Update cmd/abigen/main.go
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
* Update cmd/abigen/main.go
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
* fix bug
---------
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
2023-06-19 11:32:20 +08:00
HAOYUatHZ
f055f50f9d
feat: update l1fee calculation ( #351 )
2023-06-13 10:57:59 +08:00
Péter Garamvölgyi
983d630244
feat: Sync and relay L1 messages ( #350 )
...
* add l1 config in genesis config (#249 )
* add l1 config in genesis config
* fix lint
* Update params/config.go
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
---------
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
* extend node configuration (#251 )
* extend node configuration
* use block number instead of hash
* accept safe, finalized and numbers for L1Confirmations
* fix typos
---------
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
* Fix/improve node config parsing (#260 )
* raise error on failed parsing
* default value
* add l1-message-type, transaction methods (#252 )
* add l1-message-type, transaction methods
* goimports
* Update core/types/transaction.go
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
* txpool l1 check, pointer change, marhsal test
* draft: start implementing l1message gas behavior
* draft: start implementing l1message gas behavior
* change to gas usage
* error comment typo
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* goimports
* update nonce, add hash test (fails), marshal test
* goimports
* target addr cant be nil
* change call msg
* comment out test
* lint
---------
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Add L1 message database (#255 )
* add l1-message-type, transaction methods
* goimports
* Update core/types/transaction.go
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
* add L1 message store to rawdb
* remove comments
* rename to l1_message
* rename variables and add comments
* write l1 msgs in a batch
* add more comments
* update tests
* allow batched and non-batched writes
* rename to accessors_l1_message
* handle error
* add range check
* fix tests
* update comments
* nit
* support blocks with 0 l1 messages
---------
Co-authored-by: Max Wolff <maxcwolff@gmail.com>
Co-authored-by: Max Wolff <max@scroll.io>
* Fix L1Message Deep Copy, Complete Bridge Tx Hash test (#269 )
* deep copy value field, add tx hash test
comment
* typo
* Rename nonce to queueindex, increment sender nonce on L1 message execution (#271 )
* change nonce to queueindex, increment nonce on L1 message
* fix db acccessors
* Update core/types/transaction_marshalling.go
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
---------
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
* Fix db inspect command (#276 )
fix db inspect command
* Add l1 sync service (#256 )
* extend node configuration
* add l1-message-type, transaction methods
* goimports
* Update core/types/transaction.go
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
* use block number instead of hash
* accept safe, finalized and numbers for L1Confirmations
* add L1 message store to rawdb
* remove comments
* fix typos
* add L1 message sync service
* use l1 contract address and chain ID
* use L1DeploymentBlock
* add confirmation config
* move bridge client to separate file
* use uint64 block number
* fix bigint comparison
* rename constants
* add more logs
* rename to l1_message
* rename variables and add comments
* write l1 msgs in a batch
* add more comments
* update tests
* allow batched and non-batched writes
* rename to accessors_l1_message
* handle error
* check if config is provided
* improve sync service DB batched writes
* add range check
* fix tests
* update comments
* nit
* fix flush range and improve comments
* solve circular dependency
* update stress tests
* initialize l1 client for geth
* start sync service
* add more comments
* check nil correctly
* address comments
* fix merge
* fix genesis l1config deserialization
* add sync progress logs
* initial sync
* handle leveldb not found error
* use errors.Is
* address comments
* update DefaultPollInterval
---------
Co-authored-by: Nazarii Denha <dengaaa2002@gmail.com>
Co-authored-by: Max Wolff <maxcwolff@gmail.com>
Co-authored-by: Max Wolff <max@scroll.io>
* Add L1 message validation (#272 )
* add L1 message validation
* add comments and better error handling
* handle leveldb not found error
* update incorrect condition for genesis block
* typo
* change inclusion index logic
* disable L1 message check for legacy tests
* set NumL1MessagesPerBlock to 0 in tests
* update default genesis config
* Add L1 msg validation tests (#303 )
add L1 msg validation tests
* Update miner include l1 messages (#265 )
* add l1-message-type, transaction methods
* goimports
* Update core/types/transaction.go
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
* add L1 message store to rawdb
* add L1 message sync service
* remove comments
* use l1 contract address and chain ID
* extend node configuration
* use block number instead of hash
* accept safe, finalized and numbers for L1Confirmations
* fix typos
* use L1DeploymentBlock
* add confirmation config
* move bridge client to separate file
* use uint64 block number
* fix bigint comparison
* rename constants
* add more logs
* Fix/improve node config parsing (#260 )
* raise error on failed parsing
* default value
* rename to l1_message
* rename variables and add comments
* write l1 msgs in a batch
* add more comments
* update tests
* allow batched and non-batched writes
* rename to accessors_l1_message
* handle error
* check if config is provided
* improve sync service DB batched writes
* include l1 messages in blocks: part 1
* add l1-message-type, transaction methods (#252 )
* add l1-message-type, transaction methods
* goimports
* Update core/types/transaction.go
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
* txpool l1 check, pointer change, marhsal test
* draft: start implementing l1message gas behavior
* draft: start implementing l1message gas behavior
* change to gas usage
* error comment typo
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* goimports
* update nonce, add hash test (fails), marshal test
* goimports
* target addr cant be nil
* change call msg
* comment out test
* lint
---------
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Add L1 message database (#255 )
* add l1-message-type, transaction methods
* goimports
* Update core/types/transaction.go
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
* add L1 message store to rawdb
* remove comments
* rename to l1_message
* rename variables and add comments
* write l1 msgs in a batch
* add more comments
* update tests
* allow batched and non-batched writes
* rename to accessors_l1_message
* handle error
* add range check
* fix tests
* update comments
* nit
* support blocks with 0 l1 messages
---------
Co-authored-by: Max Wolff <maxcwolff@gmail.com>
Co-authored-by: Max Wolff <max@scroll.io>
* build(docker): auto docker push when pushing git tags (#258 )
* build(docker): update docker trigger tag prefix (#259 )
* Fix L1Message Deep Copy, Complete Bridge Tx Hash test (#269 )
* deep copy value field, add tx hash test
comment
* typo
* commitl1messages
* lint
* Revert "add L1 message sync service"
This reverts commit 5305e8a5de14766ed249e1a7d64042c7a72cf5c2.
* Revert "move bridge client to separate file"
This reverts commit 0b220bee37de93c3250545e23430db2c401a2f90.
* update branch
* use commitMessages for l1Txs
* little fix
* fix config
* fix test
* comment fixes
* fix
* fix config check
---------
Co-authored-by: Max Wolff <maxcwolff@gmail.com>
Co-authored-by: Max Wolff <max@scroll.io>
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
* Add ErrUnknownAncestor tests (#305 )
add ErrUnknownAncestor tests
* worker test include l1 msgs (#306 )
* worker test include l1 msgs
* move L1 message index update next to block insertion
---------
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
* exclude l1 messages from transaction count limit in block (#307 )
* exclude l1 messages from transaction count limit in block
* fix comments
* trigger ci
* nit
---------
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
* Expose queueIndex on Transaction (#316 )
expose queueIndex on Transaction
* test that l1msg doesn't count in maxTxPerBlock limit (#312 )
* test that l1msg doesn't count in maxTxPerBlock limit
* fix, comment
* retrigger ci
* change order inside test
---------
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
* reuse trace nonce field for queueIndex
* expose scroll APIs on the geth console
* add L1 message query APIs
* Trigger new block on new l1 messages (#343 )
* trigger new block on new l1 messages
* typo
* initialize l1MsgCh
* fix worker l1msg tests (#345 )
---------
Co-authored-by: Nazarii Denha <dengaaa2002@gmail.com>
* test(worker): ensure that l1 messages are included in the correct order (#346 )
test that l1msgs added in correct order
* rename enqueueIndex --> queueIndex
* move QueueIndex into transaction
* improve l1 db interface
* formatting
* bump version
* print l1config
* add API to query latest included message queue index
* clean up tx limit logic
* add clarifying comments and todos to ValidateL1Messages
* improve db comments and logs
* clean up L1MessageTx type handling
* format
* format
* improve L1 message block check
* fix missing L1 event handling
* fix TestL1MessageValidationFailure
* simplify sync height resume logic
* make l1Config.l1MessageQueueAddress non-pointer
* improve command line flags
* remove todo
* use abigen tools for log filtering
* cache block L1 message count
* nit: fix variable name case
* improve logs
* flush pending writes to DB before shutdown
---------
Co-authored-by: Nazarii Denha <dengaaa2002@gmail.com>
Co-authored-by: Max Wolff <max@scroll.io>
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
Co-authored-by: Max Wolff <maxcwolff@gmail.com>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Co-authored-by: HAOYUatHZ <haoyu@protonmail.com>
2023-06-07 07:24:19 -07:00
HAOYUatHZ
32aacc3fd6
style: revert some formatting ( #294 )
...
Revert "style: remove blank line & white space formatting"
This reverts commit 349def8d5d78f83c19e899d5d80b1d9f6a5d18c6.
2023-04-20 17:49:35 +08:00
maskpp
d1f9523b08
feat(build): Upgrade go version to 1.18 ( #241 )
...
* update go version
* update go version
* format code by goimports
* format code by goimports
* go mod tidy
* update go version
* update go version
* upgrade linter
* add exclude rule
* fix golangci exclude
---------
Co-authored-by: vincent <419436363@qq.com>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
2023-03-06 13:32:39 +08:00
Nazarii Denha
310c870c6a
set BaseFee to nil ( #222 )
...
* set BaseFee to nil
* fix lint
* comment fix
* update genesis.go
2023-02-20 22:04:55 -08:00
Péter Garamvölgyi
61e2bdd05f
feat: return 0 for op DIFFICULTY ( #167 )
2022-10-27 17:31:45 +08:00
Péter Garamvölgyi
00ed553a57
feat: disable SELFDESTRUCT opcode in l2geth ( #147 )
...
* feat: disable SELFDESTRUCT opcode in l2geth
* remove deadcode
2022-08-22 14:17:57 -07:00
HAOYUatHZ
21b65f4944
core/vm: Make INVALID a defined opcode ( #118 )
...
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>
Co-authored-by: Andrei Maiboroda <andrei@ethereum.org>
Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
2022-06-22 17:18:47 +08:00
Steven
b6cc89fabe
Add goimports lint ( #54 )
...
* Add `goimports` lint.
* Fix `goimports` issue.
* Fix group to `github.com/scroll-tech/go-thereum`.
2022-03-24 16:53:59 +08:00
maskpp
b4d60884d2
Fix import fmt and run tests for given architecture ( #18 )
...
* fix gofmt
* Run tests for given architecture
* Speed up CI execution.
2022-01-12 19:45:06 -08:00
Jules
de7ed6af40
Update mod file and all imports to use scroll-tech URL ( #15 )
...
* Update mod file and all imports to use scroll-tech URL
Fixes #14
* Update Discord link
2021-12-24 10:59:22 +01:00
Joshua Colvin
abc74a5ffe
accounts/abi/bind/backends: fix race condition in simulated backend ( #23898 )
...
Now that `SimulatedBackend.SuggestGasPrice` inspects member values, a lock needs to be added to prevent a race condition.
2021-11-12 15:50:08 +01:00
Marius van der Wijden
c2e64db3b1
accounts/abi/bind/backends: make suggestGasPrice compatible with non-1559 chains ( #23840 )
2021-11-01 10:01:22 +01:00
Sparty
57c252ef4e
accounts/abi/bin/backends: return basefee in suggestGasPrice ( #23838 )
...
Co-authored-by: mrx <mrx@mrx.com>
2021-11-01 07:49:45 +01:00
KibGzr
b6fb18479c
accounts/abi/bind: fix error handling in baseFee query ( #23781 )
...
This fixes a panic that occurs when HeaderByNumber() returns an error.
2021-10-21 11:40:35 +02:00
Marius van der Wijden
08e782c61f
accounts/abi: add basic support for error types ( #23161 )
...
This is the initial step for support of Solidity errors in contract bindings.
As of this change, errors can be decoded, but are not supported in
bindings yet.
Closes #23157
2021-10-14 13:33:28 +02:00
Marius van der Wijden
79b727bc8a
accounts/abi/bind: refactor transact method ( #23719 )
...
This fixes a bug where gas-related fields of the TransactOpts passed
to transaction methods would be modified, skipping gas estimation for
subsequent transactions.
Co-authored-by: Yondon Fu <yondon.fu@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
2021-10-13 22:59:11 +02:00
Iskander (Alex) Sharipov
778ff94794
all: fix some go-critic linter warnings ( #23709 )
...
This doesn't fix all go-critic warnings, just the most serious ones.
Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-10-13 17:31:02 +02:00
Yihau Chen
92c5d104d0
accounts/abi/bind: check event signature before parsing ( #23230 )
...
* accounts/abi/bind: check event signature before parsing
* remove redundant break line
2021-09-28 12:56:03 +02:00
gary rong
57a3fab8a7
accounts/abi: fix resolving single struct argument ( #23573 )
2021-09-22 10:18:18 +02:00
Martin Holst Swende
1b34283810
ethclient, accounts/keystore: fix flaky tests ( #23599 )
...
* ethclient/gethclient: fix flaky test (due to map key ordering)
* accounts/keystore: fix test failing due to rand collision due to low time resolution on windows
2021-09-20 10:23:44 +02:00
Sina Mahmoodi
108eec3fee
node: remove dependency on wallet backend packages ( #23019 )
...
* accounts: new AddBackends method in manager
* node,cmd/geth: mv accman backend init to cmd/geth
* node,cmd/geth: mv scrypt config downstreawm from node
* accounts: use static buffer size for accman sub chan
minor fix
* accounts,cmd/geth: update accman backends through its event loop
* accounts,node: add comments
* accounts: un-export newBackendEvent
* accounts: use chan instead of wg in newBlockEvent
* node: rename isKeyDirEphem
* accounts,cmd: AddBackends->AddBackend
* accounts: fix potential blocking when adding backend
2021-08-25 22:34:22 +02:00
Felix Lange
8a134014b4
all: add go:build lines ( #23468 )
...
Generated by go1.17 fmt ./...
2021-08-25 18:46:29 +02:00
Marius van der Wijden
d02c605367
core: only check sendernoeoa in non fake mode ( #23424 )
2021-08-23 12:49:39 +03:00
Péter Szilágyi
0a68558e7e
accounts/external: handle 0 chainid as not-set for the Clef API ( #23394 )
...
* accounts/external: handle 0 chainid as not-set for the Clef API
* accounts/external: document SignTx
Co-authored-by: Felix Lange <fjl@twurst.com>
2021-08-13 15:39:51 +03:00
lightclient
a879c42bd3
internal/ethapi, accounts/abi/bind: cap highest gas limit by account balance for 1559 fee parameters ( #23309 )
...
* internal/ethapi/api: cap highest gas limit by account balance for 1559 fee parameters
* accounts/abi/bind: port gas limit cap for 1559 parameters to simulated backend
* accounts/abi/bind: add test for 1559 gas estimates for the simulated backend
* internal/ethapi/api: fix comment
* accounts/abi/bind/backends, internal/ethapi: unify naming style
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2021-08-10 16:56:34 +03:00
Martin Holst Swende
295bc35ecf
signer/core: move API JSON types to separate package ( #23275 )
...
This PR moves (some) account types into a standalone package, to avoid
depending on signer/core from accounts/external.
2021-07-29 16:06:44 +02:00
Martin Holst Swende
5c13012b56
accounts/external, internal/ethapi: fixes for London tx signing ( #23274 )
...
Ticket #23273 found a flaw where we were unable to sign legacy-transactions
using the external signer, even if we're still on non-london network. That's
fixed in this PR.
Additionally, I found that even when supplying all parameters, it was impossible
to sign a london-transaction on an unsynched node. It's a pretty common usecase
that someone wants to sign a transaction using an unsynced 'vanilla' node,
providing all necessary data. Our setDefaults, however, insisted on checking the
current block against the config. This PR therefore adds a case, so that if both
MaxPriorityFeePerGas and MaxFeePerGas are provided, we accept them as given.
OBS This PR fixes a regression -- on current master, we are unable to sign a
london-transaction unless the node is synched, which may break scenarios where
geth (or clef) is used as a cold wallet.
Fixes #23273
2021-07-29 14:00:06 +02:00
Marius van der Wijden
3aea432b35
accounts/abi/bind: set Context in TransactOpts ( #23188 )
2021-07-27 16:24:27 +02:00
Marius van der Wijden
b20bc5c0ca
accounts/abi/bind: parse ABI only once, create metadata struct ( #22583 )
2021-07-27 16:22:21 +02:00
Pierre R
61f4b5aa89
accounts/abi/bind: fix gas price suggestion with pre EIP-1559 clients ( #23102 )
...
This fixes transaction sending in the case where an app using go-ethereum v1.10.4
is talking to a pre-EIP-1559 RPC node. In this case, the eth_maxPriorityFeePerGas
endpoint is not available and we can only rely on eth_gasPrice.
2021-06-29 10:57:29 +02:00
Guillaume Ballet
ddf10250c7
accounts/abi/bind: replace context.TODO with context.Background ( #23088 )
2021-06-22 12:06:34 +03:00
Nicolas Feignon
c63c2d855e
accounts/abi/bind: call ensureContext on every context
2021-06-17 14:04:24 +02:00
Péter Szilágyi
7a7abe3de8
accounts/abi/bind: fix bounded contracts and sim backend for 1559 ( #23038 )
...
* accounts/abi/bind: fix bounded contracts and sim backend for 1559
* accounts/abi/bind, ethclient: don't rely on chain config for gas prices
* all: enable London for all internal tests
* les: get receipt type info in les tests
* les: fix weird test
Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-06-15 13:56:14 +03:00
Oliver Tale-Yazdi
1d57f22d58
accounts/abi/bind/backends: add simulated reorgs ( #22624 )
...
* accounts/abi/bind/backends: add blockByHashNoLock
Signed-off-by: Oliver Tale-Yazdi <oliver@perun.network>
* accounts/abi/bind/backends: add 'parent' arg to rollback
Signed-off-by: Oliver Tale-Yazdi <oliver@perun.network>
* accounts/abi/bind/backends: add simulated forks
Signed-off-by: Oliver Tale-Yazdi <oliver@perun.network>
* accounts/abi/bind/backends: minor nitpicks
* accounts/abi/bind/backends: don't add defensive panics
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2021-06-14 08:55:44 +03:00
Martin Holst Swende
7a00378e2b
cmd/clef, signer: support for eip-1559 txs in clef ( #22966 )
2021-06-09 13:48:47 +02:00
Péter Szilágyi
c503f98f6d
all: rename internal 1559 gas fields, add support for graphql ( #23010 )
...
* all: rename internal 1559 gas fields, add support for graphql
* cmd/evm/testdata, core: use public 1559 gas names on API surfaces
2021-06-08 12:05:41 +02:00
Martin Holst Swende
94451c2788
all: implement EIP-1559 ( #22837 )
...
This is the initial implementation of EIP-1559 in packages core/types and core.
Mining, RPC, etc. will be added in subsequent commits.
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: lightclient@protonmail.com <lightclient@protonmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
2021-05-17 15:13:22 +02:00
Martin Holst Swende
67da83aca5
accounts/external, signer/core: add support for EIP-2930 transactions ( #22585 )
...
This adds support for signing EIP-2930 with clef.
2021-04-21 13:03:33 +02:00
Péter Szilágyi
1e207342b5
all: make logs a bit easier on the eye to digest ( #22665 )
...
* all: add thousandths separators for big numbers on log messages
* p2p/sentry: drop accidental file
* common, log: add fast number formatter
* common, eth/protocols/snap: simplifty fancy num types
* log: handle nil big ints
2021-04-15 20:35:00 +03:00
Balaji Shetty Pachai
6c27d8f996
accounts: documentation fixes ( #22645 )
...
* replaces `an chance` with `a chance`
* replaces `SignHashWithPassphrase` with `SignTextWithPassphrase` as there was no SignHashWithPasspharse function in the file
2021-04-13 10:00:48 +02:00
MrChico
aab35600bc
accounts: eip-712 signing for ledger ( #22378 )
...
* accounts: eip-712 signing for ledger
* address review comments
2021-03-22 09:29:32 +01:00