INFURA / go-ethlibs

Ethereum libraries in Go for interacting with Ethereum nodes
MIT License
161 stars 34 forks source link

feat(block): add Celo flavor and Celo block type #72

Closed Caroline-theotter closed 1 year ago

Caroline-theotter commented 2 years ago

EVM proxy indexers for Celo don't work, we have the same error {"level":"error","ts":1669817783.848682,"caller":"proxy/indexer.go:43","msg":"headtracker stopped with error","error":"error getting starting block: error getting initial latest block from store: error unmarshalling blockbyhash from json: data types must start with 0x" the problem come from the celo block fields that trigger the error

so for now the solution is to add a Celo flavor field to differentiate between clients.

with this change on ethlibs, the EVM proxy indexers for Celo are working well : {"level":"info","ts":1669817554.114091,"caller":"headtracker/headtracker.go:266","msg":"block logs stored","blockNumber":14289075,"count":2} {"level":"info","ts":1669817555.263482,"caller":"headtracker/headtracker.go:204","msg":"added block","blockNumber":14289075,"blockHash":"0x842c8b2ba67aeeee449c1b11920f640b47200d241dcf651f02bc959fb91da42f","reorg":false} {"level":"info","ts":1669817558.268481,"caller":"headtracker/headtracker.go:266","msg":"block logs stored","blockNumber":14289076,"count":4} {"level":"info","ts":1669817558.96629,"caller":"headtracker/headtracker.go:204","msg":"added block","blockNumber":14289076,"blockHash":"0x7ccc7feb8f9f7eaca8fb65237a30026e4949c41506073f607f4b478e46b610e6","reorg":false}

basgys commented 1 year ago

I'm opting out from this review. I have already stated my opinion on adding "flavours" to this library. I will let code owners decide what's best for this library.

JeeChoi commented 1 year ago

Sorry to be inconvenient but I realized this repo does not have any code owners. I think we should add code owners and then the code owners should discuss which direction we want the repo to go before we merge in this PR.