Skip to content

curvegrid/eth-subscribe-issue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eth-subscribe-issue

To reproduce:

  • Install Go
  • Copy the sample config file and replace the ws://localhost:8647 endpooint with the node provider websocket endpoint of your choice:
cp sample-config.yaml config.yaml
  • Run:
go run main.go

Expected:

$ go run main.go
2021/07/08 14:22:21 Subscription successful, waiting for logs
2021/07/08 14:23:26 Msg received: {Address:0x758FB037A375F17c7e195CC634D77dA4F554255B Topics:[0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef 0x000000000000000000000000135827eaf9746573c0b013f18ee12f138b9b0384 0x000000000000000000000000a99ede7695c7465e2e330bb185edf62e68b225dc] Data:[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 163 115 169 27 194 183 144 0] BlockNumber:8968021 TxHash:0x44bc1e46f903bd99d0e79dd89b164a54784a849305174e868a6406028dbcff7e TxIndex:20 BlockHash:0x748db13e94efd77af282de4a02350cf469260d6e66184f9b5493382ec5a83b06 Index:67 Removed:false}
2021/07/08 14:23:38 Msg received: {Address:0x758FB037A375F17c7e195CC634D77dA4F554255B Topics:[0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef 0x000000000000000000000000135827eaf9746573c0b013f18ee12f138b9b0384 0x000000000000000000000000f9a8322f04da9c3a2c758fa107064eda7440037b] Data:[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 114 50 217 152 189 175 248 0] BlockNumber:8968025 TxHash:0x5cbf4d6b10665e1459e83dc684a0a74fed9053a6adc5a4e8406c4c308cfe4d7f TxIndex:8 BlockHash:0x39ae23650eeec6719883ed0553fa615ba7188780ea648a4f0a341ccb8b70f6a9 Index:36 Removed:false}
2021/07/08 14:23:47 Msg received: {Address:0x758FB037A375F17c7e195CC634D77dA4F554255B Topics:[0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925 0x000000000000000000000000bb7eb136a57ad575b4bc8c56be1daf22a79c5db3 0x00000000000000000000000010ed43c718714eb63d5aa57b78b54704e256024e] Data:[255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255] BlockNumber:8968028 TxHash:0x28278196cd279b4b4d3b22815b39667db410ced9e6e2d0e56b556aa33793f734 TxIndex:34 BlockHash:0x73988dad9f0213077a70c58761e67214f70d34525961614149b168d13256c023 Index:72 Removed:false}
2021/07/08 14:23:56 Msg received: {Address:0x758FB037A375F17c7e195CC634D77dA4F554255B Topics:[0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef 0x000000000000000000000000135827eaf9746573c0b013f18ee12f138b9b0384 0x0000000000000000000000008f9781f7754bfefeaaadd8583e4abddd27720817] Data:[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 43 78 241 76 146 250 6 0] BlockNumber:8968031 TxHash:0xc47bb8088b7f13ba3f377066a0ce4ce4a78f20290b4334fe5ecdee59b4366c09 TxIndex:16 BlockHash:0x8a8d8bf53b338bf911531cb8fca1b1304cddd261a0db9e16672cb0ee55dc60d2 Index:28 Removed:false}
<etc.>

If there's a problem with go-ethereum subscribing via the node provider's endpoint, the subscription will timeout (default 5s):

$ go run main.go
2021/07/08 14:24:26 context deadline exceeded

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages