Closed SLoeuillet closed 4 months ago
Comes from mismerge of cmd/rpcdaemon/graphql/graph/helpers.go
a block of code that was removed upstream in march 2023 is still there in op-erigon HEAD, not in erigon nor bsc-erigon :
diff --git a/cmd/rpcdaemon/graphql/graph/helpers.go b/cmd/rpcdaemon/graphql/graph/helpers.go
index 937f591ed..0a2901719 100644
--- a/cmd/rpcdaemon/graphql/graph/helpers.go
+++ b/cmd/rpcdaemon/graphql/graph/helpers.go
@@ -18,10 +19,6 @@ import (
func convertDataToStringP(abstractMap map[string]interface{}, field string) *string {
var result string
- if reflect.ValueOf(abstractMap[field]).IsZero() {
- return nil
- }
-
switch v := abstractMap[field].(type) {
case int64:
result = strconv.FormatInt(v, 10)
For that block (1371681) logBloom is an array of 00000, so helper returns nil, and as pointer is dereferenced afterward, it crashes in caller
That code was removed upstream on commit fd1a971384460039cb9efcbe437346af31b5685e on 2023-03-09
@SLoeuillet The fix has been merged and released: https://github.com/testinprod-io/op-erigon/releases/tag/v2.60.2-0.6.6 Please let me know if the issue is resolved. Thank you for the contribution!
Issue is now fixed.
Thanks again
System information
Erigon version: 2.60.2-0.6.5
OS & Version: Ubuntu 24.04 amd64
Commit hash: 2f002f3e43403ee5df6c73db0fbf8158069038f6
Erigon Command (with flags/config): --graphql
Consensus Layer:
Consensus Layer Command (with flags/config):
Chain/Network: mainnet
Expected behaviour
http://127.0.0.1:8545/graphql/ui
specific block 1371681 returns JSON data, not error :
GraphQL query :
Expected result :
Actual behaviour
Steps to reproduce the behaviour
Go to local graphql UI, paste graphql query JSON
Backtrace