Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add difficulty to JSON-RPC blocks #2082

Merged
merged 1 commit into from
May 9, 2023
Merged

Add difficulty to JSON-RPC blocks #2082

merged 1 commit into from
May 9, 2023

Conversation

karlb
Copy link
Contributor

@karlb karlb commented May 9, 2023

Description

For compatibilty with ethers 6, which fails with Error: invalid value for value.difficulty, otherwise.

Tested

The regression test is included in #2081. This PR is provided separately, in case the other PR takes long to merge due to a potentially required node version update for recent ethers versions (node>=14).

Related issues

Backwards compatibility

Adding a field to the JSON object should be harmless for reasonably implemented users. I also don't know a way to fix the problem in an even safer way.

For compatibilty with ethers 6, which fails with
`Error: invalid value for value.difficulty`, otherwise.
@github-actions
Copy link

github-actions bot commented May 9, 2023

5808 passed, 46 skipped

@karlb karlb marked this pull request as ready for review May 9, 2023 08:32
@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (71bdbcf) 54.30% compared to head (c37e4b5) 54.30%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2082   +/-   ##
=======================================
  Coverage   54.30%   54.30%           
=======================================
  Files         692      692           
  Lines      115642   115643    +1     
=======================================
+ Hits        62795    62800    +5     
- Misses      49014    49017    +3     
+ Partials     3833     3826    -7     
Impacted Files Coverage Δ
internal/ethapi/api.go 3.98% <0.00%> (-0.01%) ⬇️

... and 28 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link

github-actions bot commented May 9, 2023

Coverage from tests in ./e2e_test/... for ./consensus/istanbul/... at commit d2f2185

coverage: 49.7% of statements across all listed packages
coverage:  63.5% of statements in consensus/istanbul
coverage:  42.7% of statements in consensus/istanbul/announce
coverage:  55.7% of statements in consensus/istanbul/backend
coverage:   0.0% of statements in consensus/istanbul/backend/backendtest
coverage:  24.3% of statements in consensus/istanbul/backend/internal/replica
coverage:  61.2% of statements in consensus/istanbul/core
coverage:  50.0% of statements in consensus/istanbul/db
coverage:   0.0% of statements in consensus/istanbul/proxy
coverage:  64.4% of statements in consensus/istanbul/uptime
coverage:  51.8% of statements in consensus/istanbul/validator
coverage:  79.2% of statements in consensus/istanbul/validator/random

@karlb karlb merged commit 6043494 into master May 9, 2023
26 checks passed
@karlb karlb deleted the karlb/difficulty-in-rpc branch May 9, 2023 10:16
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.

None yet

2 participants