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

algo/testnet: Wormhole name fix #1134

Merged
merged 6 commits into from
Apr 30, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
algo: guardian
  • Loading branch information
evan-gray committed Apr 29, 2022
commit f54d3273f4ffd189d25ccb1659fd768a76b3dda8
14 changes: 7 additions & 7 deletions devnet/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ spec:
- http://terra-terrad:1317
- --terraContract
- terra18vd8fpwxzck93qlwghaj6arh4p7c5n896xzem5
- --algorandRPC
- http://localhost:4001
- --algorandToken
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- --algorandContract
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- --algorandAppID
- "4"
- --algorandIndexerRPC
- http://algorand:8980
- --algorandIndexerToken
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
- --solanaContract
- Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o
- --solanaWS
Expand All @@ -118,7 +118,7 @@ spec:
- /tmp/admin.sock
- --dataDir
- /tmp/data
# - --logLevel=debug
# - --logLevel=debug
securityContext:
capabilities:
add:
Expand Down
2 changes: 2 additions & 0 deletions node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ FROM docker.io/golang:1.17.5@sha256:90d1ab81f3d157ca649a9ff8d251691b810d95ea6023
COPY go.mod cert.pem* /certs/
# Debian
RUN if [ -e /certs/cert.pem ]; then cp /certs/cert.pem /etc/ssl/certs/ca-certificates.crt; fi
# git
RUN if [ -e /certs/cert.pem ]; then git config --global http.sslCAInfo /certs/cert.pem; fi

WORKDIR /app

