Consensys / anonymous-zether

A private payment system for Ethereum-based blockchains, with no trusted setup.
Other
295 stars 73 forks source link

"Couldn't write on the socket" with anonset sizes >= 32 #8

Closed benediamond closed 4 years ago

benediamond commented 5 years ago

Encountering a new bug here when trying to transfer with larger anonsets:

> Transfer failed: Error: Connection error: Couldn't write on the socket with Socket.write(payload)
(node:21874) UnhandledPromiseRejectionWarning: Error: Connection error: Couldn't write on the socket with Socket.write(payload)
    at /Users/benediamond/anonymous-zether/node_modules/web3-providers/dist/web3-providers.cjs.js:636:23
    at new Promise (<anonymous>)
    at IpcProvider.sendPayload (/Users/benediamond/anonymous-zether/node_modules/web3-providers/dist/web3-providers.cjs.js:619:14)
    at IpcProvider._callee$ (/Users/benediamond/anonymous-zether/node_modules/web3-providers/dist/web3-providers.cjs.js:185:29)
    at tryCatch (/Users/benediamond/anonymous-zether/node_modules/regenerator-runtime/runtime.js:45:40)
    at Generator.invoke [as _invoke] (/Users/benediamond/anonymous-zether/node_modules/regenerator-runtime/runtime.js:271:22)
    at Generator.prototype.<computed> [as next] (/Users/benediamond/anonymous-zether/node_modules/regenerator-runtime/runtime.js:97:21)
    at asyncGeneratorStep (/Users/benediamond/anonymous-zether/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/Users/benediamond/anonymous-zether/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
    at /Users/benediamond/anonymous-zether/node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
(node:21874) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)

Not only is this not good, but it also wreaks havoc on the callback / balance adjustment process, and causes the node process to hang.

It would appear that this is an upstream bug in web3, so I'm going to hold off for a bit and try to see what's going on. Hopefully no changes on our end will be necessary.

benediamond commented 5 years ago

looks like there might be an upstream issue logged for this, so let's see: https://github.com/ethereum/web3.js/issues/2908

benediamond commented 4 years ago

turns out this is a geth issue: https://github.com/ethereum/go-ethereum/issues/16846, fixed in https://github.com/ethereum/go-ethereum/pull/19866. Thus I think we need to wait till Quorum rebases on geth 1.9.

benediamond commented 4 years ago

Appears to have resolved as of the latest versions of web3, etc. Closing for now.