Skip to content

Allow mining if DevFakeAuthor is enabled#1563

Merged
Raneet10 merged 2 commits intodevelopfrom
raneet10/fix-shadow-fork
Jun 5, 2025
Merged

Allow mining if DevFakeAuthor is enabled#1563
Raneet10 merged 2 commits intodevelopfrom
raneet10/fix-shadow-fork

Conversation

@Raneet10
Copy link
Copy Markdown
Contributor

@Raneet10 Raneet10 commented Jun 4, 2025

Description

In case of public networks, the worker doesn't start mining if the node isn't connected to peers. For the purposes of shadow forking, it is necessary to allow the node to mine blocks in its own fork whilst not listening to peers. This PR enables this.

Changes

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)
  • Changes only for a subset of nodes

Checklist

  • I have added at least 2 reviewer or the whole pos-v1 team
  • I have added sufficient documentation in code
  • I will be resolving comments - if any - by pushing each fix in a separate commit and linking the commit hash in the comment reply
  • Created a task in Jira and informed the team for implementation in Erigon client (if applicable)
  • Includes RPC methods changes, and the Notion documentation has been updated

Testing

  • I have added unit tests
  • I have added tests to CI
  • I have tested this code manually on local environment
  • I have tested this code manually on remote devnet using express-cli
  • I have tested this code manually on amoy
  • I have created new e2e tests into express-cli

@Raneet10 Raneet10 requested review from a team, cffls and praetoriansentry June 4, 2025 05:16
@codecov
Copy link
Copy Markdown

codecov bot commented Jun 4, 2025

Codecov Report

Attention: Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 50.83%. Comparing base (750a07e) to head (b1a23a3).
Report is 203 commits behind head on develop.

Files with missing lines Patch % Lines
consensus/bor/bor.go 0.00% 2 Missing ⚠️
miner/worker.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1563      +/-   ##
===========================================
+ Coverage    50.59%   50.83%   +0.23%     
===========================================
  Files          765      780      +15     
  Lines       124156   125430    +1274     
===========================================
+ Hits         62821    63765     +944     
- Misses       57327    57555     +228     
- Partials      4008     4110     +102     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Raneet10 Raneet10 merged commit bd07cd2 into develop Jun 5, 2025
9 of 12 checks passed
@Raneet10 Raneet10 deleted the raneet10/fix-shadow-fork branch June 5, 2025 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants