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 docs note for Geth v1.9.12 eth_call change #3467

Merged
merged 3 commits into from
Apr 13, 2020
Merged

Conversation

ryanio
Copy link
Collaborator

@ryanio ryanio commented Apr 13, 2020

Description

It was identified in #3456 that geth released a breaking change regarding the default value of from in eth_call.

This means that if you're calling view methods that refer to a msg.sender without explicitly setting a from address in your request options, you may see unexpected behavior.

This PR adds some notes to the changelog and documentation about this change.

After some discourse we decided that we should not brush this change under the rug by modifying the behavior of web3.js, but instead stay consistent with the best practices and recommendations from the node clients.

In web3.js, the from address can be specified on a per-call basis or by setting the defaultAccount property.

Closes #3456

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I ran npm run dtslint with success and extended the tests and types if necessary.
  • I ran npm run test:unit with success.
  • I have executed npm run test:cov and my test cases do cover all lines and branches of the added code.
  • I ran npm run build-all and tested the resulting file/'s from dist folder in a browser.
  • I have updated the CHANGELOG.md file in the root folder.
  • I have tested my code on the live network.

@ryanio ryanio added Documentation Relates to project wiki or documentation 1.x 1.0 related issues labels Apr 13, 2020
@ryanio ryanio changed the title Note geth eth_call breaking change Documentation note for Geth v1.9.12 eth_call change Apr 13, 2020
@coveralls
Copy link

coveralls commented Apr 13, 2020

Coverage Status

Coverage remained the same at 88.596% when pulling f41ccee on gethEthCallChange into 3684fc3 on 1.x.

@cgewecke cgewecke self-requested a review April 13, 2020 18:58
cgewecke
cgewecke previously approved these changes Apr 13, 2020
@ryanio ryanio changed the title Documentation note for Geth v1.9.12 eth_call change Docs note for Geth v1.9.12 eth_call change Apr 13, 2020
@ryanio ryanio changed the title Docs note for Geth v1.9.12 eth_call change Add docs note for Geth v1.9.12 eth_call change Apr 13, 2020
@cgewecke cgewecke self-requested a review April 13, 2020 22:40
@cgewecke cgewecke merged commit 1149c41 into 1.x Apr 13, 2020
@cgewecke cgewecke deleted the gethEthCallChange branch April 13, 2020 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues Documentation Relates to project wiki or documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with method call result with msg.sender and Geth 1.9.12
3 participants