From e043e7ac155d0077c120df2dceedef6411b8493c Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Thu, 17 Feb 2022 22:15:27 +0800 Subject: [PATCH 01/24] add bn256 add opcode --- data/transactions/logic/eval.go | 24 ++++++++++++++++++++++++ data/transactions/logic/opcodes.go | 1 + 2 files changed, 25 insertions(+) diff --git a/data/transactions/logic/eval.go b/data/transactions/logic/eval.go index 6c5145a9cd..a552bd90bc 100644 --- a/data/transactions/logic/eval.go +++ b/data/transactions/logic/eval.go @@ -31,6 +31,7 @@ import ( "runtime" "strings" + "golang.org/x/crypto/bn256" "golang.org/x/crypto/sha3" "github.com/algorand/go-algorand/config" @@ -1249,6 +1250,29 @@ func opDivw(cx *EvalContext) { cx.stack[pprev].Uint = quo } +func opBn256Add(cx *EvalContext) { + last := len(cx.stack) - 1 + + input := cx.stack[last].Bytes + + a, ok := new(bn256.G1).Unmarshal(input[:64]) + if !ok { + cx.err = errors.New("unmarshal failed") + return + } + + b, ok := new(bn256.G1).Unmarshal(input[64:]) + if !ok { + cx.err = errors.New("unmarshal failed") + return + } + + res := new(bn256.G1).Add(a, b) + resBytes := res.Marshal() + + cx.stack[last].Bytes = resBytes +} + func opLt(cx *EvalContext) { last := len(cx.stack) - 1 prev := last - 1 diff --git a/data/transactions/logic/opcodes.go b/data/transactions/logic/opcodes.go index 75aa9826e6..ca7f03aec4 100644 --- a/data/transactions/logic/opcodes.go +++ b/data/transactions/logic/opcodes.go @@ -315,6 +315,7 @@ var OpSpecs = []OpSpec{ {0x95, "expw", opExpw, asmDefault, disDefault, twoInts, twoInts, 4, modeAny, costly(10)}, {0x96, "bsqrt", opBytesSqrt, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(40)}, {0x97, "divw", opDivw, asmDefault, disDefault, twoInts.plus(oneInt), oneInt, 6, modeAny, opDefault}, + {0x98, "bn256_add", opBn256Add, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(9)}, // Byteslice math. {0xa0, "b+", opBytesPlus, asmDefault, disDefault, twoBytes, oneBytes, 4, modeAny, costly(10)}, From bc1f9afa5c4a22c19bc0d18767bb0e356ca1b38d Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Fri, 18 Feb 2022 21:03:40 +0800 Subject: [PATCH 02/24] add bn256 add, scalar multiply and pairing opcode --- data/transactions/logic/eval.go | 48 +++++++++++++++++++++++++++++- data/transactions/logic/opcodes.go | 4 ++- 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/data/transactions/logic/eval.go b/data/transactions/logic/eval.go index a552bd90bc..85ee58d1f9 100644 --- a/data/transactions/logic/eval.go +++ b/data/transactions/logic/eval.go @@ -1261,7 +1261,7 @@ func opBn256Add(cx *EvalContext) { return } - b, ok := new(bn256.G1).Unmarshal(input[64:]) + b, ok := new(bn256.G1).Unmarshal(input[64:128]) if !ok { cx.err = errors.New("unmarshal failed") return @@ -1273,6 +1273,52 @@ func opBn256Add(cx *EvalContext) { cx.stack[last].Bytes = resBytes } +func opBn256ScalarMul(cx *EvalContext) { + last := len(cx.stack) - 1 + + input := cx.stack[last].Bytes + + a, ok := new(bn256.G1).Unmarshal(input[:64]) + if !ok { + cx.err = errors.New("unmarshal failed") + return + } + + k := new(big.Int).SetBytes(input[64:96]) + + res := new(bn256.G1).ScalarMult(a, k) + resBytes := res.Marshal() + + cx.stack[last].Bytes = resBytes +} + +func opBn256Pairing(cx *EvalContext) { + last := len(cx.stack) - 1 + prev := last - 1 + + g1bytes := cx.stack[prev].Bytes + g2bytes := cx.stack[last].Bytes + + g1, ok := new(bn256.G1).Unmarshal(g1bytes[:64]) + if !ok { + cx.err = errors.New("unmarshal failed") + return + } + + g2, ok := new(bn256.G2).Unmarshal(g2bytes[:128]) + if !ok { + cx.err = errors.New("unmarshal failed") + return + } + + res := bn256.Pair(g1, g2) + resBytes := res.Marshal() + + cx.stack[prev].Bytes = resBytes[0:64] + cx.stack[last].Bytes = resBytes[64:128] + cx.stack = append(cx.stack, stackValue{Bytes: resBytes[128:192]}, stackValue{Bytes: resBytes[192:256]}, stackValue{Bytes: resBytes[256:320]}, stackValue{Bytes: resBytes[320:384]}) +} + func opLt(cx *EvalContext) { last := len(cx.stack) - 1 prev := last - 1 diff --git a/data/transactions/logic/opcodes.go b/data/transactions/logic/opcodes.go index ca7f03aec4..a1a6c61e36 100644 --- a/data/transactions/logic/opcodes.go +++ b/data/transactions/logic/opcodes.go @@ -315,7 +315,9 @@ var OpSpecs = []OpSpec{ {0x95, "expw", opExpw, asmDefault, disDefault, twoInts, twoInts, 4, modeAny, costly(10)}, {0x96, "bsqrt", opBytesSqrt, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(40)}, {0x97, "divw", opDivw, asmDefault, disDefault, twoInts.plus(oneInt), oneInt, 6, modeAny, opDefault}, - {0x98, "bn256_add", opBn256Add, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(9)}, + {0x98, "bn256_add", opBn256Add, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(45)}, + {0x99, "bn256_scalar_mul", opBn256ScalarMul, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(1800)}, + {0x9a, "bn256_pairing", opBn256Pairing, asmDefault, disDefault, twoBytes, threeBytes.plus(threeBytes), 6, modeAny, costly(23042)}, // Byteslice math. {0xa0, "b+", opBytesPlus, asmDefault, disDefault, twoBytes, oneBytes, 4, modeAny, costly(10)}, From 5699c9971e18bd92ba4f980ef16ddfc5f8ecf7f8 Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Thu, 24 Feb 2022 20:41:55 +0800 Subject: [PATCH 03/24] replace with gnark bn254 and bench --- data/transactions/logic/eval.go | 47 +++++---- data/transactions/logic/evalCrypto_test.go | 116 +++++++++++++++++++++ data/transactions/logic/opcodes.go | 2 +- go.mod | 1 + go.sum | 11 ++ 5 files changed, 158 insertions(+), 19 deletions(-) diff --git a/data/transactions/logic/eval.go b/data/transactions/logic/eval.go index 85ee58d1f9..7c9d5fce10 100644 --- a/data/transactions/logic/eval.go +++ b/data/transactions/logic/eval.go @@ -31,7 +31,6 @@ import ( "runtime" "strings" - "golang.org/x/crypto/bn256" "golang.org/x/crypto/sha3" "github.com/algorand/go-algorand/config" @@ -41,6 +40,7 @@ import ( "github.com/algorand/go-algorand/data/transactions" "github.com/algorand/go-algorand/logging" "github.com/algorand/go-algorand/protocol" + "github.com/consensys/gnark-crypto/ecc/bn254" ) // EvalMaxVersion is the max version we can interpret and run @@ -1255,19 +1255,21 @@ func opBn256Add(cx *EvalContext) { input := cx.stack[last].Bytes - a, ok := new(bn256.G1).Unmarshal(input[:64]) - if !ok { + a := new(bn254.G1Affine) + err := a.Unmarshal(input[:64]) + if err != nil { cx.err = errors.New("unmarshal failed") return } - b, ok := new(bn256.G1).Unmarshal(input[64:128]) - if !ok { + b := new(bn254.G1Affine) + err = b.Unmarshal(input[64:128]) + if err != nil { cx.err = errors.New("unmarshal failed") return } - res := new(bn256.G1).Add(a, b) + res := new(bn254.G1Affine).Add(a, b) resBytes := res.Marshal() cx.stack[last].Bytes = resBytes @@ -1278,15 +1280,16 @@ func opBn256ScalarMul(cx *EvalContext) { input := cx.stack[last].Bytes - a, ok := new(bn256.G1).Unmarshal(input[:64]) - if !ok { + a := new(bn254.G1Affine) + err := a.Unmarshal(input[:64]) + if err != nil { cx.err = errors.New("unmarshal failed") return } k := new(big.Int).SetBytes(input[64:96]) - res := new(bn256.G1).ScalarMult(a, k) + res := new(bn254.G1Affine).ScalarMultiplication(a, k) resBytes := res.Marshal() cx.stack[last].Bytes = resBytes @@ -1299,24 +1302,32 @@ func opBn256Pairing(cx *EvalContext) { g1bytes := cx.stack[prev].Bytes g2bytes := cx.stack[last].Bytes - g1, ok := new(bn256.G1).Unmarshal(g1bytes[:64]) - if !ok { + g1 := new(bn254.G1Affine) + err := g1.Unmarshal(g1bytes[:64]) + if err != nil { cx.err = errors.New("unmarshal failed") return } - g2, ok := new(bn256.G2).Unmarshal(g2bytes[:128]) - if !ok { + g2 := new(bn254.G2Affine) + err = g2.Unmarshal(g2bytes[:128]) + if err != nil { cx.err = errors.New("unmarshal failed") return } - res := bn256.Pair(g1, g2) - resBytes := res.Marshal() + ok, err := bn254.PairingCheck([]bn254.G1Affine{*g1}, []bn254.G2Affine{*g2}) + if err != nil { + cx.err = errors.New("pairing failed") + return + } - cx.stack[prev].Bytes = resBytes[0:64] - cx.stack[last].Bytes = resBytes[64:128] - cx.stack = append(cx.stack, stackValue{Bytes: resBytes[128:192]}, stackValue{Bytes: resBytes[192:256]}, stackValue{Bytes: resBytes[256:320]}, stackValue{Bytes: resBytes[320:384]}) + cx.stack = cx.stack[:last] + if ok { + cx.stack[prev].Bytes = []byte{1} + } else { + cx.stack[prev].Bytes = []byte{0} + } } func opLt(cx *EvalContext) { diff --git a/data/transactions/logic/evalCrypto_test.go b/data/transactions/logic/evalCrypto_test.go index e0cb98bac9..1235a7fadc 100644 --- a/data/transactions/logic/evalCrypto_test.go +++ b/data/transactions/logic/evalCrypto_test.go @@ -24,8 +24,10 @@ import ( "encoding/hex" "fmt" "math/big" + mrand "math/rand" "testing" + "github.com/consensys/gnark-crypto/ecc/bn254" "github.com/stretchr/testify/require" "github.com/algorand/go-algorand/crypto" @@ -522,3 +524,117 @@ int 1` benchmarkEcdsa(b, source) }) } + +type benchmarkBn256Data struct { + ab []byte + ak []byte + g1 []byte + g2 []byte + programs []byte +} + +func benchmarkBn256DataGenData(b *testing.B) (data []benchmarkBn256Data) { + data = make([]benchmarkBn256Data, b.N) + var g1Gen bn254.G1Jac + var g1GenAff bn254.G1Affine + g1Gen.X.SetString("1") + g1Gen.Y.SetString("2") + g1Gen.Z.SetString("1") + g1GenAff.FromJacobian(&g1Gen) + var a bn254.G1Affine + a.ScalarMultiplication(&g1GenAff, new(big.Int).SetUint64(mrand.Uint64())) + var g2Gen bn254.G2Jac + var g2GenAff bn254.G2Affine + g2Gen.X.SetString("10857046999023057135944570762232829481370756359578518086990519993285655852781", + "11559732032986387107991004021392285783925812861821192530917403151452391805634") + g2Gen.Y.SetString("8495653923123431417604973247489272438418190587263600148770280649306958101930", + "4082367875863433681332203403145435568316851327593401208105741076214120093531") + g2Gen.Z.SetString("1", + "0") + g2GenAff.FromJacobian(&g2Gen) + + for i := 0; i < b.N; i++ { + var a bn254.G1Affine + a.ScalarMultiplication(&g1GenAff, new(big.Int).SetUint64(mrand.Uint64())) + + var b bn254.G1Affine + b.ScalarMultiplication(&g1GenAff, new(big.Int).SetUint64(mrand.Uint64())) + + // _, aa, _ := bn256.RandomG1(rand.Reader) + var aa bn254.G1Affine + aa.ScalarMultiplication(&g1GenAff, new(big.Int).SetUint64(mrand.Uint64())) + bytes := make([]byte, 32) + rand.Read(bytes) + + data[i].ab = append(a.Marshal(), b.Marshal()...) + data[i].ak = append(aa.Marshal(), bytes...) + + data[i].g1 = a.Marshal() + + var g2 bn254.G2Affine + g2.ScalarMultiplication(&g2GenAff, new(big.Int).SetUint64(mrand.Uint64())) + data[i].g2 = g2.Marshal() + } + return data +} + +func benchmarkBn256(b *testing.B, source string) { + data := benchmarkBn256DataGenData(b) + ops, err := AssembleStringWithVersion(source, 6) + require.NoError(b, err) + for i := 0; i < b.N; i++ { + data[i].programs = ops.Program + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + var txn transactions.SignedTxn + txn.Lsig.Logic = data[i].programs + txn.Lsig.Args = [][]byte{data[i].ab, data[i].ak, data[i].g1, data[i].g2} + ep := defaultEvalParams(&txn) + pass, err := EvalSignature(0, ep) + if !pass { + b.Log(hex.EncodeToString(data[i].programs)) + b.Log(ep.Trace.String()) + } + if err != nil { + require.NoError(b, err) + } + if !pass { + require.True(b, pass) + } + } +} + +func BenchmarkBn256(b *testing.B) { + b.Run("bn256 add", func(b *testing.B) { + source := `#pragma version 6 +arg 0 +bn256_add +pop +int 1 +` + benchmarkBn256(b, source) + }) + + b.Run("bn256 scalar mul", func(b *testing.B) { + source := `#pragma version 6 +arg 1 +bn256_scalar_mul +pop +int 1 +` + benchmarkBn256(b, source) + }) + + b.Run("bn256 pairing", func(b *testing.B) { + source := `#pragma version 6 +arg 2 +arg 3 +bn256_pairing +pop +int 1 +` + benchmarkBn256(b, source) + }) +} diff --git a/data/transactions/logic/opcodes.go b/data/transactions/logic/opcodes.go index a1a6c61e36..f400a6aa02 100644 --- a/data/transactions/logic/opcodes.go +++ b/data/transactions/logic/opcodes.go @@ -317,7 +317,7 @@ var OpSpecs = []OpSpec{ {0x97, "divw", opDivw, asmDefault, disDefault, twoInts.plus(oneInt), oneInt, 6, modeAny, opDefault}, {0x98, "bn256_add", opBn256Add, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(45)}, {0x99, "bn256_scalar_mul", opBn256ScalarMul, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(1800)}, - {0x9a, "bn256_pairing", opBn256Pairing, asmDefault, disDefault, twoBytes, threeBytes.plus(threeBytes), 6, modeAny, costly(23042)}, + {0x9a, "bn256_pairing", opBn256Pairing, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(2300)}, // Byteslice math. {0xa0, "b+", opBytesPlus, asmDefault, disDefault, twoBytes, oneBytes, 4, modeAny, costly(10)}, diff --git a/go.mod b/go.mod index 19a67f8119..247b3cded0 100644 --- a/go.mod +++ b/go.mod @@ -13,6 +13,7 @@ require ( github.com/algorand/websocket v1.4.4 github.com/aws/aws-sdk-go v1.16.5 github.com/chrismcguire/gobberish v0.0.0-20150821175641-1d8adb509a0e + github.com/consensys/gnark-crypto v0.6.1 // indirect github.com/cpuguy83/go-md2man v1.0.8 // indirect github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018 github.com/dchest/siphash v1.2.1 diff --git a/go.sum b/go.sum index 1e73be8d00..1553928209 100644 --- a/go.sum +++ b/go.sum @@ -20,6 +20,9 @@ github.com/aws/aws-sdk-go v1.16.5 h1:NVxzZXIuwX828VcJrpNxxWjur1tlOBISdMdDdHIKHcc github.com/aws/aws-sdk-go v1.16.5/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/chrismcguire/gobberish v0.0.0-20150821175641-1d8adb509a0e h1:CHPYEbz71w8DqJ7DRIq+MXyCQsdibK08vdcQTY4ufas= github.com/chrismcguire/gobberish v0.0.0-20150821175641-1d8adb509a0e/go.mod h1:6Xhs0ZlsRjXLIiSMLKafbZxML/j30pg9Z1priLuha5s= +github.com/consensys/bavard v0.1.9/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= +github.com/consensys/gnark-crypto v0.6.1 h1:MuWaJyWzSw8wQUOfiZOlRwYjfweIj8dM/u2NN6m0O04= +github.com/consensys/gnark-crypto v0.6.1/go.mod h1:s41Bl3YIpNgu/zdvlSzf/xZkyV8MUmoBY96RmuB8x70= github.com/cpuguy83/go-md2man v1.0.8 h1:DwoNytLphI8hzS2Af4D0dfaEaiSq2bN05mEm4R6vf8M= github.com/cpuguy83/go-md2man v1.0.8/go.mod h1:N6JayAiVKtlHSnuTCeuLSQVs75hb8q+dYQLjr7cDsKY= github.com/cyberdelia/templates v0.0.0-20191230040416-20a325f050d4 h1:Fphwr1XDjkTR/KFbrrkLfY6D2CEOlHqFGomQQrxcHFs= @@ -57,6 +60,7 @@ github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1ks85zJ1lfDGgIiMDuIptTOhJq+zKyg= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -90,6 +94,7 @@ github.com/labstack/echo/v4 v4.1.17 h1:PQIBaRplyRy3OjwILGkPg89JRtH2x5bssi59G2EL3 github.com/labstack/echo/v4 v4.1.17/go.mod h1:Tn2yRQL/UclUalpb5rPdXDevbkJ+lp/2svdyFBg6CHQ= github.com/labstack/gommon v0.3.0 h1:JEeO0bvc78PKdyHxloTKiF8BD5iGrH8T6MSeGvSgob0= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= @@ -110,6 +115,9 @@ github.com/mattn/go-sqlite3 v1.10.0 h1:jbhqpg7tQe4SupckyijYiy0mJJ/pRyHvXf7JdWK86 github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/miekg/dns v1.1.27 h1:aEH/kqUzUxGJ/UHcEKdJY+ugH6WEzsEBBSPa8zuy1aM= github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= +github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= +github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= @@ -156,6 +164,7 @@ golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= @@ -186,6 +195,7 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200413165638-669c56c373c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -222,3 +232,4 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= From 85ca7bed0f47a541b980e89ff04447f579fbbff4 Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Thu, 24 Feb 2022 21:13:54 +0800 Subject: [PATCH 04/24] update opcost for bn256 according to benchmark --- data/transactions/logic/opcodes.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/transactions/logic/opcodes.go b/data/transactions/logic/opcodes.go index f400a6aa02..2def7cc436 100644 --- a/data/transactions/logic/opcodes.go +++ b/data/transactions/logic/opcodes.go @@ -315,9 +315,9 @@ var OpSpecs = []OpSpec{ {0x95, "expw", opExpw, asmDefault, disDefault, twoInts, twoInts, 4, modeAny, costly(10)}, {0x96, "bsqrt", opBytesSqrt, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(40)}, {0x97, "divw", opDivw, asmDefault, disDefault, twoInts.plus(oneInt), oneInt, 6, modeAny, opDefault}, - {0x98, "bn256_add", opBn256Add, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(45)}, - {0x99, "bn256_scalar_mul", opBn256ScalarMul, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(1800)}, - {0x9a, "bn256_pairing", opBn256Pairing, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(2300)}, + {0x98, "bn256_add", opBn256Add, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(218)}, + {0x99, "bn256_scalar_mul", opBn256ScalarMul, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(1208)}, + {0x9a, "bn256_pairing", opBn256Pairing, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(11599)}, // Byteslice math. {0xa0, "b+", opBytesPlus, asmDefault, disDefault, twoBytes, oneBytes, 4, modeAny, costly(10)}, From 2d394f4a1e51a9b7687f1a6dc70ba46666d97356 Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Thu, 24 Feb 2022 21:28:13 +0800 Subject: [PATCH 05/24] typo --- data/transactions/logic/opcodes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/transactions/logic/opcodes.go b/data/transactions/logic/opcodes.go index 2def7cc436..8573173e4c 100644 --- a/data/transactions/logic/opcodes.go +++ b/data/transactions/logic/opcodes.go @@ -317,7 +317,7 @@ var OpSpecs = []OpSpec{ {0x97, "divw", opDivw, asmDefault, disDefault, twoInts.plus(oneInt), oneInt, 6, modeAny, opDefault}, {0x98, "bn256_add", opBn256Add, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(218)}, {0x99, "bn256_scalar_mul", opBn256ScalarMul, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(1208)}, - {0x9a, "bn256_pairing", opBn256Pairing, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(11599)}, + {0x9a, "bn256_pairing", opBn256Pairing, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(10599)}, // Byteslice math. {0xa0, "b+", opBytesPlus, asmDefault, disDefault, twoBytes, oneBytes, 4, modeAny, costly(10)}, From ab407ee3f1f910a538506b28dc14005ad52df064 Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Tue, 15 Mar 2022 17:59:11 +0800 Subject: [PATCH 06/24] use set bytes to avoid gnark point decompression to reduce cost --- data/transactions/logic/eval.go | 121 +++++++++++++-------- data/transactions/logic/evalCrypto_test.go | 32 +++--- data/transactions/logic/opcodes.go | 6 +- 3 files changed, 96 insertions(+), 63 deletions(-) diff --git a/data/transactions/logic/eval.go b/data/transactions/logic/eval.go index 7c9d5fce10..01269e0fa0 100644 --- a/data/transactions/logic/eval.go +++ b/data/transactions/logic/eval.go @@ -41,6 +41,7 @@ import ( "github.com/algorand/go-algorand/logging" "github.com/algorand/go-algorand/protocol" "github.com/consensys/gnark-crypto/ecc/bn254" + "github.com/consensys/gnark-crypto/ecc/bn254/fp" ) // EvalMaxVersion is the max version we can interpret and run @@ -1250,73 +1251,107 @@ func opDivw(cx *EvalContext) { cx.stack[pprev].Uint = quo } -func opBn256Add(cx *EvalContext) { - last := len(cx.stack) - 1 +func bytesToBN254Field(b []byte) (ret fp.Element) { + var x big.Int + x.SetBytes(b[:32]) + return +} - input := cx.stack[last].Bytes +func bytesToBN254G1(b []byte) (ret bn254.G1Affine) { + ret.X = bytesToBN254Field(b[:32]) + ret.Y = bytesToBN254Field(b[32:64]) + return +} - a := new(bn254.G1Affine) - err := a.Unmarshal(input[:64]) - if err != nil { - cx.err = errors.New("unmarshal failed") - return +func bytesToBN254G1s(b []byte) (ret []bn254.G1Affine) { + for i := 0; i < len(b)/64; i++ { + ret = append(ret, bytesToBN254G1(b[(i*64):(i*64+64)])) } + return +} - b := new(bn254.G1Affine) - err = b.Unmarshal(input[64:128]) - if err != nil { - cx.err = errors.New("unmarshal failed") - return +func bytesToBN254G2(b []byte) (ret bn254.G2Affine) { + ret.X.A0 = bytesToBN254Field(b[:32]) + ret.X.A1 = bytesToBN254Field(b[32:64]) + ret.Y.A0 = bytesToBN254Field(b[64:96]) + ret.Y.A1 = bytesToBN254Field(b[96:128]) + return +} + +func bytesToBN254G2s(b []byte) (ret []bn254.G2Affine) { + for i := 0; i < len(b)/128; i++ { + ret = append(ret, bytesToBN254G2(b[(i*128):(i*128+128)])) } + return +} - res := new(bn254.G1Affine).Add(a, b) - resBytes := res.Marshal() +func bN254G1ToBytes(g1 *bn254.G1Affine) (ret []byte) { + retX := g1.X.Bytes() + retY := g1.Y.Bytes() + ret = append(retX[:], retY[:]...) + return +} + +func bN254G2ToBytes(g2 *bn254.G2Affine) (ret []byte) { + retXA0 := g2.X.A0.Bytes() + retXA1 := g2.X.A1.Bytes() + retYA0 := g2.Y.A0.Bytes() + retYA1 := g2.Y.A1.Bytes() + + ret = append(retXA0[:], retXA1[:]...) + ret = append(ret[:], retYA0[:]...) + ret = append(ret[:], retYA1[:]...) - cx.stack[last].Bytes = resBytes + return +} + +func opBn256Add(cx *EvalContext) { + last := len(cx.stack) - 1 + prev := last - 1 + + aBytes := cx.stack[prev].Bytes + bBytes := cx.stack[last].Bytes + + a := bytesToBN254G1(aBytes) + b := bytesToBN254G1(bBytes) + + res := new(bn254.G1Affine).Add(&a, &b) + + resBytes := bN254G1ToBytes(res) + + cx.stack = cx.stack[:last] + cx.stack[prev].Bytes = resBytes } func opBn256ScalarMul(cx *EvalContext) { last := len(cx.stack) - 1 + prev := last - 1 - input := cx.stack[last].Bytes + aBytes := cx.stack[prev].Bytes + a := bytesToBN254G1(aBytes) - a := new(bn254.G1Affine) - err := a.Unmarshal(input[:64]) - if err != nil { - cx.err = errors.New("unmarshal failed") - return - } + kBytes := cx.stack[last].Bytes + k := new(big.Int).SetBytes(kBytes[:32]) - k := new(big.Int).SetBytes(input[64:96]) + res := new(bn254.G1Affine).ScalarMultiplication(&a, k) - res := new(bn254.G1Affine).ScalarMultiplication(a, k) - resBytes := res.Marshal() + resBytes := bN254G1ToBytes(res) - cx.stack[last].Bytes = resBytes + cx.stack = cx.stack[:last] + cx.stack[prev].Bytes = resBytes } func opBn256Pairing(cx *EvalContext) { last := len(cx.stack) - 1 prev := last - 1 - g1bytes := cx.stack[prev].Bytes - g2bytes := cx.stack[last].Bytes + g1Bytes := cx.stack[prev].Bytes + g2Bytes := cx.stack[last].Bytes - g1 := new(bn254.G1Affine) - err := g1.Unmarshal(g1bytes[:64]) - if err != nil { - cx.err = errors.New("unmarshal failed") - return - } - - g2 := new(bn254.G2Affine) - err = g2.Unmarshal(g2bytes[:128]) - if err != nil { - cx.err = errors.New("unmarshal failed") - return - } + g1 := bytesToBN254G1s(g1Bytes) + g2 := bytesToBN254G2s(g2Bytes) - ok, err := bn254.PairingCheck([]bn254.G1Affine{*g1}, []bn254.G2Affine{*g2}) + ok, err := bn254.PairingCheck(g1, g2) if err != nil { cx.err = errors.New("pairing failed") return diff --git a/data/transactions/logic/evalCrypto_test.go b/data/transactions/logic/evalCrypto_test.go index 1235a7fadc..967b029339 100644 --- a/data/transactions/logic/evalCrypto_test.go +++ b/data/transactions/logic/evalCrypto_test.go @@ -526,8 +526,9 @@ int 1` } type benchmarkBn256Data struct { - ab []byte - ak []byte + a []byte + b []byte + k []byte g1 []byte g2 []byte programs []byte @@ -560,20 +561,15 @@ func benchmarkBn256DataGenData(b *testing.B) (data []benchmarkBn256Data) { var b bn254.G1Affine b.ScalarMultiplication(&g1GenAff, new(big.Int).SetUint64(mrand.Uint64())) - // _, aa, _ := bn256.RandomG1(rand.Reader) - var aa bn254.G1Affine - aa.ScalarMultiplication(&g1GenAff, new(big.Int).SetUint64(mrand.Uint64())) - bytes := make([]byte, 32) - rand.Read(bytes) - - data[i].ab = append(a.Marshal(), b.Marshal()...) - data[i].ak = append(aa.Marshal(), bytes...) - - data[i].g1 = a.Marshal() - var g2 bn254.G2Affine g2.ScalarMultiplication(&g2GenAff, new(big.Int).SetUint64(mrand.Uint64())) - data[i].g2 = g2.Marshal() + + data[i].a = bN254G1ToBytes(&a) + data[i].b = bN254G1ToBytes(&b) + data[i].k = new(big.Int).SetUint64(mrand.Uint64()).Bytes() + + data[i].g1, _ = hex.DecodeString("0ebc9fc712b13340c800793386a88385e40912a21bacad2cc7db17d36e54c802238449426931975cced7200f08681ab9a86a2e5c2336cf625451cf2413318e3226a30a875a3f67768a5fa6967e27e301e0a417b21bb9cace9f68a3ab83178e2e07060c2efe16605495a4fd9396819c53cccf1ea48012c0481d3abe65470f1d4f2af861d56dda2857f11e4b4c840e69964b4b7c4a8dec61cca3603dd5f88060fb2e1721a874180b5ab5da85a13529d17b515c65d6fdb17ed4bf9a2cc5e3cb25ce17ea15dc9e34f6e0205d9df2ec3c327884d305f728e8f6871dd89d6ec13becb701cee1732410ec49c4131536e285b78d168cc3793d2925aa24816bb50d0ff7bc") + data[i].g2, _ = hex.DecodeString("217fbd9a9db5719cfbe3580e3d8750cada058fdfffe95c440a0528ffc608f36e05d6a67604658d40b3e4cac3c46150f2702d87739b7774d79a8147f7271773b420f9429ee13c1843404bfd70e75efa886c173e57dde32970274d8bc53dfd562403f6276318990d053785b4ca342ebc4581a23a39285804bb74e079aa2ef3ba6622353c72d8deafcb8c0b476af1663f8894ffd4fd96816af6b613157bbf67be1f022d6794717df20cc81df29eeee786eca637a61b264b20cf92bb37118171e0e92b7f0626c0e3b73f2bb0c38dc931b05c201057a4ec85d28125420f84893b53730a2a623cbfb4a79cd8f9be423c4342f94cca7f97717655dbd336b9e6cae4d4311ee5c8c3872c52db7a4230148cedd4ce01a6cca63722846ad56ec2b8b8b81e501148da1936439b8332cac57ee3be2bc9146d1f4199927587f3e530bbff9de4401477eb610803e71eaea5ddcad3af373a0457a558acfa05528cea67768f09121714e07b9b9b56cf41872ec591ea643fd7979271bb96db5f27762e2266a124daa32ac533798860191e4a0b0463979e2ed3d99c959ca37ee5c2f656afbc91da9fa111c0f90c82cfd06752cd3cbfd558058bc9500f91fa16b8063977dfe01c53585f26bc1ad7d1d454dd8156f3f702c8661d3833cd8e4283b5bdc88e86dbc56dd0e618e71891cb02e3a06a6aa04b5dd1436a52826e5b0c569c297c73a0c785e950d9") } return data } @@ -590,7 +586,7 @@ func benchmarkBn256(b *testing.B, source string) { for i := 0; i < b.N; i++ { var txn transactions.SignedTxn txn.Lsig.Logic = data[i].programs - txn.Lsig.Args = [][]byte{data[i].ab, data[i].ak, data[i].g1, data[i].g2} + txn.Lsig.Args = [][]byte{data[i].a, data[i].b, data[i].k, data[i].g1, data[i].g2} ep := defaultEvalParams(&txn) pass, err := EvalSignature(0, ep) if !pass { @@ -610,6 +606,7 @@ func BenchmarkBn256(b *testing.B) { b.Run("bn256 add", func(b *testing.B) { source := `#pragma version 6 arg 0 +arg 1 bn256_add pop int 1 @@ -619,7 +616,8 @@ int 1 b.Run("bn256 scalar mul", func(b *testing.B) { source := `#pragma version 6 -arg 1 +arg 3 +arg 4 bn256_scalar_mul pop int 1 @@ -629,8 +627,8 @@ int 1 b.Run("bn256 pairing", func(b *testing.B) { source := `#pragma version 6 -arg 2 arg 3 +arg 4 bn256_pairing pop int 1 diff --git a/data/transactions/logic/opcodes.go b/data/transactions/logic/opcodes.go index 8573173e4c..3cd28c6aeb 100644 --- a/data/transactions/logic/opcodes.go +++ b/data/transactions/logic/opcodes.go @@ -315,9 +315,9 @@ var OpSpecs = []OpSpec{ {0x95, "expw", opExpw, asmDefault, disDefault, twoInts, twoInts, 4, modeAny, costly(10)}, {0x96, "bsqrt", opBytesSqrt, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(40)}, {0x97, "divw", opDivw, asmDefault, disDefault, twoInts.plus(oneInt), oneInt, 6, modeAny, opDefault}, - {0x98, "bn256_add", opBn256Add, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(218)}, - {0x99, "bn256_scalar_mul", opBn256ScalarMul, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(1208)}, - {0x9a, "bn256_pairing", opBn256Pairing, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(10599)}, + {0x98, "bn256_add", opBn256Add, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(166)}, + {0x99, "bn256_scalar_mul", opBn256ScalarMul, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(892)}, + {0x9a, "bn256_pairing", opBn256Pairing, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(6879)}, // Byteslice math. {0xa0, "b+", opBytesPlus, asmDefault, disDefault, twoBytes, oneBytes, 4, modeAny, costly(10)}, From 2e571ccf94e6f38f1d87b75140cd28e9dbc9a291 Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Thu, 24 Mar 2022 20:47:56 +0800 Subject: [PATCH 07/24] fix unmarshal problem --- data/transactions/logic/eval.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/transactions/logic/eval.go b/data/transactions/logic/eval.go index ba710e3eb4..aa9e49956c 100644 --- a/data/transactions/logic/eval.go +++ b/data/transactions/logic/eval.go @@ -1265,6 +1265,7 @@ func opDivw(cx *EvalContext) { func bytesToBN254Field(b []byte) (ret fp.Element) { var x big.Int x.SetBytes(b[:32]) + ret.SetBigInt(&x) return } @@ -1342,7 +1343,7 @@ func opBn256ScalarMul(cx *EvalContext) { a := bytesToBN254G1(aBytes) kBytes := cx.stack[last].Bytes - k := new(big.Int).SetBytes(kBytes[:32]) + k := new(big.Int).SetBytes(kBytes[:]) res := new(bn254.G1Affine).ScalarMultiplication(&a, k) From d0b5461d7699ccfe13cb0565895b0c9d76683b10 Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Sun, 3 Apr 2022 11:44:10 +0800 Subject: [PATCH 08/24] one pair benchmark --- data/transactions/logic/evalCrypto_test.go | 29 ++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/data/transactions/logic/evalCrypto_test.go b/data/transactions/logic/evalCrypto_test.go index f4b5247f04..b807dc6ca1 100644 --- a/data/transactions/logic/evalCrypto_test.go +++ b/data/transactions/logic/evalCrypto_test.go @@ -799,8 +799,10 @@ func benchmarkBn256DataGenData(b *testing.B) (data []benchmarkBn256Data) { data[i].b = bN254G1ToBytes(&b) data[i].k = new(big.Int).SetUint64(mrand.Uint64()).Bytes() - data[i].g1, _ = hex.DecodeString("0ebc9fc712b13340c800793386a88385e40912a21bacad2cc7db17d36e54c802238449426931975cced7200f08681ab9a86a2e5c2336cf625451cf2413318e3226a30a875a3f67768a5fa6967e27e301e0a417b21bb9cace9f68a3ab83178e2e07060c2efe16605495a4fd9396819c53cccf1ea48012c0481d3abe65470f1d4f2af861d56dda2857f11e4b4c840e69964b4b7c4a8dec61cca3603dd5f88060fb2e1721a874180b5ab5da85a13529d17b515c65d6fdb17ed4bf9a2cc5e3cb25ce17ea15dc9e34f6e0205d9df2ec3c327884d305f728e8f6871dd89d6ec13becb701cee1732410ec49c4131536e285b78d168cc3793d2925aa24816bb50d0ff7bc") - data[i].g2, _ = hex.DecodeString("217fbd9a9db5719cfbe3580e3d8750cada058fdfffe95c440a0528ffc608f36e05d6a67604658d40b3e4cac3c46150f2702d87739b7774d79a8147f7271773b420f9429ee13c1843404bfd70e75efa886c173e57dde32970274d8bc53dfd562403f6276318990d053785b4ca342ebc4581a23a39285804bb74e079aa2ef3ba6622353c72d8deafcb8c0b476af1663f8894ffd4fd96816af6b613157bbf67be1f022d6794717df20cc81df29eeee786eca637a61b264b20cf92bb37118171e0e92b7f0626c0e3b73f2bb0c38dc931b05c201057a4ec85d28125420f84893b53730a2a623cbfb4a79cd8f9be423c4342f94cca7f97717655dbd336b9e6cae4d4311ee5c8c3872c52db7a4230148cedd4ce01a6cca63722846ad56ec2b8b8b81e501148da1936439b8332cac57ee3be2bc9146d1f4199927587f3e530bbff9de4401477eb610803e71eaea5ddcad3af373a0457a558acfa05528cea67768f09121714e07b9b9b56cf41872ec591ea643fd7979271bb96db5f27762e2266a124daa32ac533798860191e4a0b0463979e2ed3d99c959ca37ee5c2f656afbc91da9fa111c0f90c82cfd06752cd3cbfd558058bc9500f91fa16b8063977dfe01c53585f26bc1ad7d1d454dd8156f3f702c8661d3833cd8e4283b5bdc88e86dbc56dd0e618e71891cb02e3a06a6aa04b5dd1436a52826e5b0c569c297c73a0c785e950d9") + data[i].g1, _ = hex.DecodeString("0ebc9fc712b13340c800793386a88385e40912a21bacad2cc7db17d36e54c802238449426931975cced7200f08681ab9a86a2e5c2336cf625451cf2413318e32") + data[i].g2, _ = hex.DecodeString("217fbd9a9db5719cfbe3580e3d8750cada058fdfffe95c440a0528ffc608f36e05d6a67604658d40b3e4cac3c46150f2702d87739b7774d79a8147f7271773b420f9429ee13c1843404bfd70e75efa886c173e57dde32970274d8bc53dfd562403f6276318990d053785b4ca342ebc4581a23a39285804bb74e079aa2ef3ba66") + // data[i].g1, _ = hex.DecodeString("0ebc9fc712b13340c800793386a88385e40912a21bacad2cc7db17d36e54c802238449426931975cced7200f08681ab9a86a2e5c2336cf625451cf2413318e3226a30a875a3f67768a5fa6967e27e301e0a417b21bb9cace9f68a3ab83178e2e07060c2efe16605495a4fd9396819c53cccf1ea48012c0481d3abe65470f1d4f2af861d56dda2857f11e4b4c840e69964b4b7c4a8dec61cca3603dd5f88060fb2e1721a874180b5ab5da85a13529d17b515c65d6fdb17ed4bf9a2cc5e3cb25ce17ea15dc9e34f6e0205d9df2ec3c327884d305f728e8f6871dd89d6ec13becb701cee1732410ec49c4131536e285b78d168cc3793d2925aa24816bb50d0ff7bc") + // data[i].g2, _ = hex.DecodeString("217fbd9a9db5719cfbe3580e3d8750cada058fdfffe95c440a0528ffc608f36e05d6a67604658d40b3e4cac3c46150f2702d87739b7774d79a8147f7271773b420f9429ee13c1843404bfd70e75efa886c173e57dde32970274d8bc53dfd562403f6276318990d053785b4ca342ebc4581a23a39285804bb74e079aa2ef3ba6622353c72d8deafcb8c0b476af1663f8894ffd4fd96816af6b613157bbf67be1f022d6794717df20cc81df29eeee786eca637a61b264b20cf92bb37118171e0e92b7f0626c0e3b73f2bb0c38dc931b05c201057a4ec85d28125420f84893b53730a2a623cbfb4a79cd8f9be423c4342f94cca7f97717655dbd336b9e6cae4d4311ee5c8c3872c52db7a4230148cedd4ce01a6cca63722846ad56ec2b8b8b81e501148da1936439b8332cac57ee3be2bc9146d1f4199927587f3e530bbff9de4401477eb610803e71eaea5ddcad3af373a0457a558acfa05528cea67768f09121714e07b9b9b56cf41872ec591ea643fd7979271bb96db5f27762e2266a124daa32ac533798860191e4a0b0463979e2ed3d99c959ca37ee5c2f656afbc91da9fa111c0f90c82cfd06752cd3cbfd558058bc9500f91fa16b8063977dfe01c53585f26bc1ad7d1d454dd8156f3f702c8661d3833cd8e4283b5bdc88e86dbc56dd0e618e71891cb02e3a06a6aa04b5dd1436a52826e5b0c569c297c73a0c785e950d9") } return data } @@ -833,6 +835,29 @@ func benchmarkBn256(b *testing.B, source string) { } } +func BenchmarkBn256AddRaw(b *testing.B) { + data := benchmarkBn256DataGenData(b) + a1 := bytesToBN254G1(data[0].a) + a2 := bytesToBN254G1(data[0].b) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + _ = new(bn254.G1Affine).Add(&a1, &a2) + } +} + +func BenchmarkBn256Raw(b *testing.B) { + data := benchmarkBn256DataGenData(b) + g1s := bytesToBN254G1s(data[0].g1) + g2s := bytesToBN254G2s(data[0].g2) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + ok, _ := bn254.PairingCheck(g1s, g2s) + require.True(b, ok) + } +} + func BenchmarkBn256(b *testing.B) { b.Run("bn256 add", func(b *testing.B) { source := `#pragma version 6 From 8976642b082f1856d6f3a4635799e0b2f51fadd9 Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Thu, 7 Apr 2022 17:36:32 +0800 Subject: [PATCH 09/24] test raw cases to know marshal cost and use benchOperation to reduce runtime system cost --- data/transactions/logic/eval.go | 14 ++++++---- data/transactions/logic/evalCrypto_test.go | 32 ++++++++++++++-------- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/data/transactions/logic/eval.go b/data/transactions/logic/eval.go index aa9e49956c..822f3388cd 100644 --- a/data/transactions/logic/eval.go +++ b/data/transactions/logic/eval.go @@ -1263,9 +1263,10 @@ func opDivw(cx *EvalContext) { } func bytesToBN254Field(b []byte) (ret fp.Element) { - var x big.Int - x.SetBytes(b[:32]) - ret.SetBigInt(&x) + // var x big.Int + // x.SetBytes(b[:32]) + // ret.SetBigInt(&x) + ret.SetBytesRaw(b) return } @@ -1327,12 +1328,15 @@ func opBn256Add(cx *EvalContext) { a := bytesToBN254G1(aBytes) b := bytesToBN254G1(bBytes) - res := new(bn254.G1Affine).Add(&a, &b) + _ = new(bn254.G1Affine).Add(&a, &b) - resBytes := bN254G1ToBytes(res) + resBytes := a.Marshal() + resBytes = b.Marshal() cx.stack = cx.stack[:last] + cx.stack[prev].Bytes = bBytes cx.stack[prev].Bytes = resBytes + } func opBn256ScalarMul(cx *EvalContext) { diff --git a/data/transactions/logic/evalCrypto_test.go b/data/transactions/logic/evalCrypto_test.go index b807dc6ca1..62af4d7f43 100644 --- a/data/transactions/logic/evalCrypto_test.go +++ b/data/transactions/logic/evalCrypto_test.go @@ -799,6 +799,7 @@ func benchmarkBn256DataGenData(b *testing.B) (data []benchmarkBn256Data) { data[i].b = bN254G1ToBytes(&b) data[i].k = new(big.Int).SetUint64(mrand.Uint64()).Bytes() + // Pair one g1 and one g2 data[i].g1, _ = hex.DecodeString("0ebc9fc712b13340c800793386a88385e40912a21bacad2cc7db17d36e54c802238449426931975cced7200f08681ab9a86a2e5c2336cf625451cf2413318e32") data[i].g2, _ = hex.DecodeString("217fbd9a9db5719cfbe3580e3d8750cada058fdfffe95c440a0528ffc608f36e05d6a67604658d40b3e4cac3c46150f2702d87739b7774d79a8147f7271773b420f9429ee13c1843404bfd70e75efa886c173e57dde32970274d8bc53dfd562403f6276318990d053785b4ca342ebc4581a23a39285804bb74e079aa2ef3ba66") // data[i].g1, _ = hex.DecodeString("0ebc9fc712b13340c800793386a88385e40912a21bacad2cc7db17d36e54c802238449426931975cced7200f08681ab9a86a2e5c2336cf625451cf2413318e3226a30a875a3f67768a5fa6967e27e301e0a417b21bb9cace9f68a3ab83178e2e07060c2efe16605495a4fd9396819c53cccf1ea48012c0481d3abe65470f1d4f2af861d56dda2857f11e4b4c840e69964b4b7c4a8dec61cca3603dd5f88060fb2e1721a874180b5ab5da85a13529d17b515c65d6fdb17ed4bf9a2cc5e3cb25ce17ea15dc9e34f6e0205d9df2ec3c327884d305f728e8f6871dd89d6ec13becb701cee1732410ec49c4131536e285b78d168cc3793d2925aa24816bb50d0ff7bc") @@ -837,8 +838,8 @@ func benchmarkBn256(b *testing.B, source string) { func BenchmarkBn256AddRaw(b *testing.B) { data := benchmarkBn256DataGenData(b) - a1 := bytesToBN254G1(data[0].a) - a2 := bytesToBN254G1(data[0].b) + a1 := bytesToBN254G1(data[0].g1) + a2 := bytesToBN254G1(data[0].g1) b.ResetTimer() for i := 0; i < b.N; i++ { @@ -846,7 +847,21 @@ func BenchmarkBn256AddRaw(b *testing.B) { } } -func BenchmarkBn256Raw(b *testing.B) { +func BenchmarkBn256AddWithMarshal(b *testing.B) { + b.ResetTimer() + var v [][]byte + v = make([][]byte, b.N) + g1, _ := hex.DecodeString("0ebc9fc712b13340c800793386a88385e40912a21bacad2cc7db17d36e54c802238449426931975cced7200f08681ab9a86a2e5c2336cf625451cf2413318e32") + + for i := 0; i < b.N; i++ { + a1 := bytesToBN254G1(g1) + a2 := bytesToBN254G1(g1) + r := new(bn254.G1Affine).Add(&a1, &a2) + v[i] = r.Marshal() + } +} + +func BenchmarkBn256PairingRaw(b *testing.B) { data := benchmarkBn256DataGenData(b) g1s := bytesToBN254G1s(data[0].g1) g2s := bytesToBN254G2s(data[0].g2) @@ -854,20 +869,13 @@ func BenchmarkBn256Raw(b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ { ok, _ := bn254.PairingCheck(g1s, g2s) - require.True(b, ok) + require.False(b, ok) } } func BenchmarkBn256(b *testing.B) { b.Run("bn256 add", func(b *testing.B) { - source := `#pragma version 6 -arg 0 -arg 1 -bn256_add -pop -int 1 -` - benchmarkBn256(b, source) + benchmarkOperation(b, "byte 0x0ebc9fc712b13340c800793386a88385e40912a21bacad2cc7db17d36e54c802238449426931975cced7200f08681ab9a86a2e5c2336cf625451cf2413318e32", "dup; bn256_add", "pop; int 1") }) b.Run("bn256 scalar mul", func(b *testing.B) { From 73e6acd836ad64497a8ab025caf21ff963e97058 Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Fri, 8 Apr 2022 18:00:41 +0800 Subject: [PATCH 10/24] address John and Hang comments --- data/transactions/logic/eval.go | 42 +++++++++--------------------- data/transactions/logic/opcodes.go | 2 +- go.mod | 7 +++-- go.sum | 11 ++++++++ 4 files changed, 27 insertions(+), 35 deletions(-) diff --git a/data/transactions/logic/eval.go b/data/transactions/logic/eval.go index 159bd789c4..9d8bdb90a0 100644 --- a/data/transactions/logic/eval.go +++ b/data/transactions/logic/eval.go @@ -1284,7 +1284,7 @@ func bytesToBN254Field(b []byte) (ret fp.Element) { // var x big.Int // x.SetBytes(b[:32]) // ret.SetBigInt(&x) - ret.SetBytesRaw(b) + ret.SetBytes(b) return } @@ -1336,67 +1336,49 @@ func bN254G2ToBytes(g2 *bn254.G2Affine) (ret []byte) { return } -func opBn256Add(cx *EvalContext) { +func opBn256Add(cx *EvalContext) error { last := len(cx.stack) - 1 prev := last - 1 - aBytes := cx.stack[prev].Bytes bBytes := cx.stack[last].Bytes - a := bytesToBN254G1(aBytes) b := bytesToBN254G1(bBytes) - - _ = new(bn254.G1Affine).Add(&a, &b) - - resBytes := a.Marshal() - resBytes = b.Marshal() - + res := new(bn254.G1Affine).Add(&a, &b) + resBytes := res.Marshal() cx.stack = cx.stack[:last] - cx.stack[prev].Bytes = bBytes cx.stack[prev].Bytes = resBytes - + return nil } -func opBn256ScalarMul(cx *EvalContext) { +func opBn256ScalarMul(cx *EvalContext) error { last := len(cx.stack) - 1 prev := last - 1 - aBytes := cx.stack[prev].Bytes a := bytesToBN254G1(aBytes) - kBytes := cx.stack[last].Bytes k := new(big.Int).SetBytes(kBytes[:]) - res := new(bn254.G1Affine).ScalarMultiplication(&a, k) - resBytes := bN254G1ToBytes(res) - cx.stack = cx.stack[:last] cx.stack[prev].Bytes = resBytes + return nil } -func opBn256Pairing(cx *EvalContext) { +func opBn256Pairing(cx *EvalContext) error { last := len(cx.stack) - 1 prev := last - 1 - g1Bytes := cx.stack[prev].Bytes g2Bytes := cx.stack[last].Bytes - g1 := bytesToBN254G1s(g1Bytes) g2 := bytesToBN254G2s(g2Bytes) - ok, err := bn254.PairingCheck(g1, g2) if err != nil { - cx.err = errors.New("pairing failed") - return + return errors.New("pairing failed") } - cx.stack = cx.stack[:last] - if ok { - cx.stack[prev].Bytes = []byte{1} - } else { - cx.stack[prev].Bytes = []byte{0} - } + cx.stack[prev].Uint = boolToUint(ok) + cx.stack[prev].Bytes = nil + return nil } func opLt(cx *EvalContext) error { diff --git a/data/transactions/logic/opcodes.go b/data/transactions/logic/opcodes.go index 1d8b412c2b..7be79984a6 100644 --- a/data/transactions/logic/opcodes.go +++ b/data/transactions/logic/opcodes.go @@ -459,7 +459,7 @@ var OpSpecs = []OpSpec{ {0x98, "sha3_256", opSHA3_256, asmDefault, disDefault, oneBytes, oneBytes, 7, modeAny, costly(130)}, {0x99, "bn256_add", opBn256Add, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(166)}, {0x9a, "bn256_scalar_mul", opBn256ScalarMul, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(892)}, - {0x9b, "bn256_pairing", opBn256Pairing, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(6879)}, + {0x9b, "bn256_pairing", opBn256Pairing, asmDefault, disDefault, twoBytes, oneInt, 6, modeAny, costly(6879)}, /* Will end up following keccak256 - {0x98, "sha3_256", opSHA3_256, asmDefault, disDefault, oneBytes, oneBytes, unlimitedStorage, modeAny, costByLength(58, 4, 8)},}, diff --git a/go.mod b/go.mod index 4e2b563a9a..19ac741dfa 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/algorand/websocket v1.4.5 github.com/aws/aws-sdk-go v1.16.5 github.com/chrismcguire/gobberish v0.0.0-20150821175641-1d8adb509a0e - github.com/consensys/gnark-crypto v0.6.1 // indirect + github.com/consensys/gnark-crypto v0.7.0 github.com/cpuguy83/go-md2man v1.0.8 // indirect github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018 github.com/dchest/siphash v1.2.1 @@ -43,12 +43,11 @@ require ( github.com/spf13/cobra v0.0.3 github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/testify v1.7.1 - golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 - golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 + golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064 + golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 golang.org/x/text v0.3.7 google.golang.org/appengine v1.6.7 // indirect gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/sohlich/elogrus.v3 v3.0.0-20180410122755-1fa29e2f2009 gopkg.in/toast.v1 v1.0.0-20180812000517-0a84660828b2 // indirect - gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect ) diff --git a/go.sum b/go.sum index 7e8f5e819a..8e9f38b23e 100644 --- a/go.sum +++ b/go.sum @@ -21,8 +21,11 @@ github.com/aws/aws-sdk-go v1.16.5/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/chrismcguire/gobberish v0.0.0-20150821175641-1d8adb509a0e h1:CHPYEbz71w8DqJ7DRIq+MXyCQsdibK08vdcQTY4ufas= github.com/chrismcguire/gobberish v0.0.0-20150821175641-1d8adb509a0e/go.mod h1:6Xhs0ZlsRjXLIiSMLKafbZxML/j30pg9Z1priLuha5s= github.com/consensys/bavard v0.1.9/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= +github.com/consensys/bavard v0.1.10/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.6.1 h1:MuWaJyWzSw8wQUOfiZOlRwYjfweIj8dM/u2NN6m0O04= github.com/consensys/gnark-crypto v0.6.1/go.mod h1:s41Bl3YIpNgu/zdvlSzf/xZkyV8MUmoBY96RmuB8x70= +github.com/consensys/gnark-crypto v0.7.0 h1:rwdy8+ssmLYRqKp+ryRRgQJl/rCq2uv+n83cOydm5UE= +github.com/consensys/gnark-crypto v0.7.0/go.mod h1:KPSuJzyxkJA8xZ/+CV47tyqkr9MmpZA3PXivK4VPrVg= github.com/cpuguy83/go-md2man v1.0.8 h1:DwoNytLphI8hzS2Af4D0dfaEaiSq2bN05mEm4R6vf8M= github.com/cpuguy83/go-md2man v1.0.8/go.mod h1:N6JayAiVKtlHSnuTCeuLSQVs75hb8q+dYQLjr7cDsKY= github.com/cyberdelia/templates v0.0.0-20191230040416-20a325f050d4/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= @@ -153,6 +156,8 @@ golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064 h1:S25/rfnfsMVgORT4/J61MJ7rdyseOZOyvLIrZEZ7s6s= +golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= @@ -166,6 +171,8 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= @@ -186,6 +193,8 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 h1:OH54vjqzRWmbJ62fjuhxy7AxFFgoHN0/DPc/UrL8cAs= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -220,4 +229,6 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= From 37b511d434b2a68f3e5f0d96182ef032b025b69c Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Fri, 8 Apr 2022 20:11:57 +0800 Subject: [PATCH 11/24] cleanup and update costs --- data/transactions/logic/eval.go | 7 +------ data/transactions/logic/opcodes.go | 6 +++--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/data/transactions/logic/eval.go b/data/transactions/logic/eval.go index 9d8bdb90a0..3fab7a186b 100644 --- a/data/transactions/logic/eval.go +++ b/data/transactions/logic/eval.go @@ -1281,9 +1281,6 @@ func opDivw(cx *EvalContext) error { } func bytesToBN254Field(b []byte) (ret fp.Element) { - // var x big.Int - // x.SetBytes(b[:32]) - // ret.SetBigInt(&x) ret.SetBytes(b) return } @@ -1328,11 +1325,9 @@ func bN254G2ToBytes(g2 *bn254.G2Affine) (ret []byte) { retXA1 := g2.X.A1.Bytes() retYA0 := g2.Y.A0.Bytes() retYA1 := g2.Y.A1.Bytes() - ret = append(retXA0[:], retXA1[:]...) ret = append(ret[:], retYA0[:]...) ret = append(ret[:], retYA1[:]...) - return } @@ -1344,7 +1339,7 @@ func opBn256Add(cx *EvalContext) error { a := bytesToBN254G1(aBytes) b := bytesToBN254G1(bBytes) res := new(bn254.G1Affine).Add(&a, &b) - resBytes := res.Marshal() + resBytes := bN254G1ToBytes(res) cx.stack = cx.stack[:last] cx.stack[prev].Bytes = resBytes return nil diff --git a/data/transactions/logic/opcodes.go b/data/transactions/logic/opcodes.go index 7be79984a6..30dc760132 100644 --- a/data/transactions/logic/opcodes.go +++ b/data/transactions/logic/opcodes.go @@ -457,9 +457,9 @@ var OpSpecs = []OpSpec{ {0x96, "bsqrt", opBytesSqrt, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(40)}, {0x97, "divw", opDivw, asmDefault, disDefault, twoInts.plus(oneInt), oneInt, 6, modeAny, opDefault}, {0x98, "sha3_256", opSHA3_256, asmDefault, disDefault, oneBytes, oneBytes, 7, modeAny, costly(130)}, - {0x99, "bn256_add", opBn256Add, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(166)}, - {0x9a, "bn256_scalar_mul", opBn256ScalarMul, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(892)}, - {0x9b, "bn256_pairing", opBn256Pairing, asmDefault, disDefault, twoBytes, oneInt, 6, modeAny, costly(6879)}, + {0x99, "bn256_add", opBn256Add, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(70)}, + {0x9a, "bn256_scalar_mul", opBn256ScalarMul, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(1218)}, + {0x9b, "bn256_pairing", opBn256Pairing, asmDefault, disDefault, twoBytes, oneInt, 6, modeAny, costly(8700)}, /* Will end up following keccak256 - {0x98, "sha3_256", opSHA3_256, asmDefault, disDefault, oneBytes, oneBytes, unlimitedStorage, modeAny, costByLength(58, 4, 8)},}, From 5ea7738cdca9643aed3698fd17e0efc8c95f565c Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Fri, 8 Apr 2022 20:30:28 +0800 Subject: [PATCH 12/24] clean up benchmark code and update cost --- data/transactions/logic/evalCrypto_test.go | 27 ++++------------------ data/transactions/logic/opcodes.go | 2 +- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/data/transactions/logic/evalCrypto_test.go b/data/transactions/logic/evalCrypto_test.go index 3dd74e5548..8321d2ae53 100644 --- a/data/transactions/logic/evalCrypto_test.go +++ b/data/transactions/logic/evalCrypto_test.go @@ -776,7 +776,6 @@ int 1` type benchmarkBn256Data struct { a []byte - b []byte k []byte g1 []byte g2 []byte @@ -793,35 +792,17 @@ func benchmarkBn256DataGenData(b *testing.B) (data []benchmarkBn256Data) { g1GenAff.FromJacobian(&g1Gen) var a bn254.G1Affine a.ScalarMultiplication(&g1GenAff, new(big.Int).SetUint64(mrand.Uint64())) - var g2Gen bn254.G2Jac - var g2GenAff bn254.G2Affine - g2Gen.X.SetString("10857046999023057135944570762232829481370756359578518086990519993285655852781", - "11559732032986387107991004021392285783925812861821192530917403151452391805634") - g2Gen.Y.SetString("8495653923123431417604973247489272438418190587263600148770280649306958101930", - "4082367875863433681332203403145435568316851327593401208105741076214120093531") - g2Gen.Z.SetString("1", - "0") - g2GenAff.FromJacobian(&g2Gen) for i := 0; i < b.N; i++ { var a bn254.G1Affine a.ScalarMultiplication(&g1GenAff, new(big.Int).SetUint64(mrand.Uint64())) - var b bn254.G1Affine - b.ScalarMultiplication(&g1GenAff, new(big.Int).SetUint64(mrand.Uint64())) - - var g2 bn254.G2Affine - g2.ScalarMultiplication(&g2GenAff, new(big.Int).SetUint64(mrand.Uint64())) - data[i].a = bN254G1ToBytes(&a) - data[i].b = bN254G1ToBytes(&b) data[i].k = new(big.Int).SetUint64(mrand.Uint64()).Bytes() // Pair one g1 and one g2 data[i].g1, _ = hex.DecodeString("0ebc9fc712b13340c800793386a88385e40912a21bacad2cc7db17d36e54c802238449426931975cced7200f08681ab9a86a2e5c2336cf625451cf2413318e32") data[i].g2, _ = hex.DecodeString("217fbd9a9db5719cfbe3580e3d8750cada058fdfffe95c440a0528ffc608f36e05d6a67604658d40b3e4cac3c46150f2702d87739b7774d79a8147f7271773b420f9429ee13c1843404bfd70e75efa886c173e57dde32970274d8bc53dfd562403f6276318990d053785b4ca342ebc4581a23a39285804bb74e079aa2ef3ba66") - // data[i].g1, _ = hex.DecodeString("0ebc9fc712b13340c800793386a88385e40912a21bacad2cc7db17d36e54c802238449426931975cced7200f08681ab9a86a2e5c2336cf625451cf2413318e3226a30a875a3f67768a5fa6967e27e301e0a417b21bb9cace9f68a3ab83178e2e07060c2efe16605495a4fd9396819c53cccf1ea48012c0481d3abe65470f1d4f2af861d56dda2857f11e4b4c840e69964b4b7c4a8dec61cca3603dd5f88060fb2e1721a874180b5ab5da85a13529d17b515c65d6fdb17ed4bf9a2cc5e3cb25ce17ea15dc9e34f6e0205d9df2ec3c327884d305f728e8f6871dd89d6ec13becb701cee1732410ec49c4131536e285b78d168cc3793d2925aa24816bb50d0ff7bc") - // data[i].g2, _ = hex.DecodeString("217fbd9a9db5719cfbe3580e3d8750cada058fdfffe95c440a0528ffc608f36e05d6a67604658d40b3e4cac3c46150f2702d87739b7774d79a8147f7271773b420f9429ee13c1843404bfd70e75efa886c173e57dde32970274d8bc53dfd562403f6276318990d053785b4ca342ebc4581a23a39285804bb74e079aa2ef3ba6622353c72d8deafcb8c0b476af1663f8894ffd4fd96816af6b613157bbf67be1f022d6794717df20cc81df29eeee786eca637a61b264b20cf92bb37118171e0e92b7f0626c0e3b73f2bb0c38dc931b05c201057a4ec85d28125420f84893b53730a2a623cbfb4a79cd8f9be423c4342f94cca7f97717655dbd336b9e6cae4d4311ee5c8c3872c52db7a4230148cedd4ce01a6cca63722846ad56ec2b8b8b81e501148da1936439b8332cac57ee3be2bc9146d1f4199927587f3e530bbff9de4401477eb610803e71eaea5ddcad3af373a0457a558acfa05528cea67768f09121714e07b9b9b56cf41872ec591ea643fd7979271bb96db5f27762e2266a124daa32ac533798860191e4a0b0463979e2ed3d99c959ca37ee5c2f656afbc91da9fa111c0f90c82cfd06752cd3cbfd558058bc9500f91fa16b8063977dfe01c53585f26bc1ad7d1d454dd8156f3f702c8661d3833cd8e4283b5bdc88e86dbc56dd0e618e71891cb02e3a06a6aa04b5dd1436a52826e5b0c569c297c73a0c785e950d9") } return data } @@ -838,7 +819,7 @@ func benchmarkBn256(b *testing.B, source string) { for i := 0; i < b.N; i++ { var txn transactions.SignedTxn txn.Lsig.Logic = data[i].programs - txn.Lsig.Args = [][]byte{data[i].a, data[i].b, data[i].k, data[i].g1, data[i].g2} + txn.Lsig.Args = [][]byte{data[i].a, data[i].k, data[i].g1, data[i].g2} ep := defaultEvalParams(&txn) pass, err := EvalSignature(0, ep) if !pass { @@ -898,8 +879,8 @@ func BenchmarkBn256(b *testing.B) { b.Run("bn256 scalar mul", func(b *testing.B) { source := `#pragma version 6 -arg 3 -arg 4 +arg 0 +arg 1 bn256_scalar_mul pop int 1 @@ -909,8 +890,8 @@ int 1 b.Run("bn256 pairing", func(b *testing.B) { source := `#pragma version 6 +arg 2 arg 3 -arg 4 bn256_pairing pop int 1 diff --git a/data/transactions/logic/opcodes.go b/data/transactions/logic/opcodes.go index 30dc760132..4f0ce96116 100644 --- a/data/transactions/logic/opcodes.go +++ b/data/transactions/logic/opcodes.go @@ -458,7 +458,7 @@ var OpSpecs = []OpSpec{ {0x97, "divw", opDivw, asmDefault, disDefault, twoInts.plus(oneInt), oneInt, 6, modeAny, opDefault}, {0x98, "sha3_256", opSHA3_256, asmDefault, disDefault, oneBytes, oneBytes, 7, modeAny, costly(130)}, {0x99, "bn256_add", opBn256Add, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(70)}, - {0x9a, "bn256_scalar_mul", opBn256ScalarMul, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(1218)}, + {0x9a, "bn256_scalar_mul", opBn256ScalarMul, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(970)}, {0x9b, "bn256_pairing", opBn256Pairing, asmDefault, disDefault, twoBytes, oneInt, 6, modeAny, costly(8700)}, /* Will end up following keccak256 - From f38c7759e189d56be0919fe223b148dd78f1bd3d Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Sat, 9 Apr 2022 12:34:56 +0800 Subject: [PATCH 13/24] bump new opcodes to v7 and fix testassemble --- data/transactions/logic/assembler_test.go | 9 ++++++++- data/transactions/logic/opcodes.go | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/data/transactions/logic/assembler_test.go b/data/transactions/logic/assembler_test.go index 88ba667f4c..e6d490cf8d 100644 --- a/data/transactions/logic/assembler_test.go +++ b/data/transactions/logic/assembler_test.go @@ -374,11 +374,18 @@ pushbytes 0x012345 dup dup ed25519verify_bare +pushbytes 0x012345 +dup +bn256_add +dup +bn256_scalar_mul +dup +bn256_pairing ` const v6Compiled = "2004010002b7a60c26050242420c68656c6c6f20776f726c6421070123456789abcd208dae2087fbba51304eb02b91f656948397a7946390e8cb70fc9ea4d95f92251d047465737400320032013202320380021234292929292b0431003101310231043105310731083109310a310b310c310d310e310f3111311231133114311533000033000133000233000433000533000733000833000933000a33000b33000c33000d33000e33000f3300113300123300133300143300152d2e01022581f8acd19181cf959a1281f8acd19181cf951a81f8acd19181cf1581f8acd191810f082209240a220b230c240d250e230f23102311231223132314181b1c28171615400003290349483403350222231d4a484848482b50512a632223524100034200004322602261222704634848222862482864286548482228246628226723286828692322700048482371004848361c0037001a0031183119311b311d311e311f312023221e312131223123312431253126312731283129312a312b312c312d312e312f447825225314225427042455220824564c4d4b0222382124391c0081e80780046a6f686e2281d00f23241f880003420001892224902291922494249593a0a1a2a3a4a5a6a7a8a9aaabacadae24af3a00003b003c003d816472064e014f012a57000823810858235b235a2359b03139330039b1b200b322c01a23c1001a2323c21a23c3233e233f8120af06002a494905002a49490700b53a03b6b7043cb8033a0c2349c42a9631007300810881088120978101c53a8101c6003a" -const v7Compiled = v6Compiled + "5c005d018120af060180070123456789abcd49490501988003012345494984" +const v7Compiled = v6Compiled + "5c005d018120af060180070123456789abcd4949050198800301234549498480030123454999499a499b" var nonsense = map[uint64]string{ 1: v1Nonsense, diff --git a/data/transactions/logic/opcodes.go b/data/transactions/logic/opcodes.go index 4f0ce96116..5de70ea5dd 100644 --- a/data/transactions/logic/opcodes.go +++ b/data/transactions/logic/opcodes.go @@ -457,9 +457,9 @@ var OpSpecs = []OpSpec{ {0x96, "bsqrt", opBytesSqrt, asmDefault, disDefault, oneBytes, oneBytes, 6, modeAny, costly(40)}, {0x97, "divw", opDivw, asmDefault, disDefault, twoInts.plus(oneInt), oneInt, 6, modeAny, opDefault}, {0x98, "sha3_256", opSHA3_256, asmDefault, disDefault, oneBytes, oneBytes, 7, modeAny, costly(130)}, - {0x99, "bn256_add", opBn256Add, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(70)}, - {0x9a, "bn256_scalar_mul", opBn256ScalarMul, asmDefault, disDefault, twoBytes, oneBytes, 6, modeAny, costly(970)}, - {0x9b, "bn256_pairing", opBn256Pairing, asmDefault, disDefault, twoBytes, oneInt, 6, modeAny, costly(8700)}, + {0x99, "bn256_add", opBn256Add, asmDefault, disDefault, twoBytes, oneBytes, 7, modeAny, costly(70)}, + {0x9a, "bn256_scalar_mul", opBn256ScalarMul, asmDefault, disDefault, twoBytes, oneBytes, 7, modeAny, costly(970)}, + {0x9b, "bn256_pairing", opBn256Pairing, asmDefault, disDefault, twoBytes, oneInt, 7, modeAny, costly(8700)}, /* Will end up following keccak256 - {0x98, "sha3_256", opSHA3_256, asmDefault, disDefault, oneBytes, oneBytes, unlimitedStorage, modeAny, costByLength(58, 4, 8)},}, From d040f6aec3dea23ed9b179b8af1af50d4e4bda23 Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Sat, 9 Apr 2022 16:13:18 +0800 Subject: [PATCH 14/24] fix doctest --- data/transactions/logic/doc.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/transactions/logic/doc.go b/data/transactions/logic/doc.go index 9e2dc2def3..4cec818f4d 100644 --- a/data/transactions/logic/doc.go +++ b/data/transactions/logic/doc.go @@ -32,6 +32,9 @@ var opDocByName = map[string]string{ "ecdsa_verify": "for (data A, signature B, C and pubkey D, E) verify the signature of the data against the pubkey => {0 or 1}", "ecdsa_pk_decompress": "decompress pubkey A into components X, Y", "ecdsa_pk_recover": "for (data A, recovery id B, signature C, D) recover a public key", + "bn256_add": "for (curve point A, B) return the curve point A + B", + "bn256_scalar_mul": "for (curve point A, scalar K) return the curve point KA", + "bn256_pairing": "for (points in G1 group G1s, points in G2 group G2s), return whether they are paired => {0 or 1}", "+": "A plus B. Fail on overflow.", "-": "A minus B. Fail if B > A.", From 2b8ebb2e3f85bf90b24bf52de22caecd85bfd81a Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Sat, 9 Apr 2022 16:14:22 +0800 Subject: [PATCH 15/24] bn256 in opgroups --- data/transactions/logic/doc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/transactions/logic/doc.go b/data/transactions/logic/doc.go index 4cec818f4d..bbb5ec0d77 100644 --- a/data/transactions/logic/doc.go +++ b/data/transactions/logic/doc.go @@ -337,7 +337,7 @@ func OpDocExtra(opName string) string { // here is the order args opcodes are presented, so place related // opcodes consecutively, even if their opcode values are not. var OpGroups = map[string][]string{ - "Arithmetic": {"sha256", "keccak256", "sha512_256", "sha3_256", "ed25519verify", "ed25519verify_bare", "ecdsa_verify", "ecdsa_pk_recover", "ecdsa_pk_decompress", "+", "-", "/", "*", "<", ">", "<=", ">=", "&&", "||", "shl", "shr", "sqrt", "bitlen", "exp", "==", "!=", "!", "len", "itob", "btoi", "%", "|", "&", "^", "~", "mulw", "addw", "divw", "divmodw", "expw", "getbit", "setbit", "getbyte", "setbyte", "concat"}, + "Arithmetic": {"sha256", "keccak256", "sha512_256", "sha3_256", "ed25519verify", "ed25519verify_bare", "ecdsa_verify", "ecdsa_pk_recover", "ecdsa_pk_decompress", "bn256_add", "bn256_scalar_mul", "bn256_pairing", "+", "-", "/", "*", "<", ">", "<=", ">=", "&&", "||", "shl", "shr", "sqrt", "bitlen", "exp", "==", "!=", "!", "len", "itob", "btoi", "%", "|", "&", "^", "~", "mulw", "addw", "divw", "divmodw", "expw", "getbit", "setbit", "getbyte", "setbyte", "concat"}, "Byte Array Manipulation": {"substring", "substring3", "extract", "extract3", "extract_uint16", "extract_uint32", "extract_uint64", "base64_decode", "json_ref"}, "Byte Array Arithmetic": {"b+", "b-", "b/", "b*", "b<", "b>", "b<=", "b>=", "b==", "b!=", "b%", "bsqrt"}, "Byte Array Logic": {"b|", "b&", "b^", "b~"}, From ad86696e9f298f2060249c5cea47af0a68396fd3 Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Sat, 9 Apr 2022 16:33:37 +0800 Subject: [PATCH 16/24] make not panic in invalid input, return human readable error messages and skip in TestReturnTypes --- data/transactions/logic/eval.go | 6 ++++++ data/transactions/logic/evalStateful_test.go | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/data/transactions/logic/eval.go b/data/transactions/logic/eval.go index 3fab7a186b..26714b855c 100644 --- a/data/transactions/logic/eval.go +++ b/data/transactions/logic/eval.go @@ -1336,6 +1336,9 @@ func opBn256Add(cx *EvalContext) error { prev := last - 1 aBytes := cx.stack[prev].Bytes bBytes := cx.stack[last].Bytes + if len(aBytes) != 64 || len(bBytes) != 64 { + return errors.New("expect G1 in 64 bytes") + } a := bytesToBN254G1(aBytes) b := bytesToBN254G1(bBytes) res := new(bn254.G1Affine).Add(&a, &b) @@ -1349,6 +1352,9 @@ func opBn256ScalarMul(cx *EvalContext) error { last := len(cx.stack) - 1 prev := last - 1 aBytes := cx.stack[prev].Bytes + if len(aBytes) != 64 { + return errors.New("expect G1 in 64 bytes") + } a := bytesToBN254G1(aBytes) kBytes := cx.stack[last].Bytes k := new(big.Int).SetBytes(kBytes[:]) diff --git a/data/transactions/logic/evalStateful_test.go b/data/transactions/logic/evalStateful_test.go index 92a8f44aaf..a23f116921 100644 --- a/data/transactions/logic/evalStateful_test.go +++ b/data/transactions/logic/evalStateful_test.go @@ -2388,6 +2388,10 @@ func TestReturnTypes(t *testing.T) { "ecdsa_verify": true, "ecdsa_pk_recover": true, "ecdsa_pk_decompress": true, + + "bn256_add": true, + "bn256_scalar_mul": true, + "bn256_pairing": true, } byName := OpsByName[LogicVersion] From cdc0f420ebd9e8a442c49ff3ed489fb1daf2f5b1 Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Sat, 9 Apr 2022 19:42:58 +0800 Subject: [PATCH 17/24] update generated code --- data/transactions/logic/README.md | 3 ++ data/transactions/logic/TEAL_opcodes.md | 24 ++++++++++++++ data/transactions/logic/langspec.json | 33 ++++++++++++++++++++ data/transactions/logic/teal.tmLanguage.json | 2 +- 4 files changed, 61 insertions(+), 1 deletion(-) diff --git a/data/transactions/logic/README.md b/data/transactions/logic/README.md index 769b3b9cda..bf0a845f80 100644 --- a/data/transactions/logic/README.md +++ b/data/transactions/logic/README.md @@ -273,6 +273,9 @@ return stack matches the name of the input value. | `ecdsa_verify v` | for (data A, signature B, C and pubkey D, E) verify the signature of the data against the pubkey => {0 or 1} | | `ecdsa_pk_recover v` | for (data A, recovery id B, signature C, D) recover a public key | | `ecdsa_pk_decompress v` | decompress pubkey A into components X, Y | +| `bn256_add` | for (curve point A, B) return the curve point A + B | +| `bn256_scalar_mul` | for (curve point A, scalar K) return the curve point KA | +| `bn256_pairing` | for (points in G1 group G1s, points in G2 group G2s), return whether they are paired => {0 or 1} | | `+` | A plus B. Fail on overflow. | | `-` | A minus B. Fail if B > A. | | `/` | A divided by B (truncated division). Fail if B == 0. | diff --git a/data/transactions/logic/TEAL_opcodes.md b/data/transactions/logic/TEAL_opcodes.md index 86e5f16fda..eebccf930a 100644 --- a/data/transactions/logic/TEAL_opcodes.md +++ b/data/transactions/logic/TEAL_opcodes.md @@ -1097,6 +1097,30 @@ The notation A,B indicates that A and B are interpreted as a uint128 value, with - **Cost**: 130 - Availability: v7 +## bn256_add + +- Opcode: 0x99 +- Stack: ..., A: []byte, B: []byte → ..., []byte +- for (curve point A, B) return the curve point A + B +- **Cost**: 70 +- Availability: v7 + +## bn256_scalar_mul + +- Opcode: 0x9a +- Stack: ..., A: []byte, B: []byte → ..., []byte +- for (curve point A, scalar K) return the curve point KA +- **Cost**: 970 +- Availability: v7 + +## bn256_pairing + +- Opcode: 0x9b +- Stack: ..., A: []byte, B: []byte → ..., uint64 +- for (points in G1 group G1s, points in G2 group G2s), return whether they are paired => {0 or 1} +- **Cost**: 8700 +- Availability: v7 + ## b+ - Opcode: 0xa0 diff --git a/data/transactions/logic/langspec.json b/data/transactions/logic/langspec.json index 7a6cef2d9a..b55c62c79f 100644 --- a/data/transactions/logic/langspec.json +++ b/data/transactions/logic/langspec.json @@ -1637,6 +1637,39 @@ "Arithmetic" ] }, + { + "Opcode": 153, + "Name": "bn256_add", + "Args": "BB", + "Returns": "B", + "Size": 1, + "Doc": "for (curve point A, B) return the curve point A + B", + "Groups": [ + "Arithmetic" + ] + }, + { + "Opcode": 154, + "Name": "bn256_scalar_mul", + "Args": "BB", + "Returns": "B", + "Size": 1, + "Doc": "for (curve point A, scalar K) return the curve point KA", + "Groups": [ + "Arithmetic" + ] + }, + { + "Opcode": 155, + "Name": "bn256_pairing", + "Args": "BB", + "Returns": "U", + "Size": 1, + "Doc": "for (points in G1 group G1s, points in G2 group G2s), return whether they are paired =\u003e {0 or 1}", + "Groups": [ + "Arithmetic" + ] + }, { "Opcode": 160, "Name": "b+", diff --git a/data/transactions/logic/teal.tmLanguage.json b/data/transactions/logic/teal.tmLanguage.json index efc093602d..5219dbcd45 100644 --- a/data/transactions/logic/teal.tmLanguage.json +++ b/data/transactions/logic/teal.tmLanguage.json @@ -76,7 +76,7 @@ }, { "name": "keyword.operator.teal", - "match": "^(\\!|\\!\\=|%|\u0026|\u0026\u0026|\\*|\\+|\\-|/|\\\u003c|\\\u003c\\=|\\=\\=|\\\u003e|\\\u003e\\=|\\^|addw|bitlen|btoi|concat|divmodw|divw|ecdsa_pk_decompress|ecdsa_pk_recover|ecdsa_verify|ed25519verify|ed25519verify_bare|exp|expw|getbit|getbyte|itob|keccak256|len|mulw|setbit|setbyte|sha256|sha3_256|sha512_256|shl|shr|sqrt|\\||\\|\\||\\~|b\\!\\=|b%|b\\*|b\\+|b\\-|b/|b\\\u003c|b\\\u003c\\=|b\\=\\=|b\\\u003e|b\\\u003e\\=|bsqrt|b\u0026|b\\^|b\\||b\\~|base64_decode|extract|extract3|extract_uint16|extract_uint32|extract_uint64|json_ref|substring|substring3|gitxn|gitxna|gitxnas|itxn|itxn_begin|itxn_field|itxn_next|itxn_submit|itxna|itxnas)\\b" + "match": "^(\\!|\\!\\=|%|\u0026|\u0026\u0026|\\*|\\+|\\-|/|\\\u003c|\\\u003c\\=|\\=\\=|\\\u003e|\\\u003e\\=|\\^|addw|bitlen|bn256_add|bn256_pairing|bn256_scalar_mul|btoi|concat|divmodw|divw|ecdsa_pk_decompress|ecdsa_pk_recover|ecdsa_verify|ed25519verify|ed25519verify_bare|exp|expw|getbit|getbyte|itob|keccak256|len|mulw|setbit|setbyte|sha256|sha3_256|sha512_256|shl|shr|sqrt|\\||\\|\\||\\~|b\\!\\=|b%|b\\*|b\\+|b\\-|b/|b\\\u003c|b\\\u003c\\=|b\\=\\=|b\\\u003e|b\\\u003e\\=|bsqrt|b\u0026|b\\^|b\\||b\\~|base64_decode|extract|extract3|extract_uint16|extract_uint32|extract_uint64|json_ref|substring|substring3|gitxn|gitxna|gitxnas|itxn|itxn_begin|itxn_field|itxn_next|itxn_submit|itxna|itxnas)\\b" } ] }, From 1a84af3b479dd182eecfe42de88c62aef2d0eedd Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Mon, 11 Apr 2022 14:30:00 +0800 Subject: [PATCH 18/24] remove unused bN254G2ToBytes --- data/transactions/logic/eval.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/data/transactions/logic/eval.go b/data/transactions/logic/eval.go index 26714b855c..44d69602f6 100644 --- a/data/transactions/logic/eval.go +++ b/data/transactions/logic/eval.go @@ -1320,17 +1320,6 @@ func bN254G1ToBytes(g1 *bn254.G1Affine) (ret []byte) { return } -func bN254G2ToBytes(g2 *bn254.G2Affine) (ret []byte) { - retXA0 := g2.X.A0.Bytes() - retXA1 := g2.X.A1.Bytes() - retYA0 := g2.Y.A0.Bytes() - retYA1 := g2.Y.A1.Bytes() - ret = append(retXA0[:], retXA1[:]...) - ret = append(ret[:], retYA0[:]...) - ret = append(ret[:], retYA1[:]...) - return -} - func opBn256Add(cx *EvalContext) error { last := len(cx.stack) - 1 prev := last - 1 From c6d88a2b3bc58fb5d641e524a9e3ed782b516323 Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Mon, 11 Apr 2022 15:20:27 +0800 Subject: [PATCH 19/24] add doc to describe encoding. fix bench --- data/transactions/logic/doc.go | 3 +++ data/transactions/logic/evalCrypto_test.go | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/data/transactions/logic/doc.go b/data/transactions/logic/doc.go index bbb5ec0d77..88c38b7999 100644 --- a/data/transactions/logic/doc.go +++ b/data/transactions/logic/doc.go @@ -280,6 +280,9 @@ var opDocExtras = map[string]string{ "ecdsa_verify": "The 32 byte Y-component of a public key is the last element on the stack, preceded by X-component of a pubkey, preceded by S and R components of a signature, preceded by the data that is fifth element on the stack. All values are big-endian encoded. The signed data must be 32 bytes long, and signatures in lower-S form are only accepted.", "ecdsa_pk_decompress": "The 33 byte public key in a compressed form to be decompressed into X and Y (top) components. All values are big-endian encoded.", "ecdsa_pk_recover": "S (top) and R elements of a signature, recovery id and data (bottom) are expected on the stack and used to deriver a public key. All values are big-endian encoded. The signed data must be 32 bytes long.", + "bn256_add": "A, B is curve point in G1 group. Each point is consists of (X, Y). X and Y are both 256 bit integer, big-endian encoded. The encoded point is 64 bytes from concatenation of 32 byte X and 32 byte Y.", + "bn256_scalar_mul": "A is curve point in G1 Group and encoding described in `bn256_add`. Scalar K is a big-endian encoded big integer that has no padding zeros.", + "bn256_pairing": "G1s are encoded by concat each encoded G1, which described in `bn256_add`. G2s are encoded by concat encoded G2. Each G2 is in form (XA0+i*XA1, YA0+i*YA1) and encoded by big-endian field element XA0, XA1, YA0 and YA1 in sequence.", "bnz": "The `bnz` instruction opcode 0x40 is followed by two immediate data bytes which are a high byte first and low byte second which together form a 16 bit offset which the instruction may branch to. For a bnz instruction at `pc`, if the last element of the stack is not zero then branch to instruction at `pc + 3 + N`, else proceed to next instruction at `pc + 3`. Branch targets must be aligned instructions. (e.g. Branching to the second byte of a 2 byte op will be rejected.) Starting at v4, the offset is treated as a signed 16 bit integer allowing for backward branches and looping. In prior version (v1 to v3), branch offsets are limited to forward branches only, 0-0x7fff.\n\nAt v2 it became allowed to branch to the end of the program exactly after the last instruction: bnz to byte N (with 0-indexing) was illegal for a TEAL program with N bytes before v2, and is legal after it. This change eliminates the need for a last instruction of no-op as a branch target at the end. (Branching beyond the end--in other words, to a byte larger than N--is still illegal and will cause the program to fail.)", "bz": "See `bnz` for details on how branches work. `bz` inverts the behavior of `bnz`.", "b": "See `bnz` for details on how branches work. `b` always jumps to the offset.", diff --git a/data/transactions/logic/evalCrypto_test.go b/data/transactions/logic/evalCrypto_test.go index 8321d2ae53..fb99af28ce 100644 --- a/data/transactions/logic/evalCrypto_test.go +++ b/data/transactions/logic/evalCrypto_test.go @@ -809,7 +809,7 @@ func benchmarkBn256DataGenData(b *testing.B) (data []benchmarkBn256Data) { func benchmarkBn256(b *testing.B, source string) { data := benchmarkBn256DataGenData(b) - ops, err := AssembleStringWithVersion(source, 6) + ops, err := AssembleStringWithVersion(source, 7) require.NoError(b, err) for i := 0; i < b.N; i++ { data[i].programs = ops.Program @@ -878,7 +878,7 @@ func BenchmarkBn256(b *testing.B) { }) b.Run("bn256 scalar mul", func(b *testing.B) { - source := `#pragma version 6 + source := `#pragma version 7 arg 0 arg 1 bn256_scalar_mul @@ -889,7 +889,7 @@ int 1 }) b.Run("bn256 pairing", func(b *testing.B) { - source := `#pragma version 6 + source := `#pragma version 7 arg 2 arg 3 bn256_pairing From e23b187ee4a37910620735c03f2e33a1e7bcc99e Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Mon, 11 Apr 2022 16:22:57 +0800 Subject: [PATCH 20/24] codegen --- data/transactions/logic/TEAL_opcodes.md | 6 ++++++ data/transactions/logic/langspec.json | 3 +++ 2 files changed, 9 insertions(+) diff --git a/data/transactions/logic/TEAL_opcodes.md b/data/transactions/logic/TEAL_opcodes.md index eebccf930a..71263c9122 100644 --- a/data/transactions/logic/TEAL_opcodes.md +++ b/data/transactions/logic/TEAL_opcodes.md @@ -1105,6 +1105,8 @@ The notation A,B indicates that A and B are interpreted as a uint128 value, with - **Cost**: 70 - Availability: v7 +A, B is curve point in G1 group. Each point is consists of (X, Y). X and Y are both 256 bit integer, big-endian encoded. The encoded point is 64 bytes from concatenation of 32 byte X and 32 byte Y. + ## bn256_scalar_mul - Opcode: 0x9a @@ -1113,6 +1115,8 @@ The notation A,B indicates that A and B are interpreted as a uint128 value, with - **Cost**: 970 - Availability: v7 +A is curve point in G1 Group and encoding described in `bn256_add`. Scalar K is a big-endian encoded big integer that has no padding zeros. + ## bn256_pairing - Opcode: 0x9b @@ -1121,6 +1125,8 @@ The notation A,B indicates that A and B are interpreted as a uint128 value, with - **Cost**: 8700 - Availability: v7 +G1s are encoded by concat each encoded G1, which described in `bn256_add`. G2s are encoded by concat encoded G2. Each G2 is in form (XA0+i*XA1, YA0+i*YA1) and encoded by big-endian field element XA0, XA1, YA0 and YA1 in sequence. + ## b+ - Opcode: 0xa0 diff --git a/data/transactions/logic/langspec.json b/data/transactions/logic/langspec.json index b55c62c79f..86bba5b8c8 100644 --- a/data/transactions/logic/langspec.json +++ b/data/transactions/logic/langspec.json @@ -1644,6 +1644,7 @@ "Returns": "B", "Size": 1, "Doc": "for (curve point A, B) return the curve point A + B", + "DocExtra": "A, B is curve point in G1 group. Each point is consists of (X, Y). X and Y are both 256 bit integer, big-endian encoded. The encoded point is 64 bytes from concatenation of 32 byte X and 32 byte Y.", "Groups": [ "Arithmetic" ] @@ -1655,6 +1656,7 @@ "Returns": "B", "Size": 1, "Doc": "for (curve point A, scalar K) return the curve point KA", + "DocExtra": "A is curve point in G1 Group and encoding described in `bn256_add`. Scalar K is a big-endian encoded big integer that has no padding zeros.", "Groups": [ "Arithmetic" ] @@ -1666,6 +1668,7 @@ "Returns": "U", "Size": 1, "Doc": "for (points in G1 group G1s, points in G2 group G2s), return whether they are paired =\u003e {0 or 1}", + "DocExtra": "G1s are encoded by concat each encoded G1, which described in `bn256_add`. G2s are encoded by concat encoded G2. Each G2 is in form (XA0+i*XA1, YA0+i*YA1) and encoded by big-endian field element XA0, XA1, YA0 and YA1 in sequence.", "Groups": [ "Arithmetic" ] From 0642b2ec7c3e3c62fd2f4bc46ebd26d9e07d1083 Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Tue, 3 May 2022 14:20:04 +0800 Subject: [PATCH 21/24] fmt --- data/transactions/logic/opcodes.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/transactions/logic/opcodes.go b/data/transactions/logic/opcodes.go index 02f19bd95c..e639c00df8 100644 --- a/data/transactions/logic/opcodes.go +++ b/data/transactions/logic/opcodes.go @@ -532,12 +532,12 @@ var OpSpecs = []OpSpec{ {0x96, "bsqrt", opBytesSqrt, proto("b:b"), 6, costly(40)}, {0x97, "divw", opDivw, proto("iii:i"), 6, opDefault()}, {0x98, "sha3_256", opSHA3_256, proto("b:b"), 7, costly(130)}, - /* Will end up following keccak256 - + /* Will end up following keccak256 - {0x98, "sha3_256", opSHA3_256, proto("b:b"), unlimitedStorage, costByLength(58, 4, 8)},}, */ - {0x99, "bn256_add", opBn256Add, proto("bb:b"), 7, costly(70)}, - {0x9a, "bn256_scalar_mul", opBn256ScalarMul, proto("bb:b"), 7, costly(970)}, - {0x9b, "bn256_pairing", opBn256Pairing, proto("bb:i"), 7, costly(8700)}, + {0x99, "bn256_add", opBn256Add, proto("bb:b"), 7, costly(70)}, + {0x9a, "bn256_scalar_mul", opBn256ScalarMul, proto("bb:b"), 7, costly(970)}, + {0x9b, "bn256_pairing", opBn256Pairing, proto("bb:i"), 7, costly(8700)}, // Byteslice math. {0xa0, "b+", opBytesPlus, proto("bb:b"), 4, costly(10)}, From defdcbc0c14c0487bf2c698018e21957a28ddab0 Mon Sep 17 00:00:00 2001 From: chris erway Date: Thu, 19 May 2022 11:54:58 -0400 Subject: [PATCH 22/24] run go get github.com/consensys/gnark-crypto@v0.7.0; go mod tidy -compat=1.17 --- go.mod | 17 +- go.sum | 721 ++------------------------------------------------------- 2 files changed, 22 insertions(+), 716 deletions(-) diff --git a/go.mod b/go.mod index bbb484d8fa..5ab3759566 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/consensys/gnark-crypto v0.7.0 github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018 github.com/dchest/siphash v1.2.1 - github.com/fatih/color v1.13.0 + github.com/fatih/color v1.7.0 github.com/gen2brain/beeep v0.0.0-20180718162406-4e430518395f github.com/getkin/kin-openapi v0.22.0 github.com/gofrs/flock v0.7.0 @@ -26,10 +26,10 @@ require ( github.com/karalabe/usb v0.0.2 github.com/labstack/echo/v4 v4.1.17 github.com/mattn/go-sqlite3 v1.10.0 - github.com/miekg/dns v1.1.41 + github.com/miekg/dns v1.1.27 github.com/olivere/elastic v6.2.14+incompatible github.com/sirupsen/logrus v1.8.1 - github.com/spf13/cobra v1.3.0 + github.com/spf13/cobra v0.0.3 github.com/stretchr/testify v1.7.1 golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064 golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 @@ -38,7 +38,7 @@ require ( ) require ( - github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect + github.com/cpuguy83/go-md2man v1.0.8 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect github.com/fortytw2/leaktest v1.3.0 // indirect @@ -52,22 +52,23 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/labstack/gommon v0.3.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mattn/go-colorable v0.1.7 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/russross/blackfriday v1.5.2 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.1 // indirect golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect + google.golang.org/appengine v1.6.7 // indirect gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/toast.v1 v1.0.0-20180812000517-0a84660828b2 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v2 v2.3.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/go.sum b/go.sum index edf63abc9b..93b075f404 100644 --- a/go.sum +++ b/go.sum @@ -1,62 +1,5 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/algorand/falcon v0.0.0-20220130164023-c9e1d466f123 h1:cnUjJ/iqUjJNbhUzgmxbfwHMVFnz+DLnNQx8uJcGaks= github.com/algorand/falcon v0.0.0-20220130164023-c9e1d466f123/go.mod h1:OkQyHlGvS0kLNcIWbC21/uQcnbfwSOQm+wiqWwBG9pQ= -github.com/algorand/go-codec v1.1.8 h1:XDSreeeZY8gMst6Edz4RBkl08/DGMJOeHYkoXL2B7wI= github.com/algorand/go-codec v1.1.8/go.mod h1:XhzVs6VVyWMLu6cApb9/192gBjGRVGm5cX5j203Heg4= github.com/algorand/go-codec/codec v1.1.8 h1:lsFuhcOH2LiEhpBH3BVUUkdevVmwCRyvb7FCAAPeY6U= github.com/algorand/go-codec/codec v1.1.8/go.mod h1:tQ3zAJ6ijTps6V+wp8KsGDnPC2uhHVC7ANyrtkIY0bA= @@ -72,51 +15,15 @@ github.com/algorand/oapi-codegen v1.3.7 h1:TdXeGljgrnLXSCGPdeY6g6+i/G0Rr5CkjBgUJ github.com/algorand/oapi-codegen v1.3.7/go.mod h1:UvOtAiP3hc0M2GUKBnZVTjLe3HKGDKh6y9rs3e3JyOg= github.com/algorand/websocket v1.4.5 h1:Cs6UTaCReAl02evYxmN8k57cNHmBILRcspfSxYg4AJE= github.com/algorand/websocket v1.4.5/go.mod h1:79n6FSZY08yQagHzE/YWZqTPBYfY5wc3IS+UTZe1W5c= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go v1.16.5 h1:NVxzZXIuwX828VcJrpNxxWjur1tlOBISdMdDdHIKHcc= github.com/aws/aws-sdk-go v1.16.5/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chrismcguire/gobberish v0.0.0-20150821175641-1d8adb509a0e h1:CHPYEbz71w8DqJ7DRIq+MXyCQsdibK08vdcQTY4ufas= github.com/chrismcguire/gobberish v0.0.0-20150821175641-1d8adb509a0e/go.mod h1:6Xhs0ZlsRjXLIiSMLKafbZxML/j30pg9Z1priLuha5s= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/consensys/bavard v0.1.10/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.7.0 h1:rwdy8+ssmLYRqKp+ryRRgQJl/rCq2uv+n83cOydm5UE= github.com/consensys/gnark-crypto v0.7.0/go.mod h1:KPSuJzyxkJA8xZ/+CV47tyqkr9MmpZA3PXivK4VPrVg= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cpuguy83/go-md2man v1.0.8 h1:DwoNytLphI8hzS2Af4D0dfaEaiSq2bN05mEm4R6vf8M= +github.com/cpuguy83/go-md2man v1.0.8/go.mod h1:N6JayAiVKtlHSnuTCeuLSQVs75hb8q+dYQLjr7cDsKY= github.com/cyberdelia/templates v0.0.0-20191230040416-20a325f050d4/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= -github.com/daixiang0/gci v0.3.2/go.mod h1:jaASoJmv/ykO9dAAPy31iJnreV19248qKDdVWf3QgC4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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= @@ -126,24 +33,10 @@ github.com/dchest/siphash v1.2.1 h1:4cLinnzVJDKxTCl9B01807Yiy+W7ZzVHj/KIroQRvT4= github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= +github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/gen2brain/beeep v0.0.0-20180718162406-4e430518395f h1:eyHMPp7tXlBMF8PZHdsL89G0ehuRNflu7zKUeoQjcJ0= github.com/gen2brain/beeep v0.0.0-20180718162406-4e430518395f/go.mod h1:GprdPCZglWh5OMcIDpeKBxuUJI+fEDOTVUfxZeda4zo= github.com/getkin/kin-openapi v0.3.1/go.mod h1:W8dhxZgpE84ciM+VIItFqkmZ4eHtuomrdIHtASQIqi0= @@ -152,98 +45,17 @@ github.com/getkin/kin-openapi v0.22.0/go.mod h1:WGRs2ZMM1Q8LR1QBEwUxC6RJEfaBcD0s github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-chi/chi v4.1.1+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus v0.0.0-20181101234600-2ff6f7ffd60f h1:zlOR3rOlPAVvtfuxGKoghCmop5B0TRyu/ZieziZuGiM= github.com/godbus/dbus v0.0.0-20181101234600-2ff6f7ffd60f/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.7.0 h1:pGFUjl501gafK9HBt1VGL1KCOd/YhIooID+xgyJCf3g= github.com/gofrs/flock v0.7.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1ks85zJ1lfDGgIiMDuIptTOhJq+zKyg= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -253,41 +65,6 @@ github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8 github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2 h1:Pgr17XVTNXAk3q/r4CpKzC5xBM/qW1uVLV+IhRZpIIk= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= -github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= -github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= @@ -296,621 +73,149 @@ github.com/jmoiron/sqlx v1.2.0 h1:41Ip0zITnmWNR/vHV+S4m+VoUivnWY5E4OJfLZjCJMA= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/karalabe/usb v0.0.2 h1:M6QQBNxF+CQ8OFvxrT90BA0qBOXymndZnk5q235mFc4= github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/labstack/echo/v4 v4.1.16/go.mod h1:awO+5TzAjvL8XpibdsfXxPgHr+orhtXZJZIQCVjogKI= github.com/labstack/echo/v4 v4.1.17 h1:PQIBaRplyRy3OjwILGkPg89JRtH2x5bssi59G2EL3fo= github.com/labstack/echo/v4 v4.1.17/go.mod h1:Tn2yRQL/UclUalpb5rPdXDevbkJ+lp/2svdyFBg6CHQ= github.com/labstack/gommon v0.3.0 h1:JEeO0bvc78PKdyHxloTKiF8BD5iGrH8T6MSeGvSgob0= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= 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/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= -github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/matryer/moq v0.0.0-20200310130814-7721994d1b54/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.7 h1:bQGKb3vps/j0E9GfJQ03JyhRuxsvdAanXlT9BTw3mdw= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.10.0 h1:jbhqpg7tQe4SupckyijYiy0mJJ/pRyHvXf7JdWK860o= github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/miekg/dns v1.1.27 h1:aEH/kqUzUxGJ/UHcEKdJY+ugH6WEzsEBBSPa8zuy1aM= +github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= github.com/olivere/elastic v6.2.14+incompatible h1:k+KadwNP/dkXE0/eu+T6otk1+5fe0tEpPyQJ4XVm5i8= github.com/olivere/elastic v6.2.14+incompatible/go.mod h1:J+q1zQJTgAz9woqsbVRqGeB5G1iqDKVBWLNSYW8yfJ8= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= 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/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -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/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.3.0 h1:R7cSvGu+Vv+qX0gW5R/85dx2kmmJT5z5NM8ifdYjdn0= -github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.1.0/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064 h1:S25/rfnfsMVgORT4/J61MJ7rdyseOZOyvLIrZEZ7s6s= golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200413165638-669c56c373c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/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-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 h1:OH54vjqzRWmbJ62fjuhxy7AxFFgoHN0/DPc/UrL8cAs= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200423205358-59e73619c742/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/sohlich/elogrus.v3 v3.0.0-20180410122755-1fa29e2f2009 h1:q/fZgS8MMadqFFGa8WL4Oyz+TmjiZfi8UrzWhTl8d5w= gopkg.in/sohlich/elogrus.v3 v3.0.0-20180410122755-1fa29e2f2009/go.mod h1:O0bY1e/dSoxMYZYTHP0SWKxG5EWLEvKR9/cOjWPPMKU= gopkg.in/toast.v1 v1.0.0-20180812000517-0a84660828b2 h1:MZF6J7CV6s/h0HBkfqebrYfKCVEo5iN+wzE4QhV3Evo= gopkg.in/toast.v1 v1.0.0-20180812000517-0a84660828b2/go.mod h1:s1Sn2yZos05Qfs7NKt867Xe18emOmtsO3eAKbDaon0o= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= From 8bc6e7df193c3b856a9e6bd5f19b97ad97956f5d Mon Sep 17 00:00:00 2001 From: John Jannotti Date: Thu, 19 May 2022 13:46:02 -0400 Subject: [PATCH 23/24] Cleanups to allow merge of experimental pairing opcodes Some doc tweaks, and moved implementation to pairing.go These opcodes should stay in vFuture until 1. We consider the serialization format 2. We have unit tests 3. We consider BLS 12-381 (and the opcodes of eip 2537) 4. Audit of gnark-crypto library --- data/transactions/logic/README.md | 2 +- data/transactions/logic/TEAL_opcodes.md | 8 +- data/transactions/logic/assembler_test.go | 67 +++++++------ data/transactions/logic/doc.go | 8 +- data/transactions/logic/eval.go | 93 ----------------- data/transactions/logic/langspec.json | 8 +- data/transactions/logic/opcodes.go | 15 ++- data/transactions/logic/pairing.go | 116 ++++++++++++++++++++++ 8 files changed, 174 insertions(+), 143 deletions(-) create mode 100644 data/transactions/logic/pairing.go diff --git a/data/transactions/logic/README.md b/data/transactions/logic/README.md index ccd6aada4a..9e93eb423a 100644 --- a/data/transactions/logic/README.md +++ b/data/transactions/logic/README.md @@ -273,7 +273,7 @@ return stack matches the name of the input value. | `ecdsa_verify v` | for (data A, signature B, C and pubkey D, E) verify the signature of the data against the pubkey => {0 or 1} | | `ecdsa_pk_recover v` | for (data A, recovery id B, signature C, D) recover a public key | | `ecdsa_pk_decompress v` | decompress pubkey A into components X, Y | -| `bn256_add` | for (curve point A, B) return the curve point A + B | +| `bn256_add` | for (curve points A and B) return the curve point A + B | | `bn256_scalar_mul` | for (curve point A, scalar K) return the curve point KA | | `bn256_pairing` | for (points in G1 group G1s, points in G2 group G2s), return whether they are paired => {0 or 1} | | `+` | A plus B. Fail on overflow. | diff --git a/data/transactions/logic/TEAL_opcodes.md b/data/transactions/logic/TEAL_opcodes.md index 8dc7b8ec7c..de7c8d8bdd 100644 --- a/data/transactions/logic/TEAL_opcodes.md +++ b/data/transactions/logic/TEAL_opcodes.md @@ -1101,11 +1101,11 @@ The notation A,B indicates that A and B are interpreted as a uint128 value, with - Opcode: 0x99 - Stack: ..., A: []byte, B: []byte → ..., []byte -- for (curve point A, B) return the curve point A + B +- for (curve points A and B) return the curve point A + B - **Cost**: 70 - Availability: v7 -A, B is curve point in G1 group. Each point is consists of (X, Y). X and Y are both 256 bit integer, big-endian encoded. The encoded point is 64 bytes from concatenation of 32 byte X and 32 byte Y. +A, B are curve points in G1 group. Each point consists of (X, Y) where X and Y are 256 bit integers, big-endian encoded. The encoded point is 64 bytes from concatenation of 32 byte X and 32 byte Y. ## bn256_scalar_mul @@ -1115,7 +1115,7 @@ A, B is curve point in G1 group. Each point is consists of (X, Y). X and Y are b - **Cost**: 970 - Availability: v7 -A is curve point in G1 Group and encoding described in `bn256_add`. Scalar K is a big-endian encoded big integer that has no padding zeros. +A is a curve point in G1 Group and encoded as described in `bn256_add`. Scalar K is a big-endian encoded big integer that has no padding zeros. ## bn256_pairing @@ -1125,7 +1125,7 @@ A is curve point in G1 Group and encoding described in `bn256_add`. Scalar K is - **Cost**: 8700 - Availability: v7 -G1s are encoded by concat each encoded G1, which described in `bn256_add`. G2s are encoded by concat encoded G2. Each G2 is in form (XA0+i*XA1, YA0+i*YA1) and encoded by big-endian field element XA0, XA1, YA0 and YA1 in sequence. +G1s are encoded by the concatenation of encoded G1 points, as described in `bn256_add`. G2s are encoded by the concatenation of encoded G2 points. Each G2 is in form (XA0+i*XA1, YA0+i*YA1) and encoded by big-endian field element XA0, XA1, YA0 and YA1 in sequence. ## b+ diff --git a/data/transactions/logic/assembler_test.go b/data/transactions/logic/assembler_test.go index f233fa374f..8c719bbfe0 100644 --- a/data/transactions/logic/assembler_test.go +++ b/data/transactions/logic/assembler_test.go @@ -581,6 +581,7 @@ func testLine(t *testing.T, line string, ver uint64, expected string) { func TestAssembleTxna(t *testing.T) { partitiontest.PartitionTest(t) + t.Parallel() testLine(t, "txna Accounts 256", AssemblerMaxVersion, "txna i beyond 255: 256") testLine(t, "txna ApplicationArgs 256", AssemblerMaxVersion, "txna i beyond 255: 256") @@ -613,6 +614,7 @@ func TestAssembleTxna(t *testing.T) { func TestAssembleGlobal(t *testing.T) { partitiontest.PartitionTest(t) + t.Parallel() testLine(t, "global", AssemblerMaxVersion, "global expects 1 immediate argument") testLine(t, "global a", AssemblerMaxVersion, "global unknown field: \"a\"") @@ -626,6 +628,7 @@ func TestAssembleGlobal(t *testing.T) { func TestAssembleDefault(t *testing.T) { partitiontest.PartitionTest(t) + t.Parallel() source := `byte 0x1122334455 int 1 @@ -642,6 +645,7 @@ func mutateProgVersion(version uint64, prog string) string { func TestOpUint(t *testing.T) { partitiontest.PartitionTest(t) + t.Parallel() for v := uint64(1); v <= AssemblerMaxVersion; v++ { t.Run(fmt.Sprintf("v=%d", v), func(t *testing.T) { @@ -658,8 +662,8 @@ func TestOpUint(t *testing.T) { func TestOpUint64(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + for v := uint64(1); v <= AssemblerMaxVersion; v++ { t.Run(fmt.Sprintf("v=%d", v), func(t *testing.T) { t.Parallel() @@ -675,8 +679,8 @@ func TestOpUint64(t *testing.T) { func TestOpBytes(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + for v := uint64(1); v <= AssemblerMaxVersion; v++ { t.Run(fmt.Sprintf("v=%d", v), func(t *testing.T) { ops := newOpStream(v) @@ -691,7 +695,6 @@ func TestOpBytes(t *testing.T) { func TestAssembleInt(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() expectedDefaultConsts := "012001bef5fad70c22" @@ -724,8 +727,8 @@ base64.b16encode(raw.encode()) func TestAssembleBytes(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + variations := []string{ "byte b32 MFRGGZDFMY", "byte base32 MFRGGZDFMY", @@ -783,6 +786,7 @@ func TestAssembleBytes(t *testing.T) { func TestAssembleBytesString(t *testing.T) { partitiontest.PartitionTest(t) + t.Parallel() for v := uint64(1); v <= AssemblerMaxVersion; v++ { t.Run(fmt.Sprintf("v=%d", v), func(t *testing.T) { @@ -794,7 +798,6 @@ func TestAssembleBytesString(t *testing.T) { func TestAssembleOptimizedConstants(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() t.Run("Bytes", func(t *testing.T) { @@ -1003,7 +1006,6 @@ bytec_1 // 0x0103 func TestAssembleOptimizedUint(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() program := ` @@ -1027,6 +1029,7 @@ int ClearState func TestFieldsFromLine(t *testing.T) { partitiontest.PartitionTest(t) + t.Parallel() line := "op arg" fields := fieldsFromLine(line) @@ -1235,8 +1238,8 @@ func TestFieldsFromLine(t *testing.T) { func TestAssembleRejectNegJump(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + source := `wat: int 1 bnz wat @@ -1255,8 +1258,8 @@ int 2` func TestAssembleBase64(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + text := `byte base64 //GWRM+yy3BCavBDXO/FYTNZ6o2Jai5edsMCBdDEz+0= byte base64 avGWRM+yy3BCavBDXO/FYTNZ6o2Jai5edsMCBdDEz//= // @@ -1290,8 +1293,8 @@ byte b64 avGWRM+yy3BCavBDXO/FYTNZ6o2Jai5edsMCBdDEz//= func TestAssembleRejectUnkLabel(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + source := `int 1 bnz nowhere int 2` @@ -1304,8 +1307,8 @@ int 2` func TestAssembleJumpToTheEnd(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + source := `intcblock 1 intc 0 intc 0 @@ -1320,8 +1323,8 @@ done:` func TestMultipleErrors(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + source := `int 1 bnz nowhere // comment @@ -1338,9 +1341,9 @@ int 2` func TestAssembleDisassemble(t *testing.T) { partitiontest.PartitionTest(t) + t.Parallel() // Specifically constructed program text that should be recreated by Disassemble() - t.Parallel() text := fmt.Sprintf(`#pragma version %d intcblock 0 1 2 3 4 5 bytecblock 0xcafed00d 0x1337 0x68656c6c6f 0xdeadbeef 0x70077007 0x0102030405060708091011121314151617181920212223242526272829303132 @@ -1466,11 +1469,10 @@ itxn LastLog func TestAssembleDisassembleCycle(t *testing.T) { partitiontest.PartitionTest(t) + t.Parallel() // Test that disassembly re-assembles to the same program bytes. // Disassembly won't necessarily perfectly recreate the source text, but assembling the result of Disassemble() should be the same program bytes. - t.Parallel() - // This confirms that each program compiles to the same bytes // (except the leading version indicator), when compiled under // original version, unspecified version (so it should pick up @@ -1496,7 +1498,6 @@ func TestAssembleDisassembleCycle(t *testing.T) { func TestConstantDisassembly(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() ops := testProg(t, "int 47", AssemblerMaxVersion) @@ -1529,6 +1530,7 @@ func TestConstantDisassembly(t *testing.T) { func TestConstantArgs(t *testing.T) { partitiontest.PartitionTest(t) t.Parallel() + for v := uint64(1); v <= AssemblerMaxVersion; v++ { testProg(t, "int", v, Expect{1, "int needs one argument"}) testProg(t, "intc", v, Expect{1, "intc operation needs one argument"}) @@ -1545,7 +1547,6 @@ func TestConstantArgs(t *testing.T) { func TestAssembleDisassembleErrors(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() source := `txn Sender` @@ -1663,8 +1664,8 @@ func TestAssembleDisassembleErrors(t *testing.T) { func TestAssembleVersions(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + testLine(t, "txna Accounts 0", AssemblerMaxVersion, "") testLine(t, "txna Accounts 0", 2, "") testLine(t, "txna Accounts 0", 1, "txna opcode was introduced in TEAL v2") @@ -1672,7 +1673,6 @@ func TestAssembleVersions(t *testing.T) { func TestAssembleBalance(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() source := `byte 0x00 @@ -1689,7 +1689,6 @@ int 1 func TestAssembleMinBalance(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() source := `byte 0x00 @@ -1706,8 +1705,8 @@ int 1 func TestAssembleAsset(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + for v := uint64(2); v <= AssemblerMaxVersion; v++ { testProg(t, "asset_holding_get ABC 1", v, Expect{1, "asset_holding_get ABC 1 expects 2 stack arguments..."}) @@ -1736,7 +1735,6 @@ func TestAssembleAsset(t *testing.T) { func TestDisassembleSingleOp(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() for v := uint64(1); v <= AssemblerMaxVersion; v++ { @@ -1753,8 +1751,8 @@ func TestDisassembleSingleOp(t *testing.T) { func TestDisassembleInt(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + txnSample := fmt.Sprintf("#pragma version %d\nint 17\nint 27\nint 37\nint 47\nint 5\nint 17\n", AssemblerMaxVersion) ops := testProg(t, txnSample, AssemblerMaxVersion) disassembled, err := Disassemble(ops.Program) @@ -1771,8 +1769,8 @@ func TestDisassembleInt(t *testing.T) { func TestDisassembleTxna(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + // txn was 1, but this tests both introduction := OpsByName[LogicVersion]["gtxna"].Version for v := introduction; v <= AssemblerMaxVersion; v++ { @@ -1800,8 +1798,8 @@ func TestDisassembleTxna(t *testing.T) { func TestDisassembleGtxna(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + // check gtxn and gtxna are properly disassembled introduction := OpsByName[LogicVersion]["gtxna"].Version @@ -1829,8 +1827,8 @@ func TestDisassembleGtxna(t *testing.T) { func TestDisassemblePushConst(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + // check pushint and pushbytes are properly disassembled intSample := fmt.Sprintf("#pragma version %d\npushint 1\n", AssemblerMaxVersion) expectedIntSample := intSample @@ -1859,7 +1857,6 @@ func TestDisassemblePushConst(t *testing.T) { func TestDisassembleLastLabel(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() // starting from TEAL v2 branching to the last line are legal @@ -1882,8 +1879,8 @@ label1: func TestAssembleOffsets(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + source := "err" ops := testProg(t, source, AssemblerMaxVersion) require.Equal(t, 2, len(ops.Program)) @@ -1982,8 +1979,8 @@ err func TestHasStatefulOps(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + source := "int 1" ops, err := AssembleStringWithVersion(source, AssemblerMaxVersion) require.NoError(t, err) @@ -2005,8 +2002,8 @@ err func TestStringLiteralParsing(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + s := `"test"` e := []byte(`test`) result, err := parseStringLiteral(s) @@ -2102,8 +2099,8 @@ func TestStringLiteralParsing(t *testing.T) { func TestPragmas(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + for v := uint64(1); v <= AssemblerMaxVersion; v++ { text := fmt.Sprintf("#pragma version %d", v) ops := testProg(t, text, v) @@ -2169,8 +2166,8 @@ func TestPragmas(t *testing.T) { func TestAssemblePragmaVersion(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + text := `#pragma version 1 int 1 ` @@ -2223,8 +2220,8 @@ len func TestAssembleConstants(t *testing.T) { partitiontest.PartitionTest(t) - t.Parallel() + for v := uint64(1); v <= AssemblerMaxVersion; v++ { t.Run(fmt.Sprintf("v=%d", v), func(t *testing.T) { testLine(t, "intc 1", v, "intc 1 is not defined") @@ -2238,6 +2235,7 @@ func TestAssembleConstants(t *testing.T) { func TestErrShortBytecblock(t *testing.T) { partitiontest.PartitionTest(t) + t.Parallel() text := `intcblock 0x1234567812345678 0x1234567812345671 0x1234567812345672 0x1234567812345673 4 5 6 7 8` ops, err := AssembleStringWithVersion(text, 1) @@ -2253,6 +2251,7 @@ func TestErrShortBytecblock(t *testing.T) { func TestMethodWarning(t *testing.T) { partitiontest.PartitionTest(t) + t.Parallel() tests := []struct { method string @@ -2299,6 +2298,7 @@ func TestMethodWarning(t *testing.T) { func TestBranchAssemblyTypeCheck(t *testing.T) { partitiontest.PartitionTest(t) + t.Parallel() text := ` int 0 // current app id [0] @@ -2333,6 +2333,7 @@ flip: // [x] func TestSwapTypeCheck(t *testing.T) { partitiontest.PartitionTest(t) t.Parallel() + /* reconfirm that we detect this type error */ testProg(t, "int 1; byte 0x1234; +", AssemblerMaxVersion, Expect{3, "+ arg 1..."}) /* despite swap, we track types */ @@ -2431,6 +2432,8 @@ func TestTxTypes(t *testing.T) { } func TestBadInnerFields(t *testing.T) { + partitiontest.PartitionTest(t) + t.Parallel() testProg(t, "itxn_begin; int 1000; itxn_field FirstValid", 5, Expect{3, "...is not allowed."}) testProg(t, "itxn_begin; int 1000; itxn_field FirstValidTime", 5, Expect{3, "...is not allowed."}) testProg(t, "itxn_begin; int 1000; itxn_field LastValid", 5, Expect{3, "...is not allowed."}) diff --git a/data/transactions/logic/doc.go b/data/transactions/logic/doc.go index 39dfa61144..a8badee03f 100644 --- a/data/transactions/logic/doc.go +++ b/data/transactions/logic/doc.go @@ -32,7 +32,7 @@ var opDocByName = map[string]string{ "ecdsa_verify": "for (data A, signature B, C and pubkey D, E) verify the signature of the data against the pubkey => {0 or 1}", "ecdsa_pk_decompress": "decompress pubkey A into components X, Y", "ecdsa_pk_recover": "for (data A, recovery id B, signature C, D) recover a public key", - "bn256_add": "for (curve point A, B) return the curve point A + B", + "bn256_add": "for (curve points A and B) return the curve point A + B", "bn256_scalar_mul": "for (curve point A, scalar K) return the curve point KA", "bn256_pairing": "for (points in G1 group G1s, points in G2 group G2s), return whether they are paired => {0 or 1}", @@ -265,9 +265,9 @@ var opDocExtras = map[string]string{ "ecdsa_verify": "The 32 byte Y-component of a public key is the last element on the stack, preceded by X-component of a pubkey, preceded by S and R components of a signature, preceded by the data that is fifth element on the stack. All values are big-endian encoded. The signed data must be 32 bytes long, and signatures in lower-S form are only accepted.", "ecdsa_pk_decompress": "The 33 byte public key in a compressed form to be decompressed into X and Y (top) components. All values are big-endian encoded.", "ecdsa_pk_recover": "S (top) and R elements of a signature, recovery id and data (bottom) are expected on the stack and used to deriver a public key. All values are big-endian encoded. The signed data must be 32 bytes long.", - "bn256_add": "A, B is curve point in G1 group. Each point is consists of (X, Y). X and Y are both 256 bit integer, big-endian encoded. The encoded point is 64 bytes from concatenation of 32 byte X and 32 byte Y.", - "bn256_scalar_mul": "A is curve point in G1 Group and encoding described in `bn256_add`. Scalar K is a big-endian encoded big integer that has no padding zeros.", - "bn256_pairing": "G1s are encoded by concat each encoded G1, which described in `bn256_add`. G2s are encoded by concat encoded G2. Each G2 is in form (XA0+i*XA1, YA0+i*YA1) and encoded by big-endian field element XA0, XA1, YA0 and YA1 in sequence.", + "bn256_add": "A, B are curve points in G1 group. Each point consists of (X, Y) where X and Y are 256 bit integers, big-endian encoded. The encoded point is 64 bytes from concatenation of 32 byte X and 32 byte Y.", + "bn256_scalar_mul": "A is a curve point in G1 Group and encoded as described in `bn256_add`. Scalar K is a big-endian encoded big integer that has no padding zeros.", + "bn256_pairing": "G1s are encoded by the concatenation of encoded G1 points, as described in `bn256_add`. G2s are encoded by the concatenation of encoded G2 points. Each G2 is in form (XA0+i*XA1, YA0+i*YA1) and encoded by big-endian field element XA0, XA1, YA0 and YA1 in sequence.", "bnz": "The `bnz` instruction opcode 0x40 is followed by two immediate data bytes which are a high byte first and low byte second which together form a 16 bit offset which the instruction may branch to. For a bnz instruction at `pc`, if the last element of the stack is not zero then branch to instruction at `pc + 3 + N`, else proceed to next instruction at `pc + 3`. Branch targets must be aligned instructions. (e.g. Branching to the second byte of a 2 byte op will be rejected.) Starting at v4, the offset is treated as a signed 16 bit integer allowing for backward branches and looping. In prior version (v1 to v3), branch offsets are limited to forward branches only, 0-0x7fff.\n\nAt v2 it became allowed to branch to the end of the program exactly after the last instruction: bnz to byte N (with 0-indexing) was illegal for a TEAL program with N bytes before v2, and is legal after it. This change eliminates the need for a last instruction of no-op as a branch target at the end. (Branching beyond the end--in other words, to a byte larger than N--is still illegal and will cause the program to fail.)", "bz": "See `bnz` for details on how branches work. `bz` inverts the behavior of `bnz`.", "b": "See `bnz` for details on how branches work. `b` always jumps to the offset.", diff --git a/data/transactions/logic/eval.go b/data/transactions/logic/eval.go index ae9a8df7b9..e621ef38e8 100644 --- a/data/transactions/logic/eval.go +++ b/data/transactions/logic/eval.go @@ -44,8 +44,6 @@ import ( "github.com/algorand/go-algorand/ledger/ledgercore" "github.com/algorand/go-algorand/logging" "github.com/algorand/go-algorand/protocol" - "github.com/consensys/gnark-crypto/ecc/bn254" - "github.com/consensys/gnark-crypto/ecc/bn254/fp" ) // evalMaxVersion is the max version we can interpret and run @@ -1300,97 +1298,6 @@ func opDivw(cx *EvalContext) error { return nil } -func bytesToBN254Field(b []byte) (ret fp.Element) { - ret.SetBytes(b) - return -} - -func bytesToBN254G1(b []byte) (ret bn254.G1Affine) { - ret.X = bytesToBN254Field(b[:32]) - ret.Y = bytesToBN254Field(b[32:64]) - return -} - -func bytesToBN254G1s(b []byte) (ret []bn254.G1Affine) { - for i := 0; i < len(b)/64; i++ { - ret = append(ret, bytesToBN254G1(b[(i*64):(i*64+64)])) - } - return -} - -func bytesToBN254G2(b []byte) (ret bn254.G2Affine) { - ret.X.A0 = bytesToBN254Field(b[:32]) - ret.X.A1 = bytesToBN254Field(b[32:64]) - ret.Y.A0 = bytesToBN254Field(b[64:96]) - ret.Y.A1 = bytesToBN254Field(b[96:128]) - return -} - -func bytesToBN254G2s(b []byte) (ret []bn254.G2Affine) { - for i := 0; i < len(b)/128; i++ { - ret = append(ret, bytesToBN254G2(b[(i*128):(i*128+128)])) - } - return -} - -func bN254G1ToBytes(g1 *bn254.G1Affine) (ret []byte) { - retX := g1.X.Bytes() - retY := g1.Y.Bytes() - ret = append(retX[:], retY[:]...) - return -} - -func opBn256Add(cx *EvalContext) error { - last := len(cx.stack) - 1 - prev := last - 1 - aBytes := cx.stack[prev].Bytes - bBytes := cx.stack[last].Bytes - if len(aBytes) != 64 || len(bBytes) != 64 { - return errors.New("expect G1 in 64 bytes") - } - a := bytesToBN254G1(aBytes) - b := bytesToBN254G1(bBytes) - res := new(bn254.G1Affine).Add(&a, &b) - resBytes := bN254G1ToBytes(res) - cx.stack = cx.stack[:last] - cx.stack[prev].Bytes = resBytes - return nil -} - -func opBn256ScalarMul(cx *EvalContext) error { - last := len(cx.stack) - 1 - prev := last - 1 - aBytes := cx.stack[prev].Bytes - if len(aBytes) != 64 { - return errors.New("expect G1 in 64 bytes") - } - a := bytesToBN254G1(aBytes) - kBytes := cx.stack[last].Bytes - k := new(big.Int).SetBytes(kBytes[:]) - res := new(bn254.G1Affine).ScalarMultiplication(&a, k) - resBytes := bN254G1ToBytes(res) - cx.stack = cx.stack[:last] - cx.stack[prev].Bytes = resBytes - return nil -} - -func opBn256Pairing(cx *EvalContext) error { - last := len(cx.stack) - 1 - prev := last - 1 - g1Bytes := cx.stack[prev].Bytes - g2Bytes := cx.stack[last].Bytes - g1 := bytesToBN254G1s(g1Bytes) - g2 := bytesToBN254G2s(g2Bytes) - ok, err := bn254.PairingCheck(g1, g2) - if err != nil { - return errors.New("pairing failed") - } - cx.stack = cx.stack[:last] - cx.stack[prev].Uint = boolToUint(ok) - cx.stack[prev].Bytes = nil - return nil -} - func opLt(cx *EvalContext) error { last := len(cx.stack) - 1 prev := last - 1 diff --git a/data/transactions/logic/langspec.json b/data/transactions/logic/langspec.json index 86bba5b8c8..1d978db8ec 100644 --- a/data/transactions/logic/langspec.json +++ b/data/transactions/logic/langspec.json @@ -1643,8 +1643,8 @@ "Args": "BB", "Returns": "B", "Size": 1, - "Doc": "for (curve point A, B) return the curve point A + B", - "DocExtra": "A, B is curve point in G1 group. Each point is consists of (X, Y). X and Y are both 256 bit integer, big-endian encoded. The encoded point is 64 bytes from concatenation of 32 byte X and 32 byte Y.", + "Doc": "for (curve points A and B) return the curve point A + B", + "DocExtra": "A, B are curve points in G1 group. Each point consists of (X, Y) where X and Y are 256 bit integers, big-endian encoded. The encoded point is 64 bytes from concatenation of 32 byte X and 32 byte Y.", "Groups": [ "Arithmetic" ] @@ -1656,7 +1656,7 @@ "Returns": "B", "Size": 1, "Doc": "for (curve point A, scalar K) return the curve point KA", - "DocExtra": "A is curve point in G1 Group and encoding described in `bn256_add`. Scalar K is a big-endian encoded big integer that has no padding zeros.", + "DocExtra": "A is a curve point in G1 Group and encoded as described in `bn256_add`. Scalar K is a big-endian encoded big integer that has no padding zeros.", "Groups": [ "Arithmetic" ] @@ -1668,7 +1668,7 @@ "Returns": "U", "Size": 1, "Doc": "for (points in G1 group G1s, points in G2 group G2s), return whether they are paired =\u003e {0 or 1}", - "DocExtra": "G1s are encoded by concat each encoded G1, which described in `bn256_add`. G2s are encoded by concat encoded G2. Each G2 is in form (XA0+i*XA1, YA0+i*YA1) and encoded by big-endian field element XA0, XA1, YA0 and YA1 in sequence.", + "DocExtra": "G1s are encoded by the concatenation of encoded G1 points, as described in `bn256_add`. G2s are encoded by the concatenation of encoded G2 points. Each G2 is in form (XA0+i*XA1, YA0+i*YA1) and encoded by big-endian field element XA0, XA1, YA0 and YA1 in sequence.", "Groups": [ "Arithmetic" ] diff --git a/data/transactions/logic/opcodes.go b/data/transactions/logic/opcodes.go index e639c00df8..59833f37a4 100644 --- a/data/transactions/logic/opcodes.go +++ b/data/transactions/logic/opcodes.go @@ -57,8 +57,11 @@ const txnEffectsVersion = 6 // the Foreign arrays. const createdResourcesVersion = 6 -// experimental- -const fidoVersion = 7 // base64, json, secp256r1 +// EXPERIMENTAL. These should be revisited whenever a new LogiSigVersion is +// moved from vFuture to a new consensus version. If they remain unready, bump +// their version. +const fidoVersion = 7 // base64, json, secp256r1 +const pairingVersion = 7 // bn256 opcodes. will add bls12-381, and unify the available opcodes. type linearCost struct { baseCost int @@ -535,9 +538,11 @@ var OpSpecs = []OpSpec{ /* Will end up following keccak256 - {0x98, "sha3_256", opSHA3_256, proto("b:b"), unlimitedStorage, costByLength(58, 4, 8)},}, */ - {0x99, "bn256_add", opBn256Add, proto("bb:b"), 7, costly(70)}, - {0x9a, "bn256_scalar_mul", opBn256ScalarMul, proto("bb:b"), 7, costly(970)}, - {0x9b, "bn256_pairing", opBn256Pairing, proto("bb:i"), 7, costly(8700)}, + + {0x99, "bn256_add", opBn256Add, proto("bb:b"), pairingVersion, costly(70)}, + {0x9a, "bn256_scalar_mul", opBn256ScalarMul, proto("bb:b"), pairingVersion, costly(970)}, + {0x9b, "bn256_pairing", opBn256Pairing, proto("bb:i"), pairingVersion, costly(8700)}, + // leave room here for eip-2537 style opcodes // Byteslice math. {0xa0, "b+", opBytesPlus, proto("bb:b"), 4, costly(10)}, diff --git a/data/transactions/logic/pairing.go b/data/transactions/logic/pairing.go new file mode 100644 index 0000000000..cb43efeb5e --- /dev/null +++ b/data/transactions/logic/pairing.go @@ -0,0 +1,116 @@ +// Copyright (C) 2019-2022 Algorand, Inc. +// This file is part of go-algorand +// +// go-algorand is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// go-algorand is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with go-algorand. If not, see . + +package logic + +import ( + "errors" + "math/big" + + "github.com/consensys/gnark-crypto/ecc/bn254" + "github.com/consensys/gnark-crypto/ecc/bn254/fp" +) + +func bytesToBN254Field(b []byte) (ret fp.Element) { + ret.SetBytes(b) + return +} + +func bytesToBN254G1(b []byte) (ret bn254.G1Affine) { + ret.X = bytesToBN254Field(b[:32]) + ret.Y = bytesToBN254Field(b[32:64]) + return +} + +func bytesToBN254G1s(b []byte) (ret []bn254.G1Affine) { + for i := 0; i < len(b)/64; i++ { + ret = append(ret, bytesToBN254G1(b[(i*64):(i*64+64)])) + } + return +} + +func bytesToBN254G2(b []byte) (ret bn254.G2Affine) { + ret.X.A0 = bytesToBN254Field(b[:32]) + ret.X.A1 = bytesToBN254Field(b[32:64]) + ret.Y.A0 = bytesToBN254Field(b[64:96]) + ret.Y.A1 = bytesToBN254Field(b[96:128]) + return +} + +func bytesToBN254G2s(b []byte) (ret []bn254.G2Affine) { + for i := 0; i < len(b)/128; i++ { + ret = append(ret, bytesToBN254G2(b[(i*128):(i*128+128)])) + } + return +} + +func bN254G1ToBytes(g1 *bn254.G1Affine) (ret []byte) { + retX := g1.X.Bytes() + retY := g1.Y.Bytes() + ret = append(retX[:], retY[:]...) + return +} + +func opBn256Add(cx *EvalContext) error { + last := len(cx.stack) - 1 + prev := last - 1 + aBytes := cx.stack[prev].Bytes + bBytes := cx.stack[last].Bytes + if len(aBytes) != 64 || len(bBytes) != 64 { + return errors.New("expect G1 in 64 bytes") + } + a := bytesToBN254G1(aBytes) + b := bytesToBN254G1(bBytes) + res := new(bn254.G1Affine).Add(&a, &b) + resBytes := bN254G1ToBytes(res) + cx.stack = cx.stack[:last] + cx.stack[prev].Bytes = resBytes + return nil +} + +func opBn256ScalarMul(cx *EvalContext) error { + last := len(cx.stack) - 1 + prev := last - 1 + aBytes := cx.stack[prev].Bytes + if len(aBytes) != 64 { + return errors.New("expect G1 in 64 bytes") + } + a := bytesToBN254G1(aBytes) + kBytes := cx.stack[last].Bytes + k := new(big.Int).SetBytes(kBytes[:]) + res := new(bn254.G1Affine).ScalarMultiplication(&a, k) + resBytes := bN254G1ToBytes(res) + cx.stack = cx.stack[:last] + cx.stack[prev].Bytes = resBytes + return nil +} + +func opBn256Pairing(cx *EvalContext) error { + last := len(cx.stack) - 1 + prev := last - 1 + g1Bytes := cx.stack[prev].Bytes + g2Bytes := cx.stack[last].Bytes + g1 := bytesToBN254G1s(g1Bytes) + g2 := bytesToBN254G2s(g2Bytes) + ok, err := bn254.PairingCheck(g1, g2) + if err != nil { + return errors.New("pairing failed") + } + cx.stack = cx.stack[:last] + cx.stack[prev].Uint = boolToUint(ok) + cx.stack[prev].Bytes = nil + return nil +} From 847e0a924abe12679650ba9b855aaa5d6c883024 Mon Sep 17 00:00:00 2001 From: John Jannotti Date: Mon, 23 May 2022 23:54:02 -0400 Subject: [PATCH 24/24] go fmt --- data/transactions/logic/opcodes.go | 1 - 1 file changed, 1 deletion(-) diff --git a/data/transactions/logic/opcodes.go b/data/transactions/logic/opcodes.go index 6790326002..1d26d437a0 100644 --- a/data/transactions/logic/opcodes.go +++ b/data/transactions/logic/opcodes.go @@ -68,7 +68,6 @@ const appAddressAvailableVersion = 7 const fidoVersion = 7 // base64, json, secp256r1 const pairingVersion = 7 // bn256 opcodes. will add bls12-381, and unify the available opcodes.// experimental- - type linearCost struct { baseCost int chunkCost int