From ffeebc44318178780f4da86a8ea579507cd915a2 Mon Sep 17 00:00:00 2001 From: Eric Woolsey Date: Mon, 27 May 2024 14:23:45 -0700 Subject: [PATCH] migration to gnark 10 --- deserialize/deserializer_test.go | 32 ------------ deserialize/phase1.go | 90 +++----------------------------- deserialize/ptau.go | 32 +++--------- go.mod | 16 +++--- go.sum | 44 ++++++++++------ main.go | 2 +- 6 files changed, 52 insertions(+), 164 deletions(-) diff --git a/deserialize/deserializer_test.go b/deserialize/deserializer_test.go index 954a754..0236ba7 100644 --- a/deserialize/deserializer_test.go +++ b/deserialize/deserializer_test.go @@ -91,37 +91,6 @@ func TestSerializeR1CS(t *testing.T) { assert.NoError(err) } -func TestDeserializePtauConvertPhase1(t *testing.T) { - assert := require.New(t) - - input_path := "08.ptau" - - ptau, err := ReadPtau(input_path) - - if err != nil { - assert.NoError(err) - } - - phase1, err := ConvertPtauToPhase1(ptau) - - if err != nil { - assert.NoError(err) - } - - fmt.Printf("TauG1: %v \n", phase1.tauG1) - fmt.Printf("AlphaTauG1: %v \n", phase1.alphaTauG1) - fmt.Printf("BetaTauG1: %v \n", phase1.betaTauG1) - fmt.Printf("TauG2: %v \n", phase1.tauG2) - fmt.Printf("BetaG2: %v \n", phase1.betaG2) - - // Write phase1 to file - err = WritePhase1(phase1, uint8(ptau.Header.Power), "08.ph1") - - if err != nil { - assert.NoError(err) - } -} - /////////////////////////////////////////////////////////////////// /// ZKEY /// /////////////////////////////////////////////////////////////////// @@ -158,7 +127,6 @@ func TestDeserializerZkey(t *testing.T) { assert := require.New(t) zkey, err := ReadZkey(input_path) - if err != nil { assert.NoError(err) } diff --git a/deserialize/phase1.go b/deserialize/phase1.go index 2607608..5df77c1 100644 --- a/deserialize/phase1.go +++ b/deserialize/phase1.go @@ -3,22 +3,14 @@ package deserializer import ( "bufio" "fmt" - "math" "os" "github.com/consensys/gnark-crypto/ecc/bn254" curve "github.com/consensys/gnark-crypto/ecc/bn254" + "github.com/consensys/gnark/backend/groth16/bn254/mpcsetup" ) -type Phase1 struct { - tauG1 []curve.G1Affine - alphaTauG1 []curve.G1Affine - betaTauG1 []curve.G1Affine - tauG2 []curve.G2Affine - betaG2 curve.G2Affine -} - -func ConvertPtauToPhase1(ptau Ptau) (phase1 Phase1, err error) { +func ConvertPtauToPhase1(ptau Ptau) (phase1 mpcsetup.Phase1, err error) { tauG1 := make([]curve.G1Affine, len(ptau.PTauPubKey.TauG1)) for i, g1 := range ptau.PTauPubKey.TauG1 { g1Affine := curve.G1Affine{} @@ -112,9 +104,13 @@ func ConvertPtauToPhase1(ptau Ptau) (phase1 Phase1, err error) { } } - //fmt.Printf("BetaG2: %v \n", BetaG2) + phase1.Parameters.G1.Tau = tauG1 + phase1.Parameters.G1.AlphaTau = alphaTauG1 + phase1.Parameters.G1.BetaTau = betaTauG1 + phase1.Parameters.G2.Tau = tauG2 + phase1.Parameters.G2.Beta = betaG2 - return Phase1{tauG1: tauG1, tauG2: tauG2, alphaTauG1: alphaTauG1, betaTauG1: betaTauG1, betaG2: betaG2}, nil + return phase1, nil } func WritePhase1FromPtauFile(ptauFile *PtauFile, outputPath string) error { @@ -195,73 +191,3 @@ func WritePhase1FromPtauFile(ptauFile *PtauFile, outputPath string) error { enc.Encode(&betaG2) return nil } - -func WritePhase1(phase1 Phase1, power byte, outputPath string) error { - // output outputFile - outputFile, err := os.Create(outputPath) - if err != nil { - return err - } - defer outputFile.Close() - - var header Header - - writer := bufio.NewWriter(outputFile) - defer writer.Flush() - - N := int(math.Pow(2, float64(power))) - - fmt.Printf("Power %d supports up to %d constraints\n", power, N) - - header.Power = power - - // can be extracted from ptau.Contributions (7) but hardcoding for now - // ptau link: https://github.com/iden3/snarkjs/tree/master#7-prepare-phase-2 - header.Contributions = 54 - - // Write the header - header.writeTo(outputFile) - - // BN254 encoder using compressed representation of points to save storage space - enc := bn254.NewEncoder(writer) - - // Taken from https://github.com/worldcoin/semaphore-mtb-setup/blob/main/phase1/phase1.go - // In the initialization, τ = α = β = 1, so we are writing the generators directly - // Write [τ⁰]₁, [τ¹]₁, [τ²]₁, …, [τ²ᴺ⁻²]₁ - fmt.Println("1. Writing TauG1") - for i := 0; i < 2*N-1; i++ { - if err := enc.Encode(&phase1.tauG1[i]); err != nil { - return err - } - } - - // Write α[τ⁰]₁, α[τ¹]₁, α[τ²]₁, …, α[τᴺ⁻¹]₁ - fmt.Println("2. Writing AlphaTauG1") - for i := 0; i < N; i++ { - if err := enc.Encode(&phase1.alphaTauG1[i]); err != nil { - return err - } - } - - // Write β[τ⁰]₁, β[τ¹]₁, β[τ²]₁, …, β[τᴺ⁻¹]₁ - fmt.Println("3. Writing BetaTauG1") - for i := 0; i < N; i++ { - if err := enc.Encode(&phase1.betaTauG1[i]); err != nil { - return err - } - } - - // Write {[τ⁰]₂, [τ¹]₂, [τ²]₂, …, [τᴺ⁻¹]₂} - fmt.Println("4. Writing TauG2") - for i := 0; i < N; i++ { - if err := enc.Encode(&phase1.tauG2[i]); err != nil { - return err - } - } - - // Write [β]₂ - fmt.Println("5. Writing BetaG2") - enc.Encode(&phase1.betaG2) - - return nil -} diff --git a/deserialize/ptau.go b/deserialize/ptau.go index d84f6b1..2ff1939 100644 --- a/deserialize/ptau.go +++ b/deserialize/ptau.go @@ -67,8 +67,10 @@ contributions(7) - Ignore contributions, users can verify using snarkjs // in bytes const BN254_FIELD_ELEMENT_SIZE = 32 -type G1 [2]big.Int -type G2 [4]big.Int +type ( + G1 [2]big.Int + G2 [4]big.Int +) type PtauHeader struct { N8 uint32 @@ -97,12 +99,11 @@ type PtauFile struct { func InitPtau(path string) (*PtauFile, error) { reader, err := os.Open(path) - if err != nil { return nil, err } - var ptauStr = make([]byte, 4) + ptauStr := make([]byte, 4) _, err = reader.Read(ptauStr) fmt.Printf("zkeyStr: %s \n", string(ptauStr)) @@ -142,7 +143,6 @@ func InitPtau(path string) (*PtauFile, error) { // Read header header, err := readPtauHeader(reader) - if err != nil { return nil, err } @@ -255,14 +255,13 @@ func (ptauFile *PtauFile) ReadBetaG2() (bn254.G2Affine, error) { func ReadPtau(zkeyPath string) (Ptau, error) { reader, err := os.Open(zkeyPath) - if err != nil { return Ptau{}, err } defer reader.Close() - var ptauStr = make([]byte, 4) + ptauStr := make([]byte, 4) _, err = reader.Read(ptauStr) fmt.Printf("zkeyStr: %s \n", string(ptauStr)) @@ -302,7 +301,6 @@ func ReadPtau(zkeyPath string) (Ptau, error) { // Read header header, err := readPtauHeader(reader) - if err != nil { return Ptau{}, err } @@ -317,7 +315,6 @@ func ReadPtau(zkeyPath string) (Ptau, error) { fmt.Printf("tauG1: \n") PtauPubKey.TauG1, err = readG1Array(reader, twoToPower*2-1) - if err != nil { return Ptau{}, err } @@ -328,7 +325,6 @@ func ReadPtau(zkeyPath string) (Ptau, error) { fmt.Printf("tauG2: \n") PtauPubKey.TauG2, err = readG2Array(reader, twoToPower) - if err != nil { return Ptau{}, err } @@ -339,7 +335,6 @@ func ReadPtau(zkeyPath string) (Ptau, error) { fmt.Printf("alphaTauG1: \n") PtauPubKey.AlphaTauG1, err = readG1Array(reader, twoToPower) - if err != nil { return Ptau{}, err } @@ -350,7 +345,6 @@ func ReadPtau(zkeyPath string) (Ptau, error) { fmt.Printf("betaTauG1: \n") PtauPubKey.BetaTauG1, err = readG1Array(reader, twoToPower) - if err != nil { return Ptau{}, err } @@ -361,7 +355,6 @@ func ReadPtau(zkeyPath string) (Ptau, error) { fmt.Printf("betaG2: \n") PtauPubKey.BetaG2, err = readG2(reader) - if err != nil { return Ptau{}, err } @@ -373,7 +366,6 @@ func readPtauHeader(reader io.ReadSeeker) (PtauHeader, error) { var header PtauHeader n8, err := readULE32(reader) - if err != nil { return PtauHeader{}, err } @@ -381,7 +373,6 @@ func readPtauHeader(reader io.ReadSeeker) (PtauHeader, error) { header.N8 = n8 prime, err := readBigInt(reader, n8) - if err != nil { return PtauHeader{}, err } @@ -389,7 +380,6 @@ func readPtauHeader(reader io.ReadSeeker) (PtauHeader, error) { header.Prime = prime power, err := readULE32(reader) - if err != nil { return PtauHeader{}, err } @@ -403,7 +393,6 @@ func readG1Array(reader io.ReadSeeker, numPoints uint32) ([]G1, error) { g1s := make([]G1, numPoints) for i := uint32(0); i < numPoints; i++ { g1, err := readG1(reader) - if err != nil { return []G1{}, err } @@ -418,7 +407,6 @@ func readG2Array(reader io.ReadSeeker, numPoints uint32) ([]G2, error) { for i := uint32(0); i < numPoints; i++ { g2, err := readG2(reader) - if err != nil { return []G2{}, err } @@ -431,13 +419,11 @@ func readG2Array(reader io.ReadSeeker, numPoints uint32) ([]G2, error) { func readTauG2(reader io.ReadSeeker) ([]G2, error) { tauG2_s, err := readG2(reader) - if err != nil { return []G2{}, err } tauG2_sx, err := readG2(reader) - if err != nil { return []G2{}, err } @@ -449,7 +435,6 @@ func readG1(reader io.ReadSeeker) (G1, error) { var g1 G1 x, err := readBigInt(reader, BN254_FIELD_ELEMENT_SIZE) - if err != nil { return G1{}, err } @@ -457,7 +442,6 @@ func readG1(reader io.ReadSeeker) (G1, error) { g1[0] = x y, err := readBigInt(reader, BN254_FIELD_ELEMENT_SIZE) - if err != nil { return G1{}, err } @@ -471,7 +455,6 @@ func readG2(reader io.ReadSeeker) (G2, error) { var g2 G2 x0, err := readBigInt(reader, BN254_FIELD_ELEMENT_SIZE) - if err != nil { return G2{}, err } @@ -479,7 +462,6 @@ func readG2(reader io.ReadSeeker) (G2, error) { g2[0] = x0 x1, err := readBigInt(reader, BN254_FIELD_ELEMENT_SIZE) - if err != nil { return G2{}, err } @@ -487,7 +469,6 @@ func readG2(reader io.ReadSeeker) (G2, error) { g2[1] = x1 y0, err := readBigInt(reader, BN254_FIELD_ELEMENT_SIZE) - if err != nil { return G2{}, err } @@ -495,7 +476,6 @@ func readG2(reader io.ReadSeeker) (G2, error) { g2[2] = y0 y1, err := readBigInt(reader, BN254_FIELD_ELEMENT_SIZE) - if err != nil { return G2{}, err } diff --git a/go.mod b/go.mod index 64f7e9c..99f27a9 100644 --- a/go.mod +++ b/go.mod @@ -1,33 +1,33 @@ module github.com/worldcoin/ptau-deserializer -go 1.20 +go 1.22 -require github.com/consensys/gnark v0.8.0 +require github.com/consensys/gnark v0.10.0 require ( - github.com/consensys/gnark-crypto v0.9.1 + github.com/consensys/gnark-crypto v0.12.2-0.20240215234832-d72fcb379d3e github.com/stretchr/testify v1.8.4 github.com/urfave/cli/v2 v2.25.7 ) require ( + github.com/bits-and-blooms/bitset v1.8.0 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/fxamacker/cbor/v2 v2.4.0 // indirect - github.com/google/pprof v0.0.0-20230602150820-91b7bce49751 // indirect + github.com/fxamacker/cbor/v2 v2.5.0 // indirect + github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b // indirect github.com/kr/text v0.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/rs/zerolog v1.29.1 // indirect + github.com/rs/zerolog v1.30.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect - golang.org/x/sys v0.9.0 // indirect + golang.org/x/sys v0.15.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/go.sum b/go.sum index 40e6a75..afcd59d 100644 --- a/go.sum +++ b/go.sum @@ -1,28 +1,37 @@ +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= -github.com/consensys/gnark v0.8.0 h1:0bQ2MyDG4oNjMQpNyL8HjrrUSSL3yYJg0Elzo6LzmcU= -github.com/consensys/gnark v0.8.0/go.mod h1:aKmA7dIiLbTm0OV37xTq0z+Bpe4xER8EhRLi6necrm8= -github.com/consensys/gnark-crypto v0.9.1 h1:mru55qKdWl3E035hAoh1jj9d7hVnYY5pfb6tmovSmII= -github.com/consensys/gnark-crypto v0.9.1/go.mod h1:a2DQL4+5ywF6safEeZFEPGRiiGbjzGFRUN2sg06VuU4= +github.com/consensys/gnark v0.10.0 h1:yhi6ThoeFP7WrH8zQDaO56WVXe9iJEBSkfrZ9PZxabw= +github.com/consensys/gnark v0.10.0/go.mod h1:VJU5JrrhZorbfDH+EUjcuFWr2c5z19tHPh8D6KVQksU= +github.com/consensys/gnark-crypto v0.12.2-0.20240215234832-d72fcb379d3e h1:MKdOuCiy2DAX1tMp2YsmtNDaqdigpY6B5cZQDJ9BvEo= +github.com/consensys/gnark-crypto v0.12.2-0.20240215234832-d72fcb379d3e/go.mod h1:wKqwsieaKPThcFkHe0d0zMsbHEUWFmZcG7KBCse210o= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fxamacker/cbor/v2 v2.4.0 h1:ri0ArlOR+5XunOP8CRUowT0pSJOwhW098ZCUyskZD88= -github.com/fxamacker/cbor/v2 v2.4.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= +github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADivE= +github.com/fxamacker/cbor/v2 v2.5.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/pprof v0.0.0-20230602150820-91b7bce49751 h1:hR7/MlvK23p6+lIw9SN1TigNLn9ZnF3W4SYRKq2gAHs= -github.com/google/pprof v0.0.0-20230602150820-91b7bce49751/go.mod h1:Jh3hGz2jkYak8qXPD19ryItVnUgpgeqzdkY/D0EaeuA= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b h1:h9U78+dx9a4BKdQkBBos92HalKpaGKHrp+3Uo6yTodo= +github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= +github.com/ingonyama-zk/icicle v0.0.0-20230928131117-97f0079e5c71 h1:YxI1RTPzpFJ3MBmxPl3Bo0F7ume7CmQEC1M9jL6CT94= +github.com/ingonyama-zk/icicle v0.0.0-20230928131117-97f0079e5c71/go.mod h1:kAK8/EoN7fUEmakzgZIYdWy1a2rBnpCaZLqSHwZWxEk= +github.com/ingonyama-zk/iciclegnark v0.1.0 h1:88MkEghzjQBMjrYRJFxZ9oR9CTIpB8NG2zLeCJSvXKQ= +github.com/ingonyama-zk/iciclegnark v0.1.0/go.mod h1:wz6+IpyHKs6UhMMoQpNqz1VY+ddfKqC/gRwR/64W6WU= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= +github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= @@ -36,11 +45,11 @@ github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFV github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= +github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= @@ -51,14 +60,19 @@ github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= diff --git a/main.go b/main.go index 53a7616..7a58bad 100644 --- a/main.go +++ b/main.go @@ -33,7 +33,7 @@ func main() { panic(err) } - //ptau, err := deserializer.ReadPtau(ptauFilePath) + // ptau, err := deserializer.ReadPtau(ptauFilePath) //if err != nil { // return err