Skip to content

Commit f596c83

Browse files
drop goccy/go-json dependency (#17137)
reason: - it's not widely used in Erigon - we have another lib for streaming - golang has json v2 experiment
1 parent ae56a41 commit f596c83

File tree

7 files changed

+5
-11
lines changed

7 files changed

+5
-11
lines changed

execution/consensus/clique/clique.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ package clique
2323
import (
2424
"bytes"
2525
"context"
26+
"encoding/json"
2627
"errors"
2728
"fmt"
2829
"io"
@@ -31,7 +32,6 @@ import (
3132
"sync"
3233
"time"
3334

34-
"github.com/goccy/go-json"
3535
lru "github.com/hashicorp/golang-lru/arc/v2"
3636

3737
"github.com/erigontech/erigon-lib/common"

execution/consensus/clique/snapshot.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ package clique
2222
import (
2323
"bytes"
2424
"context"
25+
"encoding/json"
2526
"errors"
2627
"fmt"
2728
"maps"
2829
"slices"
2930
"sort"
3031
"time"
3132

32-
"github.com/goccy/go-json"
3333
lru "github.com/hashicorp/golang-lru/arc/v2"
3434

3535
"github.com/erigontech/erigon-lib/common"

execution/consensus/ethash/consensus_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@ package ethash
2121

2222
import (
2323
"encoding/binary"
24+
"encoding/json"
2425
"math/big"
2526
"math/rand"
2627
"os"
2728
"path/filepath"
2829
"testing"
2930

30-
"github.com/goccy/go-json"
31-
3231
"github.com/erigontech/erigon-lib/common"
3332
"github.com/erigontech/erigon-lib/common/empty"
3433
"github.com/erigontech/erigon-lib/common/math"

execution/consensus/ethash/sealer.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"bytes"
2424
"context"
2525
crand "crypto/rand"
26+
"encoding/json"
2627
"errors"
2728
"math"
2829
"math/big"
@@ -31,8 +32,6 @@ import (
3132
"sync"
3233
"time"
3334

34-
"github.com/goccy/go-json"
35-
3635
"github.com/erigontech/erigon-lib/common"
3736
"github.com/erigontech/erigon-lib/common/hexutil"
3837
"github.com/erigontech/erigon/execution/consensus"

execution/consensus/ethash/sealer_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
package ethash
2121

2222
import (
23+
"encoding/json"
2324
"io"
2425
"math/big"
2526
"net/http"
@@ -28,8 +29,6 @@ import (
2829
"testing"
2930
"time"
3031

31-
"github.com/goccy/go-json"
32-
3332
"github.com/erigontech/erigon-lib/common"
3433
"github.com/erigontech/erigon-lib/log/v3"
3534
"github.com/erigontech/erigon-lib/testlog"

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ require (
5656
github.com/go-stack/stack v1.8.1
5757
github.com/go-test/deep v1.1.1
5858
github.com/go-viper/mapstructure/v2 v2.4.0
59-
github.com/goccy/go-json v0.9.11
6059
github.com/gofrs/flock v0.12.1
6160
github.com/golang-jwt/jwt/v4 v4.5.2
6261
github.com/golang/snappy v1.0.0

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,6 @@ github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlnd
389389
github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
390390
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
391391
github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY=
392-
github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk=
393-
github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
394392
github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
395393
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
396394
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=

0 commit comments

Comments
 (0)