Expand Down
1 change: 1 addition & 0 deletions node/cmd/guardiand/adminnodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ func runListNodes(cmd *cobra.Command, args []string) {
{"BSC", vaa.ChainIDBSC},
{"Polygon", vaa.ChainIDPolygon},
{"Avalanche", vaa.ChainIDAvalanche},
{"Algorand", vaa.ChainIDAlgorand},
{"Oasis", vaa.ChainIDOasis},
{"Aurora", vaa.ChainIDAurora},
{"Fantom", vaa.ChainIDFantom},
Expand Down
2 changes: 1 addition & 1 deletion node/cmd/guardiand/guardiankey.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

ethcrypto "github.com/ethereum/go-ethereum/crypto"
"github.com/spf13/cobra"
"golang.org/x/crypto/openpgp/armor"
"golang.org/x/crypto/openpgp/armor" //nolint
"google.golang.org/protobuf/proto"

"github.com/certusone/wormhole/node/pkg/devnet"
Expand Down
38 changes: 20 additions & 18 deletions node/cmd/guardiand/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ var (
terraLCD *string
terraContract *string

algorandRPC *string
algorandToken *string
algorandContract *string
algorandIndexerRPC *string
algorandIndexerToken *string
algorandAppID *uint64

solanaWsRPC *string
solanaRPC *string
Expand Down Expand Up @@ -195,9 +195,9 @@ func init() {
terraLCD = NodeCmd.Flags().String("terraLCD", "", "Path to LCD service root for http calls")
terraContract = NodeCmd.Flags().String("terraContract", "", "Wormhole contract address on Terra blockchain")

algorandRPC = NodeCmd.Flags().String("algorandRPC", "", "Algorand RPC URL")
algorandToken = NodeCmd.Flags().String("algorandToken", "", "Algorand access token")
algorandContract = NodeCmd.Flags().String("algorandContract", "", "Algorand contract")
algorandIndexerRPC = NodeCmd.Flags().String("algorandIndexerRPC", "", "Algorand Indexer RPC URL")
algorandIndexerToken = NodeCmd.Flags().String("algorandIndexerToken", "", "Algorand Indexer access token")
algorandAppID = NodeCmd.Flags().Uint64("algorandAppID", 0, "Algorand app id")

solanaWsRPC = NodeCmd.Flags().String("solanaWS", "", "Solana Websocket URL (required")
solanaRPC = NodeCmd.Flags().String("solanaRPC", "", "Solana RPC URL (required")
Expand Down Expand Up @@ -308,7 +308,7 @@ func runNode(cmd *cobra.Command, args []string) {
readiness.RegisterComponent(common.ReadinessEthSyncing)
readiness.RegisterComponent(common.ReadinessSolanaSyncing)
readiness.RegisterComponent(common.ReadinessTerraSyncing)
if *unsafeDevMode {
if *testnetMode || *unsafeDevMode {
readiness.RegisterComponent(common.ReadinessAlgorandSyncing)
}
readiness.RegisterComponent(common.ReadinessBSCSyncing)
Expand Down Expand Up @@ -511,19 +511,17 @@ func runNode(cmd *cobra.Command, args []string) {
if *terraContract == "" {
logger.Fatal("Please specify --terraContract")
}

if *unsafeDevMode {
if *algorandRPC == "" {
logger.Fatal("Please specify --algorandRPC")
if *testnetMode || *unsafeDevMode {
if *algorandIndexerRPC == "" {
logger.Fatal("Please specify --algorandIndexerRPC")
}
if *algorandToken == "" {
logger.Fatal("Please specify --algorandToken")
if *algorandIndexerToken == "" {
logger.Fatal("Please specify --algorandIndexerToken")
}
if *algorandContract == "" {
logger.Fatal("Please specify --algorandContract")
if *algorandAppID == 0 {
logger.Fatal("Please specify --algorandAppID")
}
}

if *bigTablePersistenceEnabled {
if *bigTableGCPProject == "" {
logger.Fatal("Please specify --bigTableGCPProject")
Expand Down Expand Up @@ -660,8 +658,12 @@ func runNode(cmd *cobra.Command, args []string) {
chainObsvReqC[vaa.ChainIDPolygon] = make(chan *gossipv1.ObservationRequest)
chainObsvReqC[vaa.ChainIDAvalanche] = make(chan *gossipv1.ObservationRequest)
chainObsvReqC[vaa.ChainIDOasis] = make(chan *gossipv1.ObservationRequest)
if *testnetMode || *unsafeDevMode {
chainObsvReqC[vaa.ChainIDAlgorand] = make(chan *gossipv1.ObservationRequest)
}
chainObsvReqC[vaa.ChainIDAurora] = make(chan *gossipv1.ObservationRequest)
chainObsvReqC[vaa.ChainIDFantom] = make(chan *gossipv1.ObservationRequest)

if *testnetMode {
chainObsvReqC[vaa.ChainIDKarura] = make(chan *gossipv1.ObservationRequest)
chainObsvReqC[vaa.ChainIDAcala] = make(chan *gossipv1.ObservationRequest)
Expand Down Expand Up @@ -844,9 +846,9 @@ func runNode(cmd *cobra.Command, args []string) {
return err
}

if *unsafeDevMode {
if *testnetMode || *unsafeDevMode {
if err := supervisor.Run(ctx, "algorandwatch",
algorand.NewWatcher(*algorandRPC, *algorandToken, *algorandContract, lockC, setC).Run); err != nil {
algorand.NewWatcher(*algorandIndexerRPC, *algorandIndexerToken, *algorandAppID, lockC, setC, chainObsvReqC[vaa.ChainIDAlgorand]).Run); err != nil {
return err
}
}
Expand Down
7 changes: 5 additions & 2 deletions node/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ require (
github.com/terra-project/terra.go v1.0.1-0.20210129055710-7a586e5e027a
github.com/tidwall/gjson v1.8.1
go.uber.org/zap v1.16.0
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
golang.org/x/sys v0.0.0-20210917161153-d61c044b1678
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac
google.golang.org/api v0.58.0
Expand All @@ -55,6 +55,7 @@ require (
require (
cloud.google.com/go/logging v1.4.2
cloud.google.com/go/pubsub v1.17.1
github.com/algorand/go-algorand-sdk v1.13.0
github.com/blendle/zapdriver v1.3.1
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce
github.com/google/uuid v1.2.0
Expand All @@ -68,6 +69,7 @@ require (
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
github.com/VictoriaMetrics/fastcache v1.6.0 // indirect
github.com/algorand/go-codec/codec v1.1.7 // indirect
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect
github.com/benbjohnson/clock v1.0.3 // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand Down Expand Up @@ -108,6 +110,7 @@ require (
github.com/google/btree v1.0.1 // indirect
github.com/google/flatbuffers v1.12.0 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/go-querystring v1.0.0 // indirect
github.com/google/gopacket v1.1.19 // indirect
github.com/googleapis/gax-go/v2 v2.1.1 // indirect
github.com/gorilla/schema v1.2.0 // indirect
Expand Down Expand Up @@ -256,7 +259,7 @@ require (
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
)

// Temporary fork that adds GetConfirmedTransactionWithOpts. Can be removed
Expand Down
Loading