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

Version 3.6.0 on Linux/Chrome fails to send transactions on PrivateNet #1357

Closed
k26dr opened this issue Apr 28, 2017 · 11 comments
Closed

Version 3.6.0 on Linux/Chrome fails to send transactions on PrivateNet #1357

k26dr opened this issue Apr 28, 2017 · 11 comments

Comments

@k26dr
Copy link

k26dr commented Apr 28, 2017

All attempted transactions on the latest version of Metamask (3.6.0) while on a private dev chain fail with the error Invalid Sender. This was not an issue until yesterday, so I am assuming it's something with the latest commit.

When I hit Accept on the notification popup, the popup gets stuck on the loading screen and when I close the popup and reopen it, I can see a failed transaction attempt with the error.

I have tested with the main network, and the main network works fine. This is only an issue with a private dev network on localhost:8545.

The following error shows up in the background log when the notfication popup is opened, but nothing shows up specifically when the transaction is Accepted (EDIT: there is an Invalid Sender error in the background log for notification.html)

Error in response to windows.getAll: TypeError: Cannot read property 'catch' of undefined
    at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/background.js:2230:13
    at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/background.js:2257:9
    at Object.callback (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/background.js:2269:9)
    at NotificationManager._getWindows (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/background.js:2268:25)
    at NotificationManager._getPopup (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/background.js:2255:12)
    at NotificationManager.showPopup (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/background.js:2217:12)
    at Object.triggerUi (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/background.js:278:41)
    at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/background.js:3251:19
    at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/background.js:9357:16
    at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/background.js:10511:34
danfinlay added a commit that referenced this issue Apr 29, 2017
Does not yet work, because ethereumjs-tx does not yet support disabling replay protection.
ethereumjs/ethereumjs-tx#63

Addresses #1357
@danfinlay
Copy link
Contributor

Pretty sure we concluded this is because your private net is using an old client version, and you don't want to update the consortium right now.

This signature issue is because your clients don't support EIP155 replay-protected tx signatures, but our client is sending that type of tx.

I've got a new branch with a feature that allows you to toggle replay protection, except for the actual functional part, because our tx signing module doesn't currently support toggling the feature.

We'll try to add this soon.

ethereumjs/ethereumjs-tx#63

@k26dr
Copy link
Author

k26dr commented May 3, 2017

I've upgraded my geth to the latest client (1.6.0) and restarted a new chain and still have this issue. Is that to be expected?

@szerintedmi
Copy link

szerintedmi commented May 10, 2017

Are you sure it's because of the client version?
I'm using geth 1.6.1 and I still got the invalid sender message in Metamask on private-net.
It works when I downgrade to Metamask 3.5.2.

$ brew list ethereum
/usr/local/Cellar/ethereum/1.6.1/bin/evm
/usr/local/Cellar/ethereum/1.6.1/bin/geth
/usr/local/Cellar/ethereum/1.6.1/bin/puppeth
/usr/local/Cellar/ethereum/1.6.1/bin/rlpdump
/usr/local/Cellar/ethereum/1.6.1/homebrew.mxcl.ethereum.plist 
$ geth version
Geth
Version: 1.6.1-stable
Git Commit: 021c3c281629baf2eae967dc2f0a7532ddfdc1fb
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.8.1
Operating System: darwin
GOPATH=
GOROOT=/usr/local/Cellar/go/1.8.1/libexec

@k26dr
Copy link
Author

k26dr commented May 10, 2017

@szerintedmi I can confirm the same on my setup. The current version 3.6.4 returns an Invalid Sender error on all transactions but downgrading to 3.2.2 on my local copy of Metamask fixes the problem.

@robert-zaremba
Copy link

Any update here? I also have this error with MetaMask 3.9

@danfinlay
Copy link
Contributor

Sounds like a workaround is to use command line flags to ensure your private network's chainId is the same as its networkId.

@robert-zaremba
Copy link

Yes, that solves the problem. Thank you.

@gshenar
Copy link

gshenar commented Aug 28, 2017

@FlySwatter how do you use command line flags to ensure your private network's chainId is the same as its networkId?

@danfinlay
Copy link
Contributor

It depends on the client you're running your network on, you should refer to its documentation.

@SteffenLanger
Copy link

For anyone researching this issue in the future for go-ethereum (geth), the command line option is
--networkid value Network identifier (integer, 1=Frontier, 2=Morden (disused), 3=Ropsten, 4=Rinkeby) (default: 1)
This is an extract from the current documentation retrieved via # geth --help.

As far as chain ID and network ID are concerned, they seem to be the same thing. chainId is the key on the web3 transaction object and --networkid is geth's command line option.

@ChaiBapchya
Copy link

I have setup a private network
My custom-genesis.json reads chainid=0
while the command that ran the ethereum has flag --networkid which was set to 1205

I was able to perform sendTransaction before. But since few days it isn't able to. On metamask, the error says - ethjs rpc error with payload invalid sender

