add multi-rpc client for server#2104
Conversation
|
I addressed your first review, @chappjc. One thing I'm still thinking about doing is advancing the endpoint index if a header appears outdated. |
|
BTW, how's #2074 for you, for client
ofc
…On Sun, Feb 5, 2023, 11:41 AM buck54321 ***@***.***> wrote:
I addressed your first review, @chappjc <https://github.com/chappjc>. One
thing I'm still thinking about doing is advancing the endpoint index if a
header appears outdated.
—
Reply to this email directly, view it on GitHub
<#2104 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACHQOSMMAQVYNY6NAO4VSK3WV7Q3HANCNFSM6AAAAAAUR2IPHY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
| bn, err := ec.BlockNumber(ctx) | ||
| if err != nil { | ||
| return err | ||
| } | ||
| hdr, err = ec.HeaderByNumber(ctx, big.NewInt(int64(bn))) | ||
| return err |
There was a problem hiding this comment.
Doing some testing with Blast (blastapi.io) and I got a method not found, but I can't tell what method:
[ERR] ASSET[eth][RPC]: Unpropagated error from "wss://eth-mainnet.blastapi.io/xxxxx-xyyyy-adsfasdf": Method not found
[INF] ASSET[eth][RPC]: Switching RPC endpoint to "ws://127.0.0.1:8546"
On startup it did the balance method check and as expected it went the dumb way:
[DBG] ASSET[eth]: Parsed 2 endpoints from the ETH config file
[WRN] ASSET[eth][RPC]: Error checking required modules at "wss://eth-mainnet.blastapi.io/xxxxx-xyyyy-adsfasdf": unable to check supported modules: Method not found
[WRN] ASSET[eth][RPC]: Will not account for pending transactions in balance calculations at "wss://eth-mainnet.blastapi.io/xxxxx-xyyyy-adsfasdf"
[DBG] ASSET[eth][RPC]: API endpoints supported by ws://127.0.0.1:8546: admin:1.0 engine:1.0 eth:1.0 net:1.0 rpc:1.0 txpool:1.0
So possibly there's another method missing and blast isn't gonna work, or the smart/dumb switch didn't work as expected. I don't think it was checking a balance at the time, so it's probably another method sadly.
There was a problem hiding this comment.
You could add blastapi to your ~/dextest/providers.json and run go test -tags rpclive,lgpl -run TestMainnetCompliance in client/asset/eth to see if anything pops out. I've seen "Method not found" for SuggestGasTipCap before. Not sure how that aligns with CheckAPIModules.
That seems like a good idea. Also, on startup when it checks each endpoint it could compare the best header times (even hash and height) to be sure one doesn't look dead or stalled. |
No description provided.