Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signature aggregator sdk #2149

Merged
merged 26 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ce84bda
wip
arturrez Sep 10, 2024
8255b4f
go mod tidy
arturrez Sep 10, 2024
f910e6e
use awm-relayer@main
arturrez Sep 10, 2024
d34e429
fixes
arturrez Sep 10, 2024
193d908
use latest awm-relayer pkg which caused upgrade on coreth and avago …
arturrez Sep 10, 2024
99ea790
use latest anr and rm prometheus metrics
arturrez Sep 10, 2024
fba4092
Merge branch 'main' into signature-aggregator
arturrez Sep 10, 2024
604fcb2
check for errors
arturrez Sep 10, 2024
61e3b3f
lint
arturrez Sep 11, 2024
1dbd1aa
mv to sdk/interchain
arturrez Sep 11, 2024
00f7ff9
some refactoring and added unittests
arturrez Sep 12, 2024
6b7790e
fix license
arturrez Sep 12, 2024
182cc6f
fix unittest for now
arturrez Sep 12, 2024
3ebba77
fix lint
arturrez Sep 12, 2024
dbb1ae2
allow empty subnetID
arturrez Sep 13, 2024
2dc7610
rm error msg from example
arturrez Sep 13, 2024
c3c1504
Merge branch 'acp-77' into signature-aggregator
sukantoraymond Sep 19, 2024
f5dede3
refactor to address felipe feedback
arturrez Sep 24, 2024
69d40c7
we should remove this from the test in favour of https://github.com/a…
arturrez Sep 24, 2024
d76ae7b
update readme example
arturrez Sep 24, 2024
24727ec
rm goconst fix CI
arturrez Sep 24, 2024
89aef71
put `- goconst` back
arturrez Sep 26, 2024
73e17d5
Merge branch 'main' into signature-aggregator
arturrez Sep 27, 2024
cbd4bf4
resolve conficts
arturrez Sep 27, 2024
b8c1c62
Merge branch 'main' into signature-aggregator
arturrez Sep 30, 2024
5d380f5
Merge branch 'acp-77' into signature-aggregator
arturrez Sep 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cmd/nodecmd/create_devnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (
"github.com/ava-labs/avalanche-cli/pkg/utils"
"github.com/ava-labs/avalanche-cli/pkg/ux"
"github.com/ava-labs/avalanchego/config"
avago_upgrade "github.com/ava-labs/avalanchego/upgrade"
avago_constants "github.com/ava-labs/avalanchego/utils/constants"
"github.com/ava-labs/avalanchego/utils/crypto/bls"
"github.com/ava-labs/avalanchego/utils/formatting"
"github.com/ava-labs/avalanchego/utils/logging"
Expand All @@ -41,7 +43,7 @@ const (

func generateCustomCchainGenesis() ([]byte, error) {
cChainGenesisMap := map[string]interface{}{}
cChainGenesisMap["config"] = coreth_params.AvalancheLocalChainConfig
cChainGenesisMap["config"] = coreth_params.GetChainConfig(avago_upgrade.GetConfig(avago_constants.LocalID), coreth_params.AvalancheLocalChainID)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is create devnet being used anywhere in this PR? just curious why this is changed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's changed because of the dependency upgrade and changes there

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you tested this genesis works? this is not the same solution as found for ANR:

conf := *coreth_params.TestChainConfig
conf.ChainID = coreth_params.AvalancheLocalChainID
cChainGenesisMap["config"] = conf
cChainGenesisMap["timestamp"] = upgrade.InitiallyActiveTime.Unix()

but may work. You should check if teleporter msg works between c-chain and other blockchain.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its works after we updated coreth to the latest go mod version because awm-relayer uses this version of the coreth

cChainGenesisMap["nonce"] = hexa0Str
cChainGenesisMap["timestamp"] = hexa0Str
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you tested this genesis works? this is not the same solution as found for ANR:

conf := *coreth_params.TestChainConfig
conf.ChainID = coreth_params.AvalancheLocalChainID
cChainGenesisMap["config"] = conf
cChainGenesisMap["timestamp"] = upgrade.InitiallyActiveTime.Unix()

but may work. You should check if teleporter msg works between c-chain and other blockchain.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's after update to latest coreth

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you check that a devnet created with this works with teleporter msg?

cChainGenesisMap["extraData"] = "0x00"
Expand Down
82 changes: 41 additions & 41 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
module github.com/ava-labs/avalanche-cli

go 1.21.12

toolchain go1.22.3
go 1.22.7

require (
github.com/ava-labs/apm v1.0.0
github.com/ava-labs/avalanche-network-runner v1.8.3-0.20240815175406-50423422fb5b
github.com/ava-labs/avalanchego v1.11.11-0.20240815211142-ce78e7f1799f
github.com/ava-labs/awm-relayer v1.3.0
github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240813194342-7635a96aa180
github.com/ava-labs/subnet-evm v0.6.9-0.20240815191823-9f3608326298
github.com/aws/aws-sdk-go-v2 v1.30.3
github.com/ava-labs/avalanche-network-runner v1.8.3
github.com/ava-labs/avalanchego v1.11.11
github.com/ava-labs/awm-relayer v1.4.1-0.20240910171125-3c2ae781fb32
github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240815193440-a96bc921e732
github.com/ava-labs/subnet-evm v0.6.9
github.com/aws/aws-sdk-go-v2 v1.30.5
github.com/aws/aws-sdk-go-v2/config v1.27.26
github.com/aws/aws-sdk-go-v2/service/ec2 v1.162.0
github.com/chelnak/ysmrr v0.4.0
github.com/docker/docker v27.1.1+incompatible
github.com/ethereum/go-ethereum v1.13.8
github.com/ethereum/go-ethereum v1.13.14
github.com/fatih/color v1.17.0
github.com/go-git/go-git/v5 v5.12.0
github.com/jedib0t/go-pretty/v6 v6.5.9
Expand All @@ -27,24 +25,24 @@ require (
github.com/mitchellh/go-wordwrap v1.0.1
github.com/okteto/remote v0.0.0-20210428052247-99de42c04148
github.com/olekukonko/tablewriter v0.0.5
github.com/onsi/ginkgo/v2 v2.18.0
github.com/onsi/gomega v1.33.1
github.com/onsi/ginkgo/v2 v2.20.2
github.com/onsi/gomega v1.34.2
github.com/pborman/ansi v1.0.0
github.com/pingcap/errors v0.11.4
github.com/posthog/posthog-go v0.0.0-20221221115252-24dfed35d71a
github.com/shirou/gopsutil v3.21.11+incompatible
github.com/spf13/afero v1.11.0
github.com/spf13/cobra v1.8.0
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
go.uber.org/zap v1.27.0
golang.org/x/crypto v0.25.0
golang.org/x/exp v0.0.0-20231127185646-65229373498e
golang.org/x/mod v0.17.0
golang.org/x/net v0.27.0
golang.org/x/crypto v0.26.0
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
golang.org/x/mod v0.20.0
golang.org/x/net v0.28.0
golang.org/x/oauth2 v0.21.0
golang.org/x/sync v0.7.0
golang.org/x/text v0.16.0
golang.org/x/sync v0.8.0
golang.org/x/text v0.17.0
google.golang.org/api v0.184.0
google.golang.org/protobuf v1.34.2
gopkg.in/yaml.v2 v2.4.0
Expand All @@ -65,26 +63,26 @@ require (
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 // indirect
github.com/ava-labs/teleporter v1.0.0 // indirect
github.com/ava-labs/teleporter v1.0.7 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.26 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.11 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.15 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.15 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.17 // indirect
github.com/aws/aws-sdk-go-v2/service/kms v1.31.0 // indirect
github.com/aws/aws-sdk-go-v2/service/kms v1.35.7 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.22.3 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.30.3 // indirect
github.com/aws/smithy-go v1.20.3 // indirect
github.com/aws/smithy-go v1.20.4 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/btcsuite/btcd/btcutil v1.1.3 // indirect
github.com/cavaliergopher/grab/v3 v3.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chzyer/readline v1.5.1 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/cockroachdb/errors v1.9.1 // indirect
Expand All @@ -94,7 +92,7 @@ require (
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.12.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
github.com/creack/pty v1.1.11 // indirect
Expand All @@ -107,7 +105,7 @@ require (
github.com/emirpasic/gods v1.18.1 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect
github.com/fjl/memsize v0.0.2 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect
github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect
Expand All @@ -116,9 +114,9 @@ require (
github.com/go-cmd/cmd v1.4.1 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
Expand All @@ -128,7 +126,7 @@ require (
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 // indirect
github.com/google/renameio/v2 v2.0.0 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/uuid v1.6.0 // indirect
Expand All @@ -141,8 +139,9 @@ require (
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 // indirect
github.com/hashicorp/go-bexpr v0.1.10 // indirect
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 // indirect
github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/huin/goupnp v1.3.0 // indirect
Expand All @@ -153,7 +152,7 @@ require (
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/juju/fslock v0.0.0-20160525022230-4d5c94c67b4b // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.17.2 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
Expand All @@ -165,6 +164,7 @@ require (
github.com/mitchellh/pointerstructure v1.2.0 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect
github.com/otiai10/copy v1.11.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
Expand All @@ -173,10 +173,10 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/sftp v1.13.6 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.48.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/prometheus/client_golang v1.20.3 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/rs/cors v1.7.0 // indirect
Expand Down Expand Up @@ -217,14 +217,14 @@ require (
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
go.uber.org/mock v0.4.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/term v0.22.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/term v0.23.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
golang.org/x/tools v0.24.0 // indirect
gonum.org/v1/gonum v0.11.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect
google.golang.org/grpc v1.64.1 // indirect
google.golang.org/grpc v1.66.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
Expand Down
Loading
Loading