What am i doing wrong? if networkid should have been equal to chain id, how was i able to send transactions before. I certainly think invalid sender has to do with some other error.

segun added a commit that referenced this issue Oct 25, 2023
…21482)

## **Description**
We need to add metrics to help measure and estimate the usage and cost
of Infura by ppom.

This fix uses the `providerRequestsCount` object returned as part of the
securityAlertResponse of transaction object and gets only the keys that
matches the below specified requests.

### Proposal
Add new properties to Transactions and Signature events where which
property will count the number of rpc requests made by ppom to evaluate
that specific transaction or signature.

- [x] `ppom_eth_call_count` - counts the number of eth_call rpc requests
made by ppom to evaluate that transaction or signature
- [x] `ppom_eth_createAccessList_count` - counts the number of eth_call
rpc requests made by ppom to evaluate that transaction or signature
- [x] `ppom_eth_getStorageAt_count` - counts the number of eth_call rpc
requests made by ppom to evaluate that transaction or signature
- [x] `ppom_eth_getCode_count` - counts the number of eth_call rpc
requests made by ppom to evaluate that transaction or signature
- [x] `ppom_eth_getTrasanctionCount_count` - counts the number of
eth_call rpc requests made by ppom to evaluate that transaction or
signature
- [x] `ppom_eth_getBalance_count` - counts the number of eth_call rpc
requests made by ppom to evaluate that transaction or signature
- [x] `ppom_trace_call_count` - counts the number of eth_call rpc
requests made by ppom to evaluate that transaction or signature

### References
- [ppom provider usage
benchmark](https://wobbly-nutmeg-8a5.notion.site/MM-JSON-RPC-Benchmark-37d4a3bd74914b0fbe9147582c0cde51)
- [ppom required
json-rpcs](https://docs.google.com/document/d/1aOjVIsGHc0twc96V82OcXmpduGKrPjRScL_jwfgjkj0/edit?usp=sharing)


## **Manual testing steps**

1. Start extension with blockaid enabled
2. Go to test-dapp and initiate a blockaid transaction
3. When blockaid banner is shown, check that the above keys (or some of
it at least) are part of the metrics transaction or signature events

Fixes [#1357](https://github.com/MetaMask/MetaMask-planning/issues/1357)

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained:
  - [x] What problem this PR is solving.
  - [x] How this problem was solved.
  - [x] How reviewers can test my changes.
- [x] I’ve indicated what issue this PR is linked to: Fixes #???
- [ ] I’ve included tests if applicable.
- [x] I’ve documented any added code.
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
- [x] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [x] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
k-g-j pushed a commit that referenced this issue Nov 1, 2023
…21482)

## **Description**
We need to add metrics to help measure and estimate the usage and cost
of Infura by ppom.

This fix uses the `providerRequestsCount` object returned as part of the
securityAlertResponse of transaction object and gets only the keys that
matches the below specified requests.

### Proposal
Add new properties to Transactions and Signature events where which
property will count the number of rpc requests made by ppom to evaluate
that specific transaction or signature.

- [x] `ppom_eth_call_count` - counts the number of eth_call rpc requests
made by ppom to evaluate that transaction or signature
- [x] `ppom_eth_createAccessList_count` - counts the number of eth_call
rpc requests made by ppom to evaluate that transaction or signature
- [x] `ppom_eth_getStorageAt_count` - counts the number of eth_call rpc
requests made by ppom to evaluate that transaction or signature
- [x] `ppom_eth_getCode_count` - counts the number of eth_call rpc
requests made by ppom to evaluate that transaction or signature
- [x] `ppom_eth_getTrasanctionCount_count` - counts the number of
eth_call rpc requests made by ppom to evaluate that transaction or
signature
- [x] `ppom_eth_getBalance_count` - counts the number of eth_call rpc
requests made by ppom to evaluate that transaction or signature
- [x] `ppom_trace_call_count` - counts the number of eth_call rpc
requests made by ppom to evaluate that transaction or signature

### References
- [ppom provider usage
benchmark](https://wobbly-nutmeg-8a5.notion.site/MM-JSON-RPC-Benchmark-37d4a3bd74914b0fbe9147582c0cde51)
- [ppom required
json-rpcs](https://docs.google.com/document/d/1aOjVIsGHc0twc96V82OcXmpduGKrPjRScL_jwfgjkj0/edit?usp=sharing)


## **Manual testing steps**

1. Start extension with blockaid enabled
2. Go to test-dapp and initiate a blockaid transaction
3. When blockaid banner is shown, check that the above keys (or some of
it at least) are part of the metrics transaction or signature events

Fixes [#1357](https://github.com/MetaMask/MetaMask-planning/issues/1357)

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained:
  - [x] What problem this PR is solving.
  - [x] How this problem was solved.
  - [x] How reviewers can test my changes.
- [x] I’ve indicated what issue this PR is linked to: Fixes #???
- [ ] I’ve included tests if applicable.
- [x] I’ve documented any added code.
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
- [x] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [x] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
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

No branches or pull requests

7 participants