l2geth: remove the miner from the hot code path#875
Conversation
* l2geth: more in depth usage string * l2geth: add standard client getters for index * l2geth: refactor sync service into shared codepaths * l2geth: clean up tests * l2geth: better logging and error handling * test: improve test coverage around timestamps * l2geth: improve docstring * l2geth: rename variable
* dtl: update constant to 9 million gaslimit * dtl: parse as rlp without top level type * chore: add changeset * test: delete dead code * lint: fix * deps: add etherproject transactions * dtl: better handler for more number types * tests: fix chainid
🦋 Changeset detectedLatest commit: f4fbf12 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report
@@ Coverage Diff @@
## l2geth/sync-spec #875 +/- ##
=================================================
Coverage 82.21% 82.21%
=================================================
Files 48 48
Lines 1895 1895
Branches 303 303
=================================================
Hits 1558 1558
Misses 337 337 Continue to review full report at Codecov.
|
| func (s *SyncService) transition() { | ||
| for { | ||
| select { | ||
| case tx := <-s.txCh: |
There was a problem hiding this comment.
It is important that this channel is only big enough for 1 thing otherwise reorgs will be a pain since there will be txs buffered in the channel and we would have to empty the channel. If done like that then the lock is a bit redundant
| block, state := b.eth.miner.Pending() | ||
| return state, block.Header(), nil | ||
| if !vm.UsingOVM { | ||
| // Pending state is only known by the miner |
There was a problem hiding this comment.
This probably should be hidden still
Lines 65 to 68 in 8082d16
Description
This is still WIP and builds on top of #552
Major changes
consensus.Enginespecifically for the rollupSome features do not appear to be working correctly yet, like logs are not being indexed. Will follow up and squash these commits
Additional context
This greatly reduces the diff and complexity of having the miner in the hot code path