From 1ac8dbf5ba837d14ef3f7c4df84d87f6f17842f2 Mon Sep 17 00:00:00 2001 From: hunjixin <16705420332lee@gmai.com> Date: Mon, 17 Jun 2024 03:42:35 +0000 Subject: [PATCH] feat: add valid submission event --- cmd/lilypad/collection-pow-submission.go | 50 +++++ cmd/lilypad/root.go | 1 + go.mod | 29 ++- go.sum | 153 ++++++++++++-- hardhat/contracts/LilypadPow.sol | 24 ++- .../collect_submission.go | 174 ++++++++++++++++ pkg/options/collect-pow-submission.go | 54 +++++ pkg/resourceprovider/resourceprovider.go | 2 +- pkg/web3/api.go | 32 +-- pkg/web3/bindings/pow/pow.go | 188 +++++++++--------- pkg/web3/events_pow.go | 4 +- pkg/web3/events_valid_submission.go | 78 ++++++++ stack | 4 +- 13 files changed, 626 insertions(+), 167 deletions(-) create mode 100644 cmd/lilypad/collection-pow-submission.go create mode 100644 pkg/collectpowsubmission/collect_submission.go create mode 100644 pkg/options/collect-pow-submission.go create mode 100644 pkg/web3/events_valid_submission.go diff --git a/cmd/lilypad/collection-pow-submission.go b/cmd/lilypad/collection-pow-submission.go new file mode 100644 index 00000000..0cdb055a --- /dev/null +++ b/cmd/lilypad/collection-pow-submission.go @@ -0,0 +1,50 @@ +package lilypad + +import ( + "github.com/lilypad-tech/lilypad/pkg/collectpowsubmission" + "github.com/lilypad-tech/lilypad/pkg/options" + optionsfactory "github.com/lilypad-tech/lilypad/pkg/options" + "github.com/lilypad-tech/lilypad/pkg/system" + "github.com/lilypad-tech/lilypad/pkg/web3" + "github.com/spf13/cobra" +) + +func newCollectionPowSubmissionCmd() *cobra.Command { + options := optionsfactory.NewCollectPowSubmissionOptions() + + powSignalCmd := &cobra.Command{ + Use: "collection-pow-submission", + Short: "Collect pow submission data to database.", + Long: "Collect pow submission data to database.", + Example: "", + RunE: func(cmd *cobra.Command, _ []string) error { + network, _ := cmd.Flags().GetString("network") + + options, err := optionsfactory.ProcessCollectPowSubmissionOptions(options, network) + if err != nil { + return err + } + return runCollectionPowSubmission(cmd, options) + }, + } + + optionsfactory.AddCollectPowSubmissionCliFlags(powSignalCmd, &options) + + return powSignalCmd +} + +func runCollectionPowSubmission(cmd *cobra.Command, options options.CollectPowSubmissionOptions) error { + commandCtx := system.NewCommandContext(cmd) + defer commandCtx.Cleanup() + + web3SDK, err := web3.NewContractSDK(options.Web3) + if err != nil { + return err + } + + err = collectpowsubmission.StartCollectPowSubmission(commandCtx.Ctx, web3SDK, options.PGConnectionString, commandCtx.Cm) + if err != nil { + return err + } + return nil +} diff --git a/cmd/lilypad/root.go b/cmd/lilypad/root.go index 0605cee6..93091a73 100644 --- a/cmd/lilypad/root.go +++ b/cmd/lilypad/root.go @@ -32,6 +32,7 @@ func NewRootCmd() *cobra.Command { RootCmd.AddCommand(newMediatorCmd()) RootCmd.AddCommand(newJobCreatorCmd()) RootCmd.AddCommand(newVersionCmd()) + RootCmd.AddCommand(newCollectionPowSubmissionCmd()) return RootCmd } diff --git a/go.mod b/go.mod index 3147da44..9d3e0629 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,15 @@ module github.com/lilypad-tech/lilypad -go 1.20 +go 1.21 + +toolchain go1.22.4 require ( github.com/BurntSushi/toml v0.3.1 + github.com/bits-and-blooms/bloom/v3 v3.7.0 github.com/davecgh/go-spew v1.1.1 github.com/ethereum/go-ethereum v1.13.4 - github.com/fatih/color v1.15.0 + github.com/fatih/color v1.16.0 github.com/go-git/go-git/v5 v5.10.0 github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 @@ -16,10 +19,13 @@ require ( github.com/holiman/uint256 v1.2.4 github.com/ipfs/go-merkledag v0.11.0 github.com/pkg/errors v0.9.1 - github.com/rs/zerolog v1.31.0 + github.com/rs/zerolog v1.32.0 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 github.com/theckman/yacspin v0.13.12 + github.com/uptrace/bun v1.2.1 + github.com/uptrace/bun/dialect/pgdialect v1.2.1 + github.com/uptrace/bun/driver/pgdriver v1.2.1 gorgonia.org/cu v0.9.7-0.20240623234718-3cd40db700e9 k8s.io/apimachinery v0.28.3 ) @@ -30,7 +36,7 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/acomagu/bufpipe v1.0.4 // indirect - github.com/bits-and-blooms/bitset v1.7.0 // indirect + github.com/bits-and-blooms/bitset v1.13.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect github.com/cloudflare/circl v1.3.3 // indirect github.com/consensys/bavard v0.1.13 // indirect @@ -72,10 +78,11 @@ require ( github.com/ipld/go-ipld-prime v0.20.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jbenet/goprocess v0.1.4 // indirect + github.com/jinzhu/inflection v1.0.0 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/klauspost/cpuid/v2 v2.1.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect github.com/minio/sha256-simd v1.0.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect @@ -98,22 +105,26 @@ require ( github.com/supranational/blst v0.3.11 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect + github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.22.0 // indirect - golang.org/x/crypto v0.14.0 // indirect + golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.17.0 // indirect + golang.org/x/net v0.23.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.13.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/tools v0.13.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/blake3 v1.1.7 // indirect + mellium.im/sasl v0.3.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/go.sum b/go.sum index 16fb13c4..5f80ed19 100644 --- a/go.sum +++ b/go.sum @@ -5,6 +5,7 @@ github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ 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/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= +github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= @@ -13,26 +14,37 @@ github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjA github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= +github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/apache/arrow/go/arrow v0.0.0-20201229220542-30ce2eb5d4dc/go.mod h1:c9sxoIT3YgLxH4UhLOCKaBlEojuMhVYpk4Ntv3opUTQ= github.com/apache/arrow/go/arrow v0.0.0-20210105145422-88aaea5262db/go.mod h1:c9sxoIT3YgLxH4UhLOCKaBlEojuMhVYpk4Ntv3opUTQ= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/awalterschulze/gographviz v0.0.0-20190221210632-1e9ccb565bca/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= -github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bits-and-blooms/bitset v1.10.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE= +github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bits-and-blooms/bloom/v3 v3.7.0 h1:VfknkqV4xI+PsaDIsoHueyxVDZrfvMn56jeWUzvzdls= +github.com/bits-and-blooms/bloom/v3 v3.7.0/go.mod h1:VKlUSvp0lFIYqxJjzdnSsZEw4iHb1kOL2tfHTgyJBHg= github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPxiMSCF5k= github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= +github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chewxy/hm v1.0.0/go.mod h1:qg9YI4q6Fkj/whwHR1D+bOGeF7SniIP40VweVepLjg0= github.com/chewxy/math32 v1.0.0/go.mod h1:Miac6hA1ohdDUTagnvJy/q+aNnEk16qWUdb8ZVhvCN0= github.com/chewxy/math32 v1.0.6/go.mod h1:dOB2rcuFrCn6UHrze36WSLVPKtzPMRAQvBvUwkSsLqs= @@ -43,11 +55,17 @@ github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEM github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cockroachdb/errors v1.8.1 h1:A5+txlVZfOqFBDa4mGz2bUWSp0aHElvHX2bKkdbQu+Y= +github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= +github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= github.com/cockroachdb/redact v1.0.8 h1:8QG/764wK+vmEYoOlfobpe12EQcS81ukx/a4hdVMxNw= +github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 h1:IKgmqgMQlVJIZj19CdocBeSfSaiCbEBZGKODaixqtHM= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= @@ -58,6 +76,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/crate-crypto/go-kzg-4844 v0.3.0 h1:UBlWE0CgyFqqzTI+IFyCzA7A3Zw4iip6uzRv5NIXG0A= github.com/crate-crypto/go-kzg-4844 v0.3.0/go.mod h1:SBP7ikXEgDnUPONgm33HtuDZEDtWa3L4QtN1ocJSEQ4= github.com/cskr/pubsub v1.0.2 h1:vlOzMhl6PFn60gRlTQQsIfVwaPB/B/8MziK8FhEPt/0= +github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/cznic/cc v0.0.0-20181122101902-d673e9b70d4d/go.mod h1:m3fD/V+XTB35Kh9zw6dzjMY+We0Q7PMf6LLIC4vuG9k= @@ -71,10 +90,12 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -86,20 +107,25 @@ github.com/ethereum/c-kzg-4844 v0.3.1/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1 github.com/ethereum/go-ethereum v1.13.4 h1:25HJnaWVg3q1O7Z62LaaI6S9wVq8QCw3K88g8wEzrcM= github.com/ethereum/go-ethereum v1.13.4/go.mod h1:I0U5VewuuTzvBtVzKo7b3hJzDhXOUtn9mJW7SsIPB0Q= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= +github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= +github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= github.com/go-git/go-git/v5 v5.10.0 h1:F0x3xXrAWmhwtzoCokU4IMPcBdncG+HAAqi9FcOOjbQ= github.com/go-git/go-git/v5 v5.10.0/go.mod h1:1FOZ/pQnqw24ghP2n7cunVl0ON55BsjPYvhWHvZGhoo= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -114,11 +140,13 @@ github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= +github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= @@ -136,9 +164,10 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq 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.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gonum/blas v0.0.0-20181208220705-f22b278b28ac/go.mod h1:P32wAyui1PQ58Oce/KYkOqQv8cVw1zAapXOl+dRFGbc= github.com/google/flatbuffers v1.10.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= @@ -149,16 +178,18 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/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.3/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.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= +github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo= 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.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorgonia/bindgen v0.0.0-20180812032444-09626750019e/go.mod h1:YzKk63P9jQHkwAo2rXHBv02yPxDzoQT2cBV0x5bGV/8= github.com/gorgonia/bindgen v0.0.0-20210223094355-432cd89e7765/go.mod h1:BLHSe436vhQKRfm6wxJgebeK4fDY+ER/8jV3vVH9yYU= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= @@ -168,6 +199,7 @@ github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= +github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI= @@ -179,15 +211,19 @@ github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uG github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 h1:3JQNjnMRil1yD0IfZKHF9GxxWKDJGj8I0IqOUol//sw= +github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= +github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= +github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= github.com/ipfs/go-bitswap v0.11.0 h1:j1WVvhDX1yhG32NTC9xfxnqycqYIlhzEzLXG/cU1HyQ= +github.com/ipfs/go-bitswap v0.11.0/go.mod h1:05aE8H3XOU+LXpTedeAS0OZpcO1WFsj5niYQH9a1Tmk= github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= github.com/ipfs/go-block-format v0.0.3 h1:r8t66QstRp/pd/or4dpnbVfXT5Gt7lOqRvC+/dDTpMc= github.com/ipfs/go-block-format v0.0.3/go.mod h1:4LmD4ZUw0mhO+JSKdpWwrzATiEfM7WWgQ8H5l6P8MVk= @@ -207,15 +243,20 @@ github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46U github.com/ipfs/go-ipfs-blockstore v1.2.0 h1:n3WTeJ4LdICWs/0VSfjHrlqpPpl6MZ+ySd3j8qz0ykw= github.com/ipfs/go-ipfs-blockstore v1.2.0/go.mod h1:eh8eTFLiINYNSNawfZOC7HOxNTxpB1PFuA5E1m/7exE= github.com/ipfs/go-ipfs-blocksutil v0.0.1 h1:Eh/H4pc1hsvhzsQoMEP3Bke/aW5P5rVM1IWFJMcGIPQ= +github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk= github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-delay v0.0.1 h1:r/UXYyRcddO6thwOnhiznIAiSvxMECGgtv35Xs1IeRQ= +github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-ds-help v1.1.0 h1:yLE2w9RAsl31LtfMt91tRZcrx+e61O5mDxFRR994w4Q= github.com/ipfs/go-ipfs-ds-help v1.1.0/go.mod h1:YR5+6EaebOhfcqVCyqemItCLthrpVNot+rsOU/5IatU= github.com/ipfs/go-ipfs-exchange-interface v0.2.0 h1:8lMSJmKogZYNo2jjhUs0izT+dck05pqUw4mWNW9Pw6Y= github.com/ipfs/go-ipfs-exchange-interface v0.2.0/go.mod h1:z6+RhJuDQbqKguVyslSOuVDhqF9JtTrO3eptSAiW2/Y= github.com/ipfs/go-ipfs-exchange-offline v0.3.0 h1:c/Dg8GDPzixGd0MC8Jh6mjOwU57uYokgWRFidfvEkuA= +github.com/ipfs/go-ipfs-exchange-offline v0.3.0/go.mod h1:MOdJ9DChbb5u37M1IcbrRB02e++Z7521fMxqCNRrz9s= github.com/ipfs/go-ipfs-pq v0.0.2 h1:e1vOOW6MuOwG2lqxcLA+wEn93i/9laCY8sXAw76jFOY= +github.com/ipfs/go-ipfs-pq v0.0.2/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= github.com/ipfs/go-ipfs-routing v0.3.0 h1:9W/W3N+g+y4ZDeffSgqhgo7BsBSJwPMcyssET9OWevc= +github.com/ipfs/go-ipfs-routing v0.3.0/go.mod h1:dKqtTFIql7e1zYsEuWLyuOU+E0WJWW8JjbTPLParDWo= github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc= github.com/ipfs/go-ipfs-util v0.0.2 h1:59Sswnk1MFaiq+VcaknX7aYEyGyGDAA73ilhEK2POp8= github.com/ipfs/go-ipfs-util v0.0.2/go.mod h1:CbPtkWJzjLdEcezDns2XYaehFVNXG9zrdrtMecczcsQ= @@ -235,6 +276,7 @@ github.com/ipfs/go-merkledag v0.11.0/go.mod h1:Q4f/1ezvBiJV0YCIXvt51W/9/kqJGH4I1 github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg= github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= github.com/ipfs/go-peertaskqueue v0.8.0 h1:JyNO144tfu9bx6Hpo119zvbEL9iQ760FHOiJYsUjqaU= +github.com/ipfs/go-peertaskqueue v0.8.0/go.mod h1:cz8hEnnARq4Du5TGqiWKgMr/BOSQ5XOgMOh1K5YYKKM= github.com/ipfs/go-verifcid v0.0.1 h1:m2HI7zIuR5TFyQ1b79Da5N9dnnCP1vcu2QqawmWlK2E= github.com/ipfs/go-verifcid v0.0.1/go.mod h1:5Hrva5KBeIog4A+UpqlaIU+DEstipcJYQQZc0g37pY0= github.com/ipld/go-codec-dagpb v1.6.0 h1:9nYazfyu9B1p3NAgfVdpRco3Fs2nFC72DqVsMj6rOcc= @@ -242,12 +284,16 @@ github.com/ipld/go-codec-dagpb v1.6.0/go.mod h1:ANzFhfP2uMJxRBr8CE+WQWs5UsNa0pYt github.com/ipld/go-ipld-prime v0.20.0 h1:Ud3VwE9ClxpO2LkCYP7vWPc0Fo+dYdYzgxUJZ3uRG4g= github.com/ipld/go-ipld-prime v0.20.0/go.mod h1:PzqZ/ZR981eKbgdr3y2DJYeD/8bgMawdGVlJDE8kK+M= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= +github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jbenet/goprocess v0.1.4 h1:DRGOFReOMqqDNXwW70QkacFW0YN9QnwLV0Vqk+3oU0o= github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE= +github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= @@ -256,30 +302,46 @@ github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQL 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/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7yIO+lw= +github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.1.0 h1:eyi1Ad2aNJMW95zcSbmGg7Cg6cq3ADwLpMAP96d8rF0= github.com/klauspost/cpuid/v2 v2.1.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/koron/go-ssdp v0.0.3 h1:JivLMY45N76b4p/vsWGOKewBQu6uf39y8l+AQ7sDKx8= +github.com/koron/go-ssdp v0.0.3/go.mod h1:b2MxI6yh02pKrsyNoQUsk4+YNikaGhe4894J+Q5lDvA= 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/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= 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/leesper/go_rng v0.0.0-20171009123644-5344a9259b21/go.mod h1:N0SVk0uhy+E1PZ3C9ctsPRlvOPAFPkCNlcPBDkt0N3U= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= +github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/libp2p/go-cidranger v1.1.0 h1:ewPN8EZ0dd1LSnrtuwd4709PXVcITVeuwbag38yPW7c= +github.com/libp2p/go-cidranger v1.1.0/go.mod h1:KWZTfSr+r9qEo9OkI9/SIEeAtw+NNoU0dXIXt15Okic= github.com/libp2p/go-libp2p v0.22.0 h1:2Tce0kHOp5zASFKJbNzRElvh0iZwdtG5uZheNW8chIw= +github.com/libp2p/go-libp2p v0.22.0/go.mod h1:UDolmweypBSjQb2f7xutPnwZ/fxioLbMBxSjRksxxU4= github.com/libp2p/go-libp2p-asn-util v0.2.0 h1:rg3+Os8jbnO5DxkC7K/Utdi+DkY3q/d1/1q+8WeNAsw= +github.com/libp2p/go-libp2p-asn-util v0.2.0/go.mod h1:WoaWxbHKBymSN41hWSq/lGKJEca7TNm58+gGJi2WsLI= github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3queqa1NkQ0= +github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvNDFGKX7QdlpYUcwk= github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA= +github.com/libp2p/go-libp2p-testing v0.12.0/go.mod h1:KcGDRXyN7sQCllucn1cOOS+Dmm7ujhfEyXQL5lvkcPg= github.com/libp2p/go-msgio v0.2.0 h1:W6shmB+FeynDrUVl2dgFQvzfBZcXiyqY4VmpQLu9FqU= +github.com/libp2p/go-msgio v0.2.0/go.mod h1:dBVM1gW3Jk9XqHkU4eKdGvVHdLa51hoGfll6jMJMSlY= github.com/libp2p/go-nat v0.1.0 h1:MfVsH6DLcpa04Xr+p8hmVRG4juse0s3J8HyNWYHffXg= +github.com/libp2p/go-nat v0.1.0/go.mod h1:X7teVkwRHNInVNWQiO/tAiAVRwSr5zoRz4YSTC3uRBM= github.com/libp2p/go-netroute v0.2.0 h1:0FpsbsvuSnAhXFnCY0VLFbJOzaK0VnP0r1QT/o4nWRE= +github.com/libp2p/go-netroute v0.2.0/go.mod h1:Vio7LTzZ+6hoT4CMZi5/6CpY3Snzh2vgZhWgxMNwlQI= github.com/libp2p/go-openssl v0.1.0 h1:LBkKEcUv6vtZIQLVTegAil8jbNpJErQ9AnT+bWV+Ooo= +github.com/libp2p/go-openssl v0.1.0/go.mod h1:OiOxwPpL3n4xlenjx2h7AwSGaFSC/KZvf6gNdOBQMtc= github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= @@ -290,21 +352,27 @@ github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o0= +github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= +github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= +github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= 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= @@ -318,24 +386,31 @@ github.com/multiformats/go-base32 v0.0.4/go.mod h1:jNLFzjPZtp3aIARHbJRZIaPuspdH0 github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4= github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= github.com/multiformats/go-multiaddr v0.7.0 h1:gskHcdaCyPtp9XskVwtvEeQOG465sCohbQIirSyqxrc= +github.com/multiformats/go-multiaddr v0.7.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs= github.com/multiformats/go-multiaddr-dns v0.3.1 h1:QgQgR+LQVt3NPTjbrLLpsaT2ufAA2y0Mkk+QRVJbW3A= +github.com/multiformats/go-multiaddr-dns v0.3.1/go.mod h1:G/245BRQ6FJGmryJCrOuTdB37AMA5AMOVuO6NY3JwTk= github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E= +github.com/multiformats/go-multiaddr-fmt v0.1.0/go.mod h1:hGtDIW4PU4BqJ50gW2quDuPVjyWNZxToGUh/HwTZYJo= github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= github.com/multiformats/go-multibase v0.1.1 h1:3ASCDsuLX8+j4kx58qnJ4YFq/JWTJpCyDW27ztsVTOI= github.com/multiformats/go-multibase v0.1.1/go.mod h1:ZEjHE+IsUrgp5mhlEAYjMtZwK1k4haNkcaPg9aoe1a8= github.com/multiformats/go-multicodec v0.8.0 h1:evBmgkbSQux+Ds2IgfhkO38Dl2GDtRW8/Rp6YiSHX/Q= +github.com/multiformats/go-multicodec v0.8.0/go.mod h1:GUC8upxSBE4oG+q3kWZRw/+6yC1BqO550bjhWsJbZlw= github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-multihash v0.2.1 h1:aem8ZT0VA2nCHHk7bPJ1BjUbHNciqZC/d16Vve9l108= github.com/multiformats/go-multihash v0.2.1/go.mod h1:WxoMcYG85AZVQUyRyo9s4wULvW5qrI9vb2Lt6evduFc= github.com/multiformats/go-multistream v0.3.3 h1:d5PZpjwRgVlbwfdTDjife7XszfZd8KYWfROYFlGcR8o= +github.com/multiformats/go-multistream v0.3.3/go.mod h1:ODRoqamLUsETKS9BNcII4gcRsJBU5VAwRIv7O39cEXg= github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.6 h1:gk85QWKxh3TazbLxED/NlDVv8+q+ReFJk7Y2W/KhfNY= github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= @@ -349,10 +424,14 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e h1:ZOcivgkkFRnjfoTcGsDq3UQYiBmekwLA+qg0OjyB/ls= github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/prometheus/client_golang v1.12.0 h1:C+UIj/QWtmqY13Arb8kwMt5j34/0Z2iKamrJ+ryC0Gg= +github.com/prometheus/client_golang v1.12.0/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a h1:CmF68hwI0XsOQ5UwlBopMi2Ow4Pbg32akc4KIVCOm+Y= +github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= @@ -360,10 +439,12 @@ github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= -github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= 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/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= @@ -374,8 +455,11 @@ github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM= github.com/skeema/knownhosts v1.2.0/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU= +github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= @@ -383,6 +467,7 @@ github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRM 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/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= +github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -397,20 +482,40 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/theckman/yacspin v0.13.12 h1:CdZ57+n0U6JMuh2xqjnjRq5Haj6v1ner2djtLQRzJr4= github.com/theckman/yacspin v0.13.12/go.mod h1:Rd2+oG2LmQi5f3zC3yeZAOl245z8QOvrH4OPOJNZxLg= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= +github.com/twmb/murmur3 v1.1.6 h1:mqrRot1BRxm+Yct+vavLMou2/iJt0tNVTTC0QoIjaZg= +github.com/twmb/murmur3 v1.1.6/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= +github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= +github.com/uptrace/bun v1.2.1 h1:2ENAcfeCfaY5+2e7z5pXrzFKy3vS8VXvkCag6N2Yzfk= +github.com/uptrace/bun v1.2.1/go.mod h1:cNg+pWBUMmJ8rHnETgf65CEvn3aIKErrwOD6IA8e+Ec= +github.com/uptrace/bun/dialect/pgdialect v1.2.1 h1:ceP99r03u+s8ylaDE/RzgcajwGiC76Jz3nS2ZgyPQ4M= +github.com/uptrace/bun/dialect/pgdialect v1.2.1/go.mod h1:mv6B12cisvSc6bwKm9q9wcrr26awkZK8QXM+nso9n2U= +github.com/uptrace/bun/driver/pgdriver v1.2.1 h1:Cp6c1tKzbTIyL8o0cGT6cOhTsmQZdsUNhgcV51dsmLU= +github.com/uptrace/bun/driver/pgdriver v1.2.1/go.mod h1:jEd3WGx74hWLat3/IkesOoWNjrFNUDADK3nkyOFOOJM= github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= +github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= +github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/warpfork/go-testmark v0.11.0 h1:J6LnV8KpceDvo7spaNU4+DauH2n1x+6RaO2rJrmpQ9U= +github.com/warpfork/go-testmark v0.11.0/go.mod h1:jhEf8FVxd+F17juRubpmut64NEG6I2rgkUhlcqqXwE0= github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a h1:G++j5e0OC488te356JvdhaM8YS6nMsjLAYF7JxCv07w= +github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/xtgo/set v1.0.0/go.mod h1:d3NHzGzSa0NmB2NhFyECA+QdRp29oEn2xbT+TpeFoM8= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -426,6 +531,7 @@ go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= @@ -446,8 +552,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20181106170214-d68db9428509/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -489,8 +595,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 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= @@ -536,14 +642,15 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -551,8 +658,10 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -610,22 +719,24 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 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.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.2/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.8/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/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= @@ -652,6 +763,8 @@ k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= lukechampine.com/blake3 v1.1.7 h1:GgRMhmdsuK8+ii6UZFDL8Nb+VyMwadAgcJyfYHxG6n0= lukechampine.com/blake3 v1.1.7/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= +mellium.im/sasl v0.3.1 h1:wE0LW6g7U83vhvxjC1IY8DnXM+EU095yeo8XClvCdfo= +mellium.im/sasl v0.3.1/go.mod h1:xm59PUYpZHhgQ9ZqoJ5QaCqzWMi8IeS49dhp6plPCzw= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/cc v1.0.1/go.mod h1:uj1/YV+GYVdtSfGOgOtY62Jz8YIiEC0EzZNq481HIQs= modernc.org/fileutil v1.0.0/go.mod h1:JHsWpkrk/CnVV1H/eGlFf85BEpfkrp56ro8nojIq9Q8= diff --git a/hardhat/contracts/LilypadPow.sol b/hardhat/contracts/LilypadPow.sol index 40748c2a..243b8bc6 100644 --- a/hardhat/contracts/LilypadPow.sol +++ b/hardhat/contracts/LilypadPow.sol @@ -9,8 +9,8 @@ contract LilypadPow is Ownable, Initializable { address walletAddress; string nodeId; uint256 nonce; - uint256 start_timestap; - uint256 complete_timestap; //used to estimate hashrate of this submission + uint256 start_timestamp; + uint256 complete_timestamp; //used to estimate hashrate of this submission bytes32 challenge; //record this to provent user never change challenge uint256 difficulty; } @@ -29,7 +29,6 @@ contract LilypadPow is Ownable, Initializable { uint256 public targetDifficulty = 555460709263765739036470010701196062214039696708679004195670928130048; mapping(address => POWSubmission[]) public powSubmissions; - mapping(address => uint256) public minerSubmissionCount; //used for loop powsubmission address[] public miners; mapping(address => Challenge) public lastChallenges; @@ -45,10 +44,14 @@ contract LilypadPow is Ownable, Initializable { // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable function initialize() public initializer {} - function getMiners() external view returns (address[] memory) { + function getMiners() public view returns (address[] memory) { return miners; } + function getMinerPosSubmissions(address addr) public view returns (POWSubmission[] memory) { + return powSubmissions[addr]; + } + // generateChallenge gen a byte32 value as challenge value, Sc store this one for verify function generateChallenge(string calldata nodeId) external { checkTimeWindow(); @@ -103,13 +106,10 @@ contract LilypadPow is Ownable, Initializable { validProofs++; - if (minerSubmissionCount[msg.sender] == 0) { - //first submit, append to miners + POWSubmission[] storage posSubmissions = powSubmissions[msg.sender]; + if (posSubmissions.length == 0) { miners.push(msg.sender); } - - minerSubmissionCount[msg.sender]++; //increase miner's valid proofs - POWSubmission[] storage posSubmissions = powSubmissions[msg.sender]; posSubmissions.push( POWSubmission( msg.sender, @@ -128,6 +128,7 @@ contract LilypadPow is Ownable, Initializable { msg.sender, nodeId, nonce, + lastChallenge.timestamp, block.timestamp, lastChallenge.challenge, lastChallenge.difficulty @@ -145,10 +146,11 @@ contract LilypadPow is Ownable, Initializable { } event ValidPOWSubmitted( - address indexed walletAddress, + address walletAddress, string nodeId, uint256 nonce, - uint256 timestamp, + uint256 start_timestamp, + uint256 complete_timestamp, bytes32 challenge, uint256 difficulty ); diff --git a/pkg/collectpowsubmission/collect_submission.go b/pkg/collectpowsubmission/collect_submission.go new file mode 100644 index 00000000..72c0fc93 --- /dev/null +++ b/pkg/collectpowsubmission/collect_submission.go @@ -0,0 +1,174 @@ +package collectpowsubmission + +import ( + "context" + "crypto/sha256" + "database/sql" + "encoding/hex" + + "github.com/bits-and-blooms/bloom/v3" + "github.com/ethereum/go-ethereum/common" + + "github.com/lilypad-tech/lilypad/pkg/system" + "github.com/lilypad-tech/lilypad/pkg/web3" + "github.com/lilypad-tech/lilypad/pkg/web3/bindings/pow" + "github.com/rs/zerolog/log" + "github.com/uptrace/bun" + "github.com/uptrace/bun/dialect/pgdialect" + "github.com/uptrace/bun/driver/pgdriver" +) + +type PowValidPOWSubmitted struct { + Id string `bun:"id,pk"` + Challenge string `bun:"challenge"` + WalletAddress string `bun:"wallet_address,"` + NodeId string `bun:"node_id"` + Nonce string `bun:"nonce"` + StartTimestamp int64 `bun:"start_timestamp"` + CompleteTimestamp int64 `bun:"complete_timestamp"` + Difficulty string `bun:"difficulty"` +} + +func StartCollectPowSubmission(ctx context.Context, we3Sdk *web3.Web3SDK, pgConnectionString string, cm *system.CleanupManager) error { + sqldb := sql.OpenDB(pgdriver.NewConnector(pgdriver.WithDSN(pgConnectionString))) + db := bun.NewDB(sqldb, pgdialect.New()) + + _, err := db.NewCreateTable().IfNotExists().Model((*PowValidPOWSubmitted)(nil)).Exec(ctx) + if err != nil { + return err + } + + _, err = db.NewCreateIndex().Model((*PowValidPOWSubmitted)(nil)).IfNotExists().Index("address_index").Column("wallet_address").Exec(ctx) + if err != nil { + return err + } + + log.Info().Msg("Start to fix missing pow submission event, this may take some time") + err = fixMissingPowSubmissionEvent(ctx, we3Sdk, db) + if err != nil { + return err + } + log.Info().Msg("Finish fix missing pow submission event") + + channel := web3.NewValidPOWSubmittedEventChannels() + go channel.Start(we3Sdk, ctx, cm) + + channel.SubscribePowValidPOWSubmitted(func(pvp pow.PowValidPOWSubmitted) { + id := submissionId(pvp.WalletAddress, pvp.Challenge, pvp.NodeId) + dbModel := PowValidPOWSubmitted{ + Id: id, + WalletAddress: pvp.WalletAddress.String(), + NodeId: pvp.NodeId, + Nonce: pvp.Nonce.String(), + StartTimestamp: pvp.StartTimestamp.Int64(), + CompleteTimestamp: pvp.CompleteTimestamp.Int64(), + Challenge: hex.EncodeToString(pvp.Challenge[:]), + Difficulty: pvp.Difficulty.String(), + } + + //todo 1 write log to efs? + //todo 2 need another command to check no event missing + _, err = db.NewInsert().Model(&dbModel).Ignore().Exec(ctx) + if err != nil { + log.Err(err).Msgf("Unable to insert data to database") + return + } + log.Info(). + Str("address", dbModel.WalletAddress). + Str("nodeId", dbModel.NodeId). + Str("nonce", dbModel.Nonce). + Int64("start_timestamp", dbModel.StartTimestamp). + Int64("complete_timestamp", dbModel.CompleteTimestamp). + Str("challenge", dbModel.Challenge). + Str("difficulty", dbModel.Difficulty). + Msgf("Receive a valid pow submission") + }) + + <-ctx.Done() + return nil +} + +func fixMissingPowSubmissionEvent(ctx context.Context, we3Sdk *web3.Web3SDK, db *bun.DB) error { + bf := bloom.NewWithEstimates(1000000, 0.0001) //arbitary parameter, need to update if not enough + pageSize := 100 + offset := 0 + + //collect all challenges and store the in bloomfilter + for { + var ids []string + err := db.NewSelect().Model((*PowValidPOWSubmitted)(nil)).Column("id").Offset(offset).Limit(pageSize).Scan(ctx, &ids) + if err != nil { + return err + } + for _, id := range ids { + pk, err := hex.DecodeString(id) + if err != nil { + return err + } + bf.Add(pk) + } + + if len(ids) < pageSize { + break + } + + offset += pageSize + } + + // Get submissions from sc and check them with bloomfilter and database. if missing, record it + addrs, err := we3Sdk.Contracts.Pow.GetMiners(we3Sdk.CallOpts) + if err != nil { + return err + } + for _, addr := range addrs { + submissions, err := we3Sdk.Contracts.Pow.GetMinerPosSubmissions(we3Sdk.CallOpts, addr) + if err != nil { + return err + } + for _, submission := range submissions { + id := submissionId(submission.WalletAddress, submission.Challenge, submission.NodeId) + count, err := db.NewSelect().Model((*PowValidPOWSubmitted)(nil)).Where("id = ?", id).Count(ctx) + if err != nil { + return err + } + if count == 0 { + //missing value + dbModel := PowValidPOWSubmitted{ + Id: id, + WalletAddress: submission.WalletAddress.String(), + NodeId: submission.NodeId, + Nonce: submission.Nonce.String(), + StartTimestamp: submission.StartTimestamp.Int64(), + CompleteTimestamp: submission.CompleteTimestamp.Int64(), + Challenge: hex.EncodeToString(submission.Challenge[:]), + Difficulty: submission.Difficulty.String(), + } + _, err = db.NewInsert().Model(&dbModel).Ignore().Exec(ctx) + if err != nil { + return nil + } + bf.Add(submission.Challenge[:]) + log.Info(). + Str("address", dbModel.WalletAddress). + Str("nodeId", dbModel.NodeId). + Str("nonce", dbModel.Nonce). + Int64("start_timestamp", dbModel.StartTimestamp). + Int64("complete_timestamp", dbModel.CompleteTimestamp). + Str("challenge", dbModel.Challenge). + Str("difficulty", dbModel.Difficulty). + Msgf("Fix a missing value") + } else { + log.Debug().Msg("A value missed in bloomfilter, consider to increase bloomfilter argument") + } + } + } + return nil +} + +func submissionId(addr common.Address, challenge [32]byte, nodeID string) string { + hasher := sha256.New() + hasher.Write(addr.Bytes()) + hasher.Write(challenge[:]) + hasher.Write([]byte(nodeID)) + return hex.EncodeToString(hasher.Sum(nil)) +} diff --git a/pkg/options/collect-pow-submission.go b/pkg/options/collect-pow-submission.go new file mode 100644 index 00000000..bd1ee4df --- /dev/null +++ b/pkg/options/collect-pow-submission.go @@ -0,0 +1,54 @@ +package options + +import ( + "fmt" + + "github.com/lilypad-tech/lilypad/pkg/web3" + "github.com/spf13/cobra" +) + +type CollectPowSubmissionOptions struct { + Web3 web3.Web3Options + PGConnectionString string +} + +func NewCollectPowSubmissionOptions() CollectPowSubmissionOptions { + options := CollectPowSubmissionOptions{ + Web3: GetDefaultWeb3Options(), + PGConnectionString: GetDefaultServeOptionString("PG_CONNECTION_STRING", ""), + } + return options +} + +func ProcessCollectPowSubmissionOptions(options CollectPowSubmissionOptions, network string) (CollectPowSubmissionOptions, error) { + newWeb3Options, err := ProcessWeb3Options(options.Web3, network) + if err != nil { + return options, err + } + options.Web3 = newWeb3Options + return options, CheckCollectPowSubmissionOptions(options) +} + +func CheckCollectPowSubmissionOptions(options CollectPowSubmissionOptions) error { + if options.Web3.RpcURL == "" { + return fmt.Errorf("WEB3_RPC_URL is required") + } + + if options.Web3.ControllerAddress == "" { + return fmt.Errorf("WEB3_CONTROLLER_ADDRESS is required") + } + + if options.PGConnectionString == "" { + return fmt.Errorf("PG_CONNECTION_STRING is required") + } + return nil +} + +func AddCollectPowSubmissionCliFlags(cmd *cobra.Command, options *CollectPowSubmissionOptions) { + AddWeb3CliFlags(cmd, &options.Web3) + + cmd.PersistentFlags().StringVar( + &options.PGConnectionString, "pg-connection-string", options.PGConnectionString, + `The Connection string of the PG database (PG_CONNECTION_STRING).`, + ) +} diff --git a/pkg/resourceprovider/resourceprovider.go b/pkg/resourceprovider/resourceprovider.go index d854201e..208e1832 100644 --- a/pkg/resourceprovider/resourceprovider.go +++ b/pkg/resourceprovider/resourceprovider.go @@ -106,7 +106,7 @@ func (resourceProvider *ResourceProvider) StartMineLoop(ctx context.Context) err log.Info().Msgf("Wallet %s node id %s is ready for mine", walletAddress, nodeId) taskCh := make(chan Task) - resourceProvider.controller.web3Events.Pow.SubscribenewPowRound(func(newPowRound pow.PowNewPowRound) { + resourceProvider.controller.web3Events.Pow.SubscribeNewPowRound(func(newPowRound pow.PowNewPowRound) { _, challenge, err := resourceProvider.web3SDK.GetGenerateChallenge(ctx, nodeId) if err != nil { log.Err(err).Msgf("Unable to fetch challenge") diff --git a/pkg/web3/api.go b/pkg/web3/api.go index 5db8604c..6a949134 100644 --- a/pkg/web3/api.go +++ b/pkg/web3/api.go @@ -298,45 +298,19 @@ func (sdk *Web3SDK) SubmitWork( return tx.Hash(), validPosSubmission, nil } -type PowValidPOWSubmission struct { - WalletAddress common.Address - NodeId string - Nonce *big.Int - StartTimestap *big.Int - CompleteTimestap *big.Int - Challenge [32]byte - Difficulty *big.Int -} - -func (sdk *Web3SDK) GetPowSubmission(ctx context.Context) (map[common.Address][]PowValidPOWSubmission, error) { +func (sdk *Web3SDK) GetPowSubmission(ctx context.Context) (map[common.Address][]pow.LilypadPowPOWSubmission, error) { miners, err := sdk.Contracts.Pow.GetMiners(sdk.CallOpts) if err != nil { return nil, err } - results := make(map[common.Address][]PowValidPOWSubmission) + results := make(map[common.Address][]pow.LilypadPowPOWSubmission) for _, minerAddr := range miners { - validProofCount, err := sdk.Contracts.Pow.MinerSubmissionCount(sdk.CallOpts, minerAddr) + powSubmissions, err := sdk.Contracts.Pow.GetMinerPosSubmissions(sdk.CallOpts, minerAddr) if err != nil { return nil, err } - var powSubmissions []PowValidPOWSubmission - for i := uint64(0); i < validProofCount.Uint64(); i++ { //enough large - submission, err := sdk.Contracts.Pow.PowSubmissions(sdk.CallOpts, minerAddr, new(big.Int).SetUint64(i)) - if err != nil { - return nil, err - } - powSubmissions = append(powSubmissions, PowValidPOWSubmission{ - WalletAddress: submission.WalletAddress, - NodeId: submission.NodeId, - Nonce: submission.Nonce, - StartTimestap: submission.StartTimestap, - CompleteTimestap: submission.CompleteTimestap, - Challenge: submission.Challenge, - Difficulty: submission.Difficulty, - }) - } results[minerAddr] = powSubmissions } return results, nil diff --git a/pkg/web3/bindings/pow/pow.go b/pkg/web3/bindings/pow/pow.go index 443ad428..a6b38265 100644 --- a/pkg/web3/bindings/pow/pow.go +++ b/pkg/web3/bindings/pow/pow.go @@ -29,10 +29,21 @@ var ( _ = abi.ConvertType ) +// LilypadPowPOWSubmission is an auto generated low-level Go binding around an user-defined struct. +type LilypadPowPOWSubmission struct { + WalletAddress common.Address + NodeId string + Nonce *big.Int + StartTimestamp *big.Int + CompleteTimestamp *big.Int + Challenge [32]byte + Difficulty *big.Int +} + // PowMetaData contains all meta data concerning the Pow contract. var PowMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"challenge\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"}],\"name\":\"GenerateChallenge\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"NewPowRound\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"walletAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"nodeId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"challenge\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"}],\"name\":\"ValidPOWSubmitted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"calculate_difficulty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"}],\"name\":\"change_difficulty\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"checkTimeWindow\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"nodeId\",\"type\":\"string\"}],\"name\":\"generateChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMiners\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastChallenges\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"challenge\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"nodeId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"minerSubmissionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"miners\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"powSubmissions\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"walletAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"nodeId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"start_timestap\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"complete_timestap\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"challenge\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"nodeId\",\"type\":\"string\"}],\"name\":\"submitWork\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"targetDifficulty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerNewPowRound\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"validProofs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"window_end\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"window_start\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60806040527c149a6a3000000000000000000000000000000000000000000000000000600155348015610030575f80fd5b5061004d61004261005260201b60201c565b61005960201b60201c565b61011a565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611ffb806101275f395ff3fe608060405234801561000f575f80fd5b506004361061012a575f3560e01c80638da5cb5b116100ab578063b681f2fd1161006f578063b681f2fd14610303578063bfb660de1461030d578063da8accf914610317578063e0d152af14610333578063f2fde38b146103635761012a565b80638da5cb5b14610271578063a738bf8f1461028f578063ab098945146102ad578063adf0047c146102c9578063b28d87ea146102e55761012a565b80636189f3ac116100f25780636189f3ac146101ee578063715018a61461022157806378e979251461022b5780638129fc1c146102495780638b2db16e146102535761012a565b8063148c684a1461012e5780631633da6e1461015e5780632d68c3971461017c578063331bade11461019a5780634bbe05e4146101b8575b5f80fd5b610148600480360381019061014391906111b9565b61037f565b60405161015591906111fc565b60405180910390f35b610166610394565b60405161017391906112cc565b60405180910390f35b61018461041f565b60405161019191906111fc565b60405180910390f35b6101a261045c565b6040516101af91906111fc565b60405180910390f35b6101d260048036038101906101cd9190611316565b610462565b6040516101e59796959493929190611405565b60405180910390f35b610208600480360381019061020391906111b9565b61055f565b6040516102189493929190611479565b60405180910390f35b610229610611565b005b610233610624565b60405161024091906111fc565b60405180910390f35b61025161062a565b005b61025b61075f565b60405161026891906111fc565b60405180910390f35b610279610765565b60405161028691906114c3565b60405180910390f35b61029761078c565b6040516102a491906111fc565b60405180910390f35b6102c760048036038101906102c2919061153d565b610792565b005b6102e360048036038101906102de9190611588565b6108ee565b005b6102ed610900565b6040516102fa91906111fc565b60405180910390f35b61030b610906565b005b610315610956565b005b610331600480360381019061032c91906115b3565b61099c565b005b61034d60048036038101906103489190611588565b610f32565b60405161035a91906114c3565b60405180910390f35b61037d600480360381019061037891906111b9565b610f6d565b005b6003602052805f5260405f205f915090505481565b6060600480548060200260200160405190810160405280929190818152602001828054801561041557602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116103cc575b5050505050905090565b5f8060154461042e919061163d565b605a61043a919061169a565b905060648160015461044c91906116cd565b610456919061170e565b91505090565b60085481565b6002602052815f5260405f20818154811061047b575f80fd5b905f5260205f2090600702015f9150915050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010180546104c09061176b565b80601f01602080910402602001604051908101604052809291908181526020018280546104ec9061176b565b80156105375780601f1061050e57610100808354040283529160200191610537565b820191905f5260205f20905b81548152906001019060200180831161051a57829003601f168201915b5050505050908060020154908060030154908060040154908060050154908060060154905087565b6005602052805f5260405f205f91509050805f01549080600101549080600201805461058a9061176b565b80601f01602080910402602001604051908101604052809291908181526020018280546105b69061176b565b80156106015780601f106105d857610100808354040283529160200191610601565b820191905f5260205f20905b8154815290600101906020018083116105e457829003601f168201915b5050505050908060030154905084565b610619610fef565b6106225f61106d565b565b60075481565b5f8060159054906101000a900460ff1615905080801561065b575060015f60149054906101000a900460ff1660ff16105b80610689575061066a3061112e565b158015610688575060015f60149054906101000a900460ff1660ff16145b5b6106c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106bf9061180b565b60405180910390fd5b60015f60146101000a81548160ff021916908360ff16021790555080156107045760015f60156101000a81548160ff0219169083151502179055505b801561075c575f8060156101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516107539190611877565b60405180910390a15b50565b60015481565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60095481565b61079a610956565b5f426008543385856040516020016107b6959493929190611931565b6040516020818303038152906040528051906020012090505f6107d761041f565b9050604051806080016040528083815260200182815260200185858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081526020014281525060055f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f01556020820151816001015560408201518160020190816108a19190611b3d565b50606082015181600301559050507f496186a9d930bac0744acdcd1d0c054b18283eecbe99d30bda98102d3d06b8ef82826040516108e0929190611c0c565b60405180910390a150505050565b6108f6610fef565b8060018190555050565b60065481565b61090e610fef565b43600881905550601e43610922919061169a565b6009819055507f10cc99616aca050d810fd487c95f968e516d0fa25318530ed50753153d060a1e60405160405180910390a1565b600954431061099a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099190611c7d565b60405180910390fd5b565b6109a4610956565b5f60055f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206040518060800160405290815f820154815260200160018201548152602001600282018054610a109061176b565b80601f0160208091040260200160405190810160405280929190818152602001828054610a3c9061176b565b8015610a875780601f10610a5e57610100808354040283529160200191610a87565b820191905f5260205f20905b815481529060010190602001808311610a6a57829003601f168201915b5050505050815260200160038201548152505090505f8160600151600854338686604051602001610abc959493929190611931565b60405160208183030381529060405280519060200120905080825f015114610b19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1090611d0b565b60405180910390fd5b5f8186604051602001610b2d929190611d49565b6040516020818303038152906040528051906020012090508260200151815f1c10610b8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8490611de4565b60405180910390fd5b60065f815480929190610b9f90611e02565b91905055505f60035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205403610c4957600433908060018154018082558091505060019003905f5260205f20015f9091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b60035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190610c9690611e02565b91905055505f60025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f209050806040518060e001604052803373ffffffffffffffffffffffffffffffffffffffff16815260200188888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050815260200189815260200186606001518152602001428152602001865f015181526020018660200151815250908060018154018082558091505060019003905f5260205f2090600702015f909190919091505f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001019081610df29190611b3d565b5060408201518160020155606082015181600301556080820151816004015560a0820151816005015560c08201518160060155505060405180608001604052805f801b81526020015f815260200160405180602001604052805f81525081526020015f81525060055f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f0155602082015181600101556040820151816002019081610ebc9190611b3d565b50606082015181600301559050503373ffffffffffffffffffffffffffffffffffffffff167f5ea61d67e3236a79ab8c3c29f810e2c408b0a6b1e19f4e0da2fcd6362129c86087878a42895f01518a60200151604051610f2196959493929190611e75565b60405180910390a250505050505050565b60048181548110610f41575f80fd5b905f5260205f20015f915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610f75610fef565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610fe3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fda90611f3f565b60405180910390fd5b610fec8161106d565b50565b610ff7611150565b73ffffffffffffffffffffffffffffffffffffffff16611015610765565b73ffffffffffffffffffffffffffffffffffffffff161461106b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106290611fa7565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f33905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6111888261115f565b9050919050565b6111988161117e565b81146111a2575f80fd5b50565b5f813590506111b38161118f565b92915050565b5f602082840312156111ce576111cd611157565b5b5f6111db848285016111a5565b91505092915050565b5f819050919050565b6111f6816111e4565b82525050565b5f60208201905061120f5f8301846111ed565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6112478161117e565b82525050565b5f611258838361123e565b60208301905092915050565b5f602082019050919050565b5f61127a82611215565b611284818561121f565b935061128f8361122f565b805f5b838110156112bf5781516112a6888261124d565b97506112b183611264565b925050600181019050611292565b5085935050505092915050565b5f6020820190508181035f8301526112e48184611270565b905092915050565b6112f5816111e4565b81146112ff575f80fd5b50565b5f81359050611310816112ec565b92915050565b5f806040838503121561132c5761132b611157565b5b5f611339858286016111a5565b925050602061134a85828601611302565b9150509250929050565b61135d8161117e565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561139a57808201518184015260208101905061137f565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6113bf82611363565b6113c9818561136d565b93506113d981856020860161137d565b6113e2816113a5565b840191505092915050565b5f819050919050565b6113ff816113ed565b82525050565b5f60e0820190506114185f83018a611354565b818103602083015261142a81896113b5565b905061143960408301886111ed565b61144660608301876111ed565b61145360808301866111ed565b61146060a08301856113f6565b61146d60c08301846111ed565b98975050505050505050565b5f60808201905061148c5f8301876113f6565b61149960208301866111ed565b81810360408301526114ab81856113b5565b90506114ba60608301846111ed565b95945050505050565b5f6020820190506114d65f830184611354565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126114fd576114fc6114dc565b5b8235905067ffffffffffffffff81111561151a576115196114e0565b5b602083019150836001820283011115611536576115356114e4565b5b9250929050565b5f806020838503121561155357611552611157565b5b5f83013567ffffffffffffffff8111156115705761156f61115b565b5b61157c858286016114e8565b92509250509250929050565b5f6020828403121561159d5761159c611157565b5b5f6115aa84828501611302565b91505092915050565b5f805f604084860312156115ca576115c9611157565b5b5f6115d786828701611302565b935050602084013567ffffffffffffffff8111156115f8576115f761115b565b5b611604868287016114e8565b92509250509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f611647826111e4565b9150611652836111e4565b92508261166257611661611610565b5b828206905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6116a4826111e4565b91506116af836111e4565b92508282019050808211156116c7576116c661166d565b5b92915050565b5f6116d7826111e4565b91506116e2836111e4565b92508282026116f0816111e4565b915082820484148315176117075761170661166d565b5b5092915050565b5f611718826111e4565b9150611723836111e4565b92508261173357611732611610565b5b828204905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061178257607f821691505b6020821081036117955761179461173e565b5b50919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f6117f5602e8361136d565b91506118008261179b565b604082019050919050565b5f6020820190508181035f830152611822816117e9565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f61186161185c61185784611829565b61183e565b611832565b9050919050565b61187181611847565b82525050565b5f60208201905061188a5f830184611868565b92915050565b5f819050919050565b6118aa6118a5826111e4565b611890565b82525050565b5f8160601b9050919050565b5f6118c6826118b0565b9050919050565b5f6118d7826118bc565b9050919050565b6118ef6118ea8261117e565b6118cd565b82525050565b5f81905092915050565b828183375f83830152505050565b5f61191883856118f5565b93506119258385846118ff565b82840190509392505050565b5f61193c8288611899565b60208201915061194c8287611899565b60208201915061195c82866118de565b60148201915061196d82848661190d565b91508190509695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302611a057fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826119ca565b611a0f86836119ca565b95508019841693508086168417925050509392505050565b5f611a41611a3c611a37846111e4565b61183e565b6111e4565b9050919050565b5f819050919050565b611a5a83611a27565b611a6e611a6682611a48565b8484546119d6565b825550505050565b5f90565b611a82611a76565b611a8d818484611a51565b505050565b5b81811015611ab057611aa55f82611a7a565b600181019050611a93565b5050565b601f821115611af557611ac6816119a9565b611acf846119bb565b81016020851015611ade578190505b611af2611aea856119bb565b830182611a92565b50505b505050565b5f82821c905092915050565b5f611b155f1984600802611afa565b1980831691505092915050565b5f611b2d8383611b06565b9150826002028217905092915050565b611b4682611363565b67ffffffffffffffff811115611b5f57611b5e61197c565b5b611b69825461176b565b611b74828285611ab4565b5f60209050601f831160018114611ba5575f8415611b93578287015190505b611b9d8582611b22565b865550611c04565b601f198416611bb3866119a9565b5f5b82811015611bda57848901518255600182019150602085019450602081019050611bb5565b86831015611bf75784890151611bf3601f891682611b06565b8355505b6001600288020188555050505b505050505050565b5f604082019050611c1f5f8301856113f6565b611c2c60208301846111ed565b9392505050565b7f70726f6f662077696e646f77732068617320636c6f73656400000000000000005f82015250565b5f611c6760188361136d565b9150611c7282611c33565b602082019050919050565b5f6020820190508181035f830152611c9481611c5b565b9050919050565b7f576f726b207375626d6974206e6f7420636f6d70617461626c652077697468205f8201527f6368616c6c656e67650000000000000000000000000000000000000000000000602082015250565b5f611cf560298361136d565b9150611d0082611c9b565b604082019050919050565b5f6020820190508181035f830152611d2281611ce9565b9050919050565b5f819050919050565b611d43611d3e826113ed565b611d29565b82525050565b5f611d548285611d32565b602082019150611d648284611899565b6020820191508190509392505050565b7f576f726b20646f6573206e6f74206d65657420646966666963756c74792074615f8201527f7267657400000000000000000000000000000000000000000000000000000000602082015250565b5f611dce60248361136d565b9150611dd982611d74565b604082019050919050565b5f6020820190508181035f830152611dfb81611dc2565b9050919050565b5f611e0c826111e4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611e3e57611e3d61166d565b5b600182019050919050565b5f611e54838561136d565b9350611e618385846118ff565b611e6a836113a5565b840190509392505050565b5f60a0820190508181035f830152611e8e81888a611e49565b9050611e9d60208301876111ed565b611eaa60408301866111ed565b611eb760608301856113f6565b611ec460808301846111ed565b979650505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f611f2960268361136d565b9150611f3482611ecf565b604082019050919050565b5f6020820190508181035f830152611f5681611f1d565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f611f9160208361136d565b9150611f9c82611f5d565b602082019050919050565b5f6020820190508181035f830152611fbe81611f85565b905091905056fea2646970667358221220002b1ebdb585e17e08f0977dc32ad64b9a814d8558b7e275e5695116e236ec0c64736f6c63430008150033", + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"challenge\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"}],\"name\":\"GenerateChallenge\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"NewPowRound\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"walletAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"nodeId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"start_timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"complete_timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"challenge\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"}],\"name\":\"ValidPOWSubmitted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"calculate_difficulty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"}],\"name\":\"change_difficulty\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"checkTimeWindow\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"nodeId\",\"type\":\"string\"}],\"name\":\"generateChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getMinerPosSubmissions\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"walletAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"nodeId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"start_timestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"complete_timestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"challenge\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"}],\"internalType\":\"structLilypadPow.POWSubmission[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMiners\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastChallenges\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"challenge\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"nodeId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"miners\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"powSubmissions\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"walletAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"nodeId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"start_timestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"complete_timestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"challenge\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"nodeId\",\"type\":\"string\"}],\"name\":\"submitWork\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"targetDifficulty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerNewPowRound\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"validProofs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"window_end\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"window_start\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x60806040527c149a6a3000000000000000000000000000000000000000000000000000600155348015610030575f80fd5b5061004d61004261005260201b60201c565b61005960201b60201c565b61011a565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6122f180620001285f395ff3fe608060405234801561000f575f80fd5b506004361061012a575f3560e01c80638da5cb5b116100ab578063b681f2fd1161006f578063b681f2fd14610303578063bfb660de1461030d578063da8accf914610317578063e0d152af14610333578063f2fde38b146103635761012a565b80638da5cb5b14610271578063a738bf8f1461028f578063ab098945146102ad578063adf0047c146102c9578063b28d87ea146102e55761012a565b80636189f3ac116100f25780636189f3ac146101ee578063715018a61461022157806378e979251461022b5780638129fc1c146102495780638b2db16e146102535761012a565b80631633da6e1461012e5780632d68c3971461014c578063331bade11461016a5780634bbe05e41461018857806354bfd759146101be575b5f80fd5b61013661037f565b604051610143919061133e565b60405180910390f35b61015461040a565b6040516101619190611376565b60405180910390f35b610172610447565b60405161017f9190611376565b60405180910390f35b6101a2600480360381019061019d91906113eb565b61044d565b6040516101b597969594939291906114da565b60405180910390f35b6101d860048036038101906101d3919061154e565b61054a565b6040516101e59190611733565b60405180910390f35b6102086004803603810190610203919061154e565b6106f9565b6040516102189493929190611753565b60405180910390f35b6102296107ab565b005b6102336107be565b6040516102409190611376565b60405180910390f35b6102516107c4565b005b61025b6108f9565b6040516102689190611376565b60405180910390f35b6102796108ff565b604051610286919061179d565b60405180910390f35b610297610926565b6040516102a49190611376565b60405180910390f35b6102c760048036038101906102c29190611817565b61092c565b005b6102e360048036038101906102de9190611862565b610a88565b005b6102ed610a9a565b6040516102fa9190611376565b60405180910390f35b61030b610aa0565b005b610315610af0565b005b610331600480360381019061032c919061188d565b610b36565b005b61034d60048036038101906103489190611862565b611032565b60405161035a919061179d565b60405180910390f35b61037d6004803603810190610378919061154e565b61106d565b005b6060600380548060200260200160405190810160405280929190818152602001828054801561040057602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116103b7575b5050505050905090565b5f806015446104199190611917565b605a6104259190611974565b905060648160015461043791906119a7565b61044191906119e8565b91505090565b60075481565b6002602052815f5260405f208181548110610466575f80fd5b905f5260205f2090600702015f9150915050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010180546104ab90611a45565b80601f01602080910402602001604051908101604052809291908181526020018280546104d790611a45565b80156105225780601f106104f957610100808354040283529160200191610522565b820191905f5260205f20905b81548152906001019060200180831161050557829003601f168201915b5050505050908060020154908060030154908060040154908060050154908060060154905087565b606060025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20805480602002602001604051908101604052809291908181526020015f905b828210156106ee578382905f5260205f2090600702016040518060e00160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201805461062d90611a45565b80601f016020809104026020016040519081016040528092919081815260200182805461065990611a45565b80156106a45780601f1061067b576101008083540402835291602001916106a4565b820191905f5260205f20905b81548152906001019060200180831161068757829003601f168201915b5050505050815260200160028201548152602001600382015481526020016004820154815260200160058201548152602001600682015481525050815260200190600101906105a8565b505050509050919050565b6004602052805f5260405f205f91509050805f01549080600101549080600201805461072490611a45565b80601f016020809104026020016040519081016040528092919081815260200182805461075090611a45565b801561079b5780601f106107725761010080835404028352916020019161079b565b820191905f5260205f20905b81548152906001019060200180831161077e57829003601f168201915b5050505050908060030154905084565b6107b36110ef565b6107bc5f61116d565b565b60065481565b5f8060159054906101000a900460ff161590508080156107f5575060015f60149054906101000a900460ff1660ff16105b8061082357506108043061122e565b158015610822575060015f60149054906101000a900460ff1660ff16145b5b610862576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085990611ae5565b60405180910390fd5b60015f60146101000a81548160ff021916908360ff160217905550801561089e5760015f60156101000a81548160ff0219169083151502179055505b80156108f6575f8060156101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516108ed9190611b51565b60405180910390a15b50565b60015481565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60085481565b610934610af0565b5f42600754338585604051602001610950959493929190611c0b565b6040516020818303038152906040528051906020012090505f61097161040a565b9050604051806080016040528083815260200182815260200185858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081526020014281525060045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f0155602082015181600101556040820151816002019081610a3b9190611e17565b50606082015181600301559050507f496186a9d930bac0744acdcd1d0c054b18283eecbe99d30bda98102d3d06b8ef8282604051610a7a929190611ee6565b60405180910390a150505050565b610a906110ef565b8060018190555050565b60055481565b610aa86110ef565b43600781905550601e43610abc9190611974565b6008819055507f10cc99616aca050d810fd487c95f968e516d0fa25318530ed50753153d060a1e60405160405180910390a1565b6008544310610b34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b2b90611f57565b60405180910390fd5b565b610b3e610af0565b5f60045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206040518060800160405290815f820154815260200160018201548152602001600282018054610baa90611a45565b80601f0160208091040260200160405190810160405280929190818152602001828054610bd690611a45565b8015610c215780601f10610bf857610100808354040283529160200191610c21565b820191905f5260205f20905b815481529060010190602001808311610c0457829003601f168201915b5050505050815260200160038201548152505090505f8160600151600754338686604051602001610c56959493929190611c0b565b60405160208183030381529060405280519060200120905080825f015114610cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610caa90611fe5565b60405180910390fd5b5f8186604051602001610cc7929190612023565b6040516020818303038152906040528051906020012090508260200151815f1c10610d27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1e906120be565b60405180910390fd5b60055f815480929190610d39906120dc565b91905055505f60025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f818054905003610dea57600333908060018154018082558091505060019003905f5260205f20015f9091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b806040518060e001604052803373ffffffffffffffffffffffffffffffffffffffff16815260200188888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050815260200189815260200186606001518152602001428152602001865f015181526020018660200151815250908060018154018082558091505060019003905f5260205f2090600702015f909190919091505f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001019081610f019190611e17565b5060408201518160020155606082015181600301556080820151816004015560a0820151816005015560c08201518160060155505060405180608001604052805f801b81526020015f815260200160405180602001604052805f81525081526020015f81525060045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f0155602082015181600101556040820151816002019081610fcb9190611e17565b50606082015181600301559050507f172b7d59e60446d8dfc98985344fb883c871ef150b1db4d1592bcb67699037323387878a8860600151428a5f01518b6020015160405161102198979695949392919061214f565b60405180910390a150505050505050565b60038181548110611041575f80fd5b905f5260205f20015f915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6110756110ef565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036110e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110da90612235565b60405180910390fd5b6110ec8161116d565b50565b6110f7611250565b73ffffffffffffffffffffffffffffffffffffffff166111156108ff565b73ffffffffffffffffffffffffffffffffffffffff161461116b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111629061229d565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f33905090565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6112a982611280565b9050919050565b6112b98161129f565b82525050565b5f6112ca83836112b0565b60208301905092915050565b5f602082019050919050565b5f6112ec82611257565b6112f68185611261565b935061130183611271565b805f5b8381101561133157815161131888826112bf565b9750611323836112d6565b925050600181019050611304565b5085935050505092915050565b5f6020820190508181035f83015261135681846112e2565b905092915050565b5f819050919050565b6113708161135e565b82525050565b5f6020820190506113895f830184611367565b92915050565b5f80fd5b5f80fd5b6113a08161129f565b81146113aa575f80fd5b50565b5f813590506113bb81611397565b92915050565b6113ca8161135e565b81146113d4575f80fd5b50565b5f813590506113e5816113c1565b92915050565b5f80604083850312156114015761140061138f565b5b5f61140e858286016113ad565b925050602061141f858286016113d7565b9150509250929050565b6114328161129f565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561146f578082015181840152602081019050611454565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61149482611438565b61149e8185611442565b93506114ae818560208601611452565b6114b78161147a565b840191505092915050565b5f819050919050565b6114d4816114c2565b82525050565b5f60e0820190506114ed5f83018a611429565b81810360208301526114ff818961148a565b905061150e6040830188611367565b61151b6060830187611367565b6115286080830186611367565b61153560a08301856114cb565b61154260c0830184611367565b98975050505050505050565b5f602082840312156115635761156261138f565b5b5f611570848285016113ad565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f82825260208201905092915050565b5f6115bc82611438565b6115c681856115a2565b93506115d6818560208601611452565b6115df8161147a565b840191505092915050565b6115f38161135e565b82525050565b611602816114c2565b82525050565b5f60e083015f83015161161d5f8601826112b0565b506020830151848203602086015261163582826115b2565b915050604083015161164a60408601826115ea565b50606083015161165d60608601826115ea565b50608083015161167060808601826115ea565b5060a083015161168360a08601826115f9565b5060c083015161169660c08601826115ea565b508091505092915050565b5f6116ac8383611608565b905092915050565b5f602082019050919050565b5f6116ca82611579565b6116d48185611583565b9350836020820285016116e685611593565b805f5b85811015611721578484038952815161170285826116a1565b945061170d836116b4565b925060208a019950506001810190506116e9565b50829750879550505050505092915050565b5f6020820190508181035f83015261174b81846116c0565b905092915050565b5f6080820190506117665f8301876114cb565b6117736020830186611367565b8181036040830152611785818561148a565b90506117946060830184611367565b95945050505050565b5f6020820190506117b05f830184611429565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126117d7576117d66117b6565b5b8235905067ffffffffffffffff8111156117f4576117f36117ba565b5b6020830191508360018202830111156118105761180f6117be565b5b9250929050565b5f806020838503121561182d5761182c61138f565b5b5f83013567ffffffffffffffff81111561184a57611849611393565b5b611856858286016117c2565b92509250509250929050565b5f602082840312156118775761187661138f565b5b5f611884848285016113d7565b91505092915050565b5f805f604084860312156118a4576118a361138f565b5b5f6118b1868287016113d7565b935050602084013567ffffffffffffffff8111156118d2576118d1611393565b5b6118de868287016117c2565b92509250509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6119218261135e565b915061192c8361135e565b92508261193c5761193b6118ea565b5b828206905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61197e8261135e565b91506119898361135e565b92508282019050808211156119a1576119a0611947565b5b92915050565b5f6119b18261135e565b91506119bc8361135e565b92508282026119ca8161135e565b915082820484148315176119e1576119e0611947565b5b5092915050565b5f6119f28261135e565b91506119fd8361135e565b925082611a0d57611a0c6118ea565b5b828204905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611a5c57607f821691505b602082108103611a6f57611a6e611a18565b5b50919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f611acf602e83611442565b9150611ada82611a75565b604082019050919050565b5f6020820190508181035f830152611afc81611ac3565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f611b3b611b36611b3184611b03565b611b18565b611b0c565b9050919050565b611b4b81611b21565b82525050565b5f602082019050611b645f830184611b42565b92915050565b5f819050919050565b611b84611b7f8261135e565b611b6a565b82525050565b5f8160601b9050919050565b5f611ba082611b8a565b9050919050565b5f611bb182611b96565b9050919050565b611bc9611bc48261129f565b611ba7565b82525050565b5f81905092915050565b828183375f83830152505050565b5f611bf28385611bcf565b9350611bff838584611bd9565b82840190509392505050565b5f611c168288611b73565b602082019150611c268287611b73565b602082019150611c368286611bb8565b601482019150611c47828486611be7565b91508190509695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302611cdf7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611ca4565b611ce98683611ca4565b95508019841693508086168417925050509392505050565b5f611d1b611d16611d118461135e565b611b18565b61135e565b9050919050565b5f819050919050565b611d3483611d01565b611d48611d4082611d22565b848454611cb0565b825550505050565b5f90565b611d5c611d50565b611d67818484611d2b565b505050565b5b81811015611d8a57611d7f5f82611d54565b600181019050611d6d565b5050565b601f821115611dcf57611da081611c83565b611da984611c95565b81016020851015611db8578190505b611dcc611dc485611c95565b830182611d6c565b50505b505050565b5f82821c905092915050565b5f611def5f1984600802611dd4565b1980831691505092915050565b5f611e078383611de0565b9150826002028217905092915050565b611e2082611438565b67ffffffffffffffff811115611e3957611e38611c56565b5b611e438254611a45565b611e4e828285611d8e565b5f60209050601f831160018114611e7f575f8415611e6d578287015190505b611e778582611dfc565b865550611ede565b601f198416611e8d86611c83565b5f5b82811015611eb457848901518255600182019150602085019450602081019050611e8f565b86831015611ed15784890151611ecd601f891682611de0565b8355505b6001600288020188555050505b505050505050565b5f604082019050611ef95f8301856114cb565b611f066020830184611367565b9392505050565b7f70726f6f662077696e646f77732068617320636c6f73656400000000000000005f82015250565b5f611f41601883611442565b9150611f4c82611f0d565b602082019050919050565b5f6020820190508181035f830152611f6e81611f35565b9050919050565b7f576f726b207375626d6974206e6f7420636f6d70617461626c652077697468205f8201527f6368616c6c656e67650000000000000000000000000000000000000000000000602082015250565b5f611fcf602983611442565b9150611fda82611f75565b604082019050919050565b5f6020820190508181035f830152611ffc81611fc3565b9050919050565b5f819050919050565b61201d612018826114c2565b612003565b82525050565b5f61202e828561200c565b60208201915061203e8284611b73565b6020820191508190509392505050565b7f576f726b20646f6573206e6f74206d65657420646966666963756c74792074615f8201527f7267657400000000000000000000000000000000000000000000000000000000602082015250565b5f6120a8602483611442565b91506120b38261204e565b604082019050919050565b5f6020820190508181035f8301526120d58161209c565b9050919050565b5f6120e68261135e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361211857612117611947565b5b600182019050919050565b5f61212e8385611442565b935061213b838584611bd9565b6121448361147a565b840190509392505050565b5f60e0820190506121625f83018b611429565b818103602083015261217581898b612123565b90506121846040830188611367565b6121916060830187611367565b61219e6080830186611367565b6121ab60a08301856114cb565b6121b860c0830184611367565b9998505050505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f61221f602683611442565b915061222a826121c5565b604082019050919050565b5f6020820190508181035f83015261224c81612213565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f612287602083611442565b915061229282612253565b602082019050919050565b5f6020820190508181035f8301526122b48161227b565b905091905056fea264697066735822122003f42952e39ee809fb08957cf0ec2baff53778141c1fdaddeca0a8b027100c5864736f6c63430008150033", } // PowABI is the input ABI used to generate the binding from. @@ -262,6 +273,37 @@ func (_Pow *PowCallerSession) CheckTimeWindow() error { return _Pow.Contract.CheckTimeWindow(&_Pow.CallOpts) } +// GetMinerPosSubmissions is a free data retrieval call binding the contract method 0x54bfd759. +// +// Solidity: function getMinerPosSubmissions(address addr) view returns((address,string,uint256,uint256,uint256,bytes32,uint256)[]) +func (_Pow *PowCaller) GetMinerPosSubmissions(opts *bind.CallOpts, addr common.Address) ([]LilypadPowPOWSubmission, error) { + var out []interface{} + err := _Pow.contract.Call(opts, &out, "getMinerPosSubmissions", addr) + + if err != nil { + return *new([]LilypadPowPOWSubmission), err + } + + out0 := *abi.ConvertType(out[0], new([]LilypadPowPOWSubmission)).(*[]LilypadPowPOWSubmission) + + return out0, err + +} + +// GetMinerPosSubmissions is a free data retrieval call binding the contract method 0x54bfd759. +// +// Solidity: function getMinerPosSubmissions(address addr) view returns((address,string,uint256,uint256,uint256,bytes32,uint256)[]) +func (_Pow *PowSession) GetMinerPosSubmissions(addr common.Address) ([]LilypadPowPOWSubmission, error) { + return _Pow.Contract.GetMinerPosSubmissions(&_Pow.CallOpts, addr) +} + +// GetMinerPosSubmissions is a free data retrieval call binding the contract method 0x54bfd759. +// +// Solidity: function getMinerPosSubmissions(address addr) view returns((address,string,uint256,uint256,uint256,bytes32,uint256)[]) +func (_Pow *PowCallerSession) GetMinerPosSubmissions(addr common.Address) ([]LilypadPowPOWSubmission, error) { + return _Pow.Contract.GetMinerPosSubmissions(&_Pow.CallOpts, addr) +} + // GetMiners is a free data retrieval call binding the contract method 0x1633da6e. // // Solidity: function getMiners() view returns(address[]) @@ -348,37 +390,6 @@ func (_Pow *PowCallerSession) LastChallenges(arg0 common.Address) (struct { return _Pow.Contract.LastChallenges(&_Pow.CallOpts, arg0) } -// MinerSubmissionCount is a free data retrieval call binding the contract method 0x148c684a. -// -// Solidity: function minerSubmissionCount(address ) view returns(uint256) -func (_Pow *PowCaller) MinerSubmissionCount(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { - var out []interface{} - err := _Pow.contract.Call(opts, &out, "minerSubmissionCount", arg0) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// MinerSubmissionCount is a free data retrieval call binding the contract method 0x148c684a. -// -// Solidity: function minerSubmissionCount(address ) view returns(uint256) -func (_Pow *PowSession) MinerSubmissionCount(arg0 common.Address) (*big.Int, error) { - return _Pow.Contract.MinerSubmissionCount(&_Pow.CallOpts, arg0) -} - -// MinerSubmissionCount is a free data retrieval call binding the contract method 0x148c684a. -// -// Solidity: function minerSubmissionCount(address ) view returns(uint256) -func (_Pow *PowCallerSession) MinerSubmissionCount(arg0 common.Address) (*big.Int, error) { - return _Pow.Contract.MinerSubmissionCount(&_Pow.CallOpts, arg0) -} - // Miners is a free data retrieval call binding the contract method 0xe0d152af. // // Solidity: function miners(uint256 ) view returns(address) @@ -443,27 +454,27 @@ func (_Pow *PowCallerSession) Owner() (common.Address, error) { // PowSubmissions is a free data retrieval call binding the contract method 0x4bbe05e4. // -// Solidity: function powSubmissions(address , uint256 ) view returns(address walletAddress, string nodeId, uint256 nonce, uint256 start_timestap, uint256 complete_timestap, bytes32 challenge, uint256 difficulty) +// Solidity: function powSubmissions(address , uint256 ) view returns(address walletAddress, string nodeId, uint256 nonce, uint256 start_timestamp, uint256 complete_timestamp, bytes32 challenge, uint256 difficulty) func (_Pow *PowCaller) PowSubmissions(opts *bind.CallOpts, arg0 common.Address, arg1 *big.Int) (struct { - WalletAddress common.Address - NodeId string - Nonce *big.Int - StartTimestap *big.Int - CompleteTimestap *big.Int - Challenge [32]byte - Difficulty *big.Int + WalletAddress common.Address + NodeId string + Nonce *big.Int + StartTimestamp *big.Int + CompleteTimestamp *big.Int + Challenge [32]byte + Difficulty *big.Int }, error) { var out []interface{} err := _Pow.contract.Call(opts, &out, "powSubmissions", arg0, arg1) outstruct := new(struct { - WalletAddress common.Address - NodeId string - Nonce *big.Int - StartTimestap *big.Int - CompleteTimestap *big.Int - Challenge [32]byte - Difficulty *big.Int + WalletAddress common.Address + NodeId string + Nonce *big.Int + StartTimestamp *big.Int + CompleteTimestamp *big.Int + Challenge [32]byte + Difficulty *big.Int }) if err != nil { return *outstruct, err @@ -472,8 +483,8 @@ func (_Pow *PowCaller) PowSubmissions(opts *bind.CallOpts, arg0 common.Address, outstruct.WalletAddress = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) outstruct.NodeId = *abi.ConvertType(out[1], new(string)).(*string) outstruct.Nonce = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) - outstruct.StartTimestap = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) - outstruct.CompleteTimestap = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) + outstruct.StartTimestamp = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.CompleteTimestamp = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) outstruct.Challenge = *abi.ConvertType(out[5], new([32]byte)).(*[32]byte) outstruct.Difficulty = *abi.ConvertType(out[6], new(*big.Int)).(**big.Int) @@ -483,30 +494,30 @@ func (_Pow *PowCaller) PowSubmissions(opts *bind.CallOpts, arg0 common.Address, // PowSubmissions is a free data retrieval call binding the contract method 0x4bbe05e4. // -// Solidity: function powSubmissions(address , uint256 ) view returns(address walletAddress, string nodeId, uint256 nonce, uint256 start_timestap, uint256 complete_timestap, bytes32 challenge, uint256 difficulty) +// Solidity: function powSubmissions(address , uint256 ) view returns(address walletAddress, string nodeId, uint256 nonce, uint256 start_timestamp, uint256 complete_timestamp, bytes32 challenge, uint256 difficulty) func (_Pow *PowSession) PowSubmissions(arg0 common.Address, arg1 *big.Int) (struct { - WalletAddress common.Address - NodeId string - Nonce *big.Int - StartTimestap *big.Int - CompleteTimestap *big.Int - Challenge [32]byte - Difficulty *big.Int + WalletAddress common.Address + NodeId string + Nonce *big.Int + StartTimestamp *big.Int + CompleteTimestamp *big.Int + Challenge [32]byte + Difficulty *big.Int }, error) { return _Pow.Contract.PowSubmissions(&_Pow.CallOpts, arg0, arg1) } // PowSubmissions is a free data retrieval call binding the contract method 0x4bbe05e4. // -// Solidity: function powSubmissions(address , uint256 ) view returns(address walletAddress, string nodeId, uint256 nonce, uint256 start_timestap, uint256 complete_timestap, bytes32 challenge, uint256 difficulty) +// Solidity: function powSubmissions(address , uint256 ) view returns(address walletAddress, string nodeId, uint256 nonce, uint256 start_timestamp, uint256 complete_timestamp, bytes32 challenge, uint256 difficulty) func (_Pow *PowCallerSession) PowSubmissions(arg0 common.Address, arg1 *big.Int) (struct { - WalletAddress common.Address - NodeId string - Nonce *big.Int - StartTimestap *big.Int - CompleteTimestap *big.Int - Challenge [32]byte - Difficulty *big.Int + WalletAddress common.Address + NodeId string + Nonce *big.Int + StartTimestamp *big.Int + CompleteTimestamp *big.Int + Challenge [32]byte + Difficulty *big.Int }, error) { return _Pow.Contract.PowSubmissions(&_Pow.CallOpts, arg0, arg1) } @@ -1437,43 +1448,34 @@ func (it *PowValidPOWSubmittedIterator) Close() error { // PowValidPOWSubmitted represents a ValidPOWSubmitted event raised by the Pow contract. type PowValidPOWSubmitted struct { - WalletAddress common.Address - NodeId string - Nonce *big.Int - Timestamp *big.Int - Challenge [32]byte - Difficulty *big.Int - Raw types.Log // Blockchain specific contextual infos + WalletAddress common.Address + NodeId string + Nonce *big.Int + StartTimestamp *big.Int + CompleteTimestamp *big.Int + Challenge [32]byte + Difficulty *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterValidPOWSubmitted is a free log retrieval operation binding the contract event 0x5ea61d67e3236a79ab8c3c29f810e2c408b0a6b1e19f4e0da2fcd6362129c860. +// FilterValidPOWSubmitted is a free log retrieval operation binding the contract event 0x172b7d59e60446d8dfc98985344fb883c871ef150b1db4d1592bcb6769903732. // -// Solidity: event ValidPOWSubmitted(address indexed walletAddress, string nodeId, uint256 nonce, uint256 timestamp, bytes32 challenge, uint256 difficulty) -func (_Pow *PowFilterer) FilterValidPOWSubmitted(opts *bind.FilterOpts, walletAddress []common.Address) (*PowValidPOWSubmittedIterator, error) { - - var walletAddressRule []interface{} - for _, walletAddressItem := range walletAddress { - walletAddressRule = append(walletAddressRule, walletAddressItem) - } +// Solidity: event ValidPOWSubmitted(address walletAddress, string nodeId, uint256 nonce, uint256 start_timestamp, uint256 complete_timestamp, bytes32 challenge, uint256 difficulty) +func (_Pow *PowFilterer) FilterValidPOWSubmitted(opts *bind.FilterOpts) (*PowValidPOWSubmittedIterator, error) { - logs, sub, err := _Pow.contract.FilterLogs(opts, "ValidPOWSubmitted", walletAddressRule) + logs, sub, err := _Pow.contract.FilterLogs(opts, "ValidPOWSubmitted") if err != nil { return nil, err } return &PowValidPOWSubmittedIterator{contract: _Pow.contract, event: "ValidPOWSubmitted", logs: logs, sub: sub}, nil } -// WatchValidPOWSubmitted is a free log subscription operation binding the contract event 0x5ea61d67e3236a79ab8c3c29f810e2c408b0a6b1e19f4e0da2fcd6362129c860. +// WatchValidPOWSubmitted is a free log subscription operation binding the contract event 0x172b7d59e60446d8dfc98985344fb883c871ef150b1db4d1592bcb6769903732. // -// Solidity: event ValidPOWSubmitted(address indexed walletAddress, string nodeId, uint256 nonce, uint256 timestamp, bytes32 challenge, uint256 difficulty) -func (_Pow *PowFilterer) WatchValidPOWSubmitted(opts *bind.WatchOpts, sink chan<- *PowValidPOWSubmitted, walletAddress []common.Address) (event.Subscription, error) { - - var walletAddressRule []interface{} - for _, walletAddressItem := range walletAddress { - walletAddressRule = append(walletAddressRule, walletAddressItem) - } +// Solidity: event ValidPOWSubmitted(address walletAddress, string nodeId, uint256 nonce, uint256 start_timestamp, uint256 complete_timestamp, bytes32 challenge, uint256 difficulty) +func (_Pow *PowFilterer) WatchValidPOWSubmitted(opts *bind.WatchOpts, sink chan<- *PowValidPOWSubmitted) (event.Subscription, error) { - logs, sub, err := _Pow.contract.WatchLogs(opts, "ValidPOWSubmitted", walletAddressRule) + logs, sub, err := _Pow.contract.WatchLogs(opts, "ValidPOWSubmitted") if err != nil { return nil, err } @@ -1505,9 +1507,9 @@ func (_Pow *PowFilterer) WatchValidPOWSubmitted(opts *bind.WatchOpts, sink chan< }), nil } -// ParseValidPOWSubmitted is a log parse operation binding the contract event 0x5ea61d67e3236a79ab8c3c29f810e2c408b0a6b1e19f4e0da2fcd6362129c860. +// ParseValidPOWSubmitted is a log parse operation binding the contract event 0x172b7d59e60446d8dfc98985344fb883c871ef150b1db4d1592bcb6769903732. // -// Solidity: event ValidPOWSubmitted(address indexed walletAddress, string nodeId, uint256 nonce, uint256 timestamp, bytes32 challenge, uint256 difficulty) +// Solidity: event ValidPOWSubmitted(address walletAddress, string nodeId, uint256 nonce, uint256 start_timestamp, uint256 complete_timestamp, bytes32 challenge, uint256 difficulty) func (_Pow *PowFilterer) ParseValidPOWSubmitted(log types.Log) (*PowValidPOWSubmitted, error) { event := new(PowValidPOWSubmitted) if err := _Pow.contract.UnpackLog(event, "ValidPOWSubmitted", log); err != nil { diff --git a/pkg/web3/events_pow.go b/pkg/web3/events_pow.go index b2dd21ec..ecc0fe3b 100644 --- a/pkg/web3/events_pow.go +++ b/pkg/web3/events_pow.go @@ -36,7 +36,7 @@ func (s *PowEventChannels) Start( connectnewPowRoundSub := func() (event.Subscription, error) { log.Debug(). - Str("jobcreator->connect", "newPowRound"). + Str("pow->connect", "newPowRound"). Msgf("") return sdk.Contracts.Pow.WatchNewPowRound( &bind.WatchOpts{Start: &blockNumber, Context: ctx}, @@ -73,6 +73,6 @@ func (s *PowEventChannels) Start( } } -func (t *PowEventChannels) SubscribenewPowRound(handler func(pow.PowNewPowRound)) { +func (t *PowEventChannels) SubscribeNewPowRound(handler func(pow.PowNewPowRound)) { t.newPowRoundSubs = append(t.newPowRoundSubs, handler) } diff --git a/pkg/web3/events_valid_submission.go b/pkg/web3/events_valid_submission.go new file mode 100644 index 00000000..27cb61c4 --- /dev/null +++ b/pkg/web3/events_valid_submission.go @@ -0,0 +1,78 @@ +package web3 + +import ( + "context" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/event" + "github.com/lilypad-tech/lilypad/pkg/system" + "github.com/lilypad-tech/lilypad/pkg/web3/bindings/pow" + "github.com/rs/zerolog/log" +) + +type ValidPOWSubmittedEventChannels struct { + powValidPOWSubmittedChan chan *pow.PowValidPOWSubmitted + powValidPOWSubmittedSubs []func(pow.PowValidPOWSubmitted) +} + +func NewValidPOWSubmittedEventChannels() *ValidPOWSubmittedEventChannels { + return &ValidPOWSubmittedEventChannels{ + powValidPOWSubmittedChan: make(chan *pow.PowValidPOWSubmitted), + powValidPOWSubmittedSubs: []func(pow.PowValidPOWSubmitted){}, + } +} + +func (s *ValidPOWSubmittedEventChannels) Start( + sdk *Web3SDK, + ctx context.Context, + cm *system.CleanupManager, +) error { + blockNumber, err := sdk.getBlockNumber() + if err != nil { + return err + } + + var powValidPOWSubmittedSub event.Subscription + + connectPowValidPOWSubmittedSub := func() (event.Subscription, error) { + log.Debug(). + Str("pow->connect", "PowValidPOWSubmitted"). + Msgf("") + return sdk.Contracts.Pow.WatchValidPOWSubmitted( + &bind.WatchOpts{Start: &blockNumber, Context: ctx}, + s.powValidPOWSubmittedChan, + ) + } + + powValidPOWSubmittedSub, err = connectPowValidPOWSubmittedSub() + if err != nil { + return err + } + + go func() { + <-ctx.Done() + powValidPOWSubmittedSub.Unsubscribe() + }() + + for { + select { + case event := <-s.powValidPOWSubmittedChan: + log.Debug(). + Str("pow->event", "PowValidPOWSubmitted"). + Msgf("%+v", event) + for _, handler := range s.powValidPOWSubmittedSubs { + go handler(*event) + } + case <-powValidPOWSubmittedSub.Err(): + powValidPOWSubmittedSub.Unsubscribe() + powValidPOWSubmittedSub, err = connectPowValidPOWSubmittedSub() + if err != nil { + return err + } + } + } +} + +func (t *ValidPOWSubmittedEventChannels) SubscribePowValidPOWSubmitted(handler func(pow.PowValidPOWSubmitted)) { + t.powValidPOWSubmittedSubs = append(t.powValidPOWSubmittedSubs, handler) +} diff --git a/stack b/stack index cb19a54e..3b640e37 100755 --- a/stack +++ b/stack @@ -204,10 +204,10 @@ function job-creator-docker-run() { ############################################################################ # resource provider ############################################################################ - + function resource-provider() { echo "- Reminder to do doppler setup to project->resource-provider and config->dev" - doppler run --preserve-env -p resource-provider -c dev -- go run . resource-provider "$@" --network dev + doppler run --preserve-env -p resource-provider -c dev -- go run . resource-provider "$@" --network dev --enable-pow } function resource-provider-docker-build() {