-
Notifications
You must be signed in to change notification settings - Fork 92
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
eth/server: Problem getting balances. #2016
Comments
This is with the simnet harness. Maybe it does need some arguments for what api's are enabled on start up. Looking into it. |
|
I must be going crazy, I really though this was working before, but it looks like we don't have access to "txpool" methods? There has been some talk of allowing even paid services for server. In that case there would be no access to the transaction pool I believe. Perhaps we can dumb down this? dcrdex/server/asset/eth/rpcclient.go Lines 183 to 225 in 92239af
And not worry about the txpool. Using "eth_getBalance" instead which is provided by |
When I attach via IPC:
On the Unfortunately How can we list the modules available after connecting to the endpoint? Anyway, I think server's eth backend needs to support connecting on the unauthenticated http or ws interfaces. |
We have |
That's unfortunate. We'll need to revert all the jwt stuff that targets the |
Are those three not enough? I think if we simplify the server balance we will be fine. Client tests are passing over jwt. If you want to undo the changes that's fine. I guess you would not rewind master so I can pr it if you wish. |
I don't know a compelling reason for JWT-authenticated RPC from DEX. It provides no encryption and thus does not prevent an attacker from sniffing the traffic or performing replay attacks (see the engine api auth spec). The authenticated interface is designed to prevent internet exposed services from being used without permission, a newish issue with a separate consensus client that may live on a distant machine. And it creates complications for the dex settings dialogs. I think a geth user should power dex with either IPC or |
An easy way to connect to a remote geth node that the go-ethereum devs will be updating. IF we are allowing things like infura, I don't know why more modules are necessary. I don't think that server needs to be using too many resources on mempool investigation either.
Could be true. Maybe this is why they did not add that commit in a release yet.
Again I don't think we gain much by meddling with the mempool. As you know transactions could be replaced rather easily, erasing earlier mempool transactions. And if we will be using outside services, we are already "limited".
I guess not. Your issue will clear this up about how/if we should use it. Obviously that's what I should have done first. I hope it gets a reply... Can revert in the meantime. |
The main thing we were doing with txpool was to actively subtract pending sends/withdraws so that server won't see a higher balance than really exists if the user has just sent all their funds out. We couldn't use It is a good point that if we want to support third party RPC providers that perhaps the EDIT: just noting that this is all best-effort, and nothing that is really critical to trust IMO |
Seeing the error
2022-12-30 17:20:21.193 [ERR] MKT: (*DEXBalancer).CheckBalance: error getting account balance for %q: %v 0x946dfaB1AD7caCFeF77dE70ea68819a30acD4577 accountBalance error: contentFrom error: the method txpool_contentFrom does not exist/is not available
on master. Probably due to a recent geth version change. I do not think I noticed this in the pr, however.The text was updated successfully, but these errors were encountered: