This repository was archived by the owner on Apr 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -14,26 +14,26 @@ const (
1414
1515type VersionedHash [32 ]byte
1616
17- var gCryptoCtx gokzg4844.Context
17+ var gCryptoCtx * gokzg4844.Context
1818var initCryptoCtx sync.Once
1919
2020// InitializeCryptoCtx initializes the global context object returned via CryptoCtx
2121func InitializeCryptoCtx () {
2222 initCryptoCtx .Do (func () {
23+ var err error
2324 // Initialize context to match the configurations that the
2425 // specs are using.
25- ctx , err : = gokzg4844 .NewContext4096Insecure1337 ()
26+ gCryptoCtx , err = gokzg4844 .NewContext4096Insecure1337 ()
2627 if err != nil {
2728 panic (fmt .Sprintf ("could not create context, err : %v" , err ))
2829 }
29- gCryptoCtx = * ctx
3030 })
3131}
3232
3333// Ctx returns a context object that stores all of the necessary configurations to allow one to
3434// create and verify blob proofs. This function is expensive to run if the crypto context isn't
3535// initialized, so production services should pre-initialize by calling InitializeCryptoCtx.
36- func Ctx () gokzg4844.Context {
36+ func Ctx () * gokzg4844.Context {
3737 InitializeCryptoCtx ()
3838 return gCryptoCtx
3939}
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ require (
1818 github.com/anacrolix/log v0.14.0
1919 github.com/anacrolix/torrent v1.52.0
2020 github.com/c2h5oh/datasize v0.0.0-20220606134207-859f65c6625b
21- github.com/crate-crypto/go-kzg-4844 v0.2 .0
21+ github.com/crate-crypto/go-kzg-4844 v0.3 .0
2222 github.com/deckarep/golang-set/v2 v2.3.0
2323 github.com/edsrzf/mmap-go v1.1.0
2424 github.com/go-stack/stack v1.8.1
Original file line number Diff line number Diff line change @@ -108,8 +108,8 @@ github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/Yj
108108github.zerozr99.workers.dev/consensys/bavard v0.1.13 /go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI =
109109github.zerozr99.workers.dev/consensys/gnark-crypto v0.10.0 h1:zRh22SR7o4K35SoNqouS9J/TKHTyU2QWaj5ldehyXtA =
110110github.zerozr99.workers.dev/consensys/gnark-crypto v0.10.0 /go.mod h1:Iq/P3HHl0ElSjsg2E1gsMwhAyxnxoKK5nVyZKd+/KhU =
111- github.com/crate-crypto/go-kzg-4844 v0.2 .0 h1:UVuHOE+5tIWrim4zf/Xaa43+MIsDCPyW76QhUpiMGj4 =
112- github.com/crate-crypto/go-kzg-4844 v0.2 .0 /go.mod h1:SBP7ikXEgDnUPONgm33HtuDZEDtWa3L4QtN1ocJSEQ4 =
111+ github.com/crate-crypto/go-kzg-4844 v0.3 .0 h1:UBlWE0CgyFqqzTI+IFyCzA7A3Zw4iip6uzRv5NIXG0A =
112+ github.com/crate-crypto/go-kzg-4844 v0.3 .0 /go.mod h1:SBP7ikXEgDnUPONgm33HtuDZEDtWa3L4QtN1ocJSEQ4 =
113113github.zerozr99.workers.dev/creack/pty v1.1.9 /go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E =
114114github.zerozr99.workers.dev/davecgh/go-spew v1.1.0 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
115115github.zerozr99.workers.dev/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c =
You can’t perform that action at this time.
0 commit comments