Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
23 changes: 22 additions & 1 deletion Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ config.define_bool("solana", False, "Enable Solana component")
config.define_bool("solana_watcher", False, "Enable Solana watcher on guardian")
config.define_bool("pythnet", False, "Enable PythNet component")
config.define_bool("terra2", False, "Enable Terra 2 component")
config.define_bool("stellar", False, "Enable Stellar component")
config.define_bool("ci_tests", False, "Enable tests runner component")
config.define_bool("guardiand_debug", False, "Enable dlv endpoint for guardiand")
config.define_bool("node_metrics", False, "Enable Prometheus & Grafana for Guardian metrics")
Expand All @@ -83,6 +84,7 @@ ci = cfg.get("ci", False)
algorand = cfg.get("algorand", ci)
near = cfg.get("near", ci)
aptos = cfg.get("aptos", ci)
stellar = cfg.get("stellar", ci)
sui = cfg.get("sui", ci)
evm2 = cfg.get("evm2", ci)
solana = cfg.get("solana", ci)
Expand Down Expand Up @@ -179,7 +181,16 @@ docker_build(
context = ".",
dockerfile = "node/Dockerfile",
target = "build",
ignore=["./sdk/js"]
ignore=["./sdk/js", "./relayer"],

platform='linux/amd64',
)

k8s_yaml('stellar/stellar.yaml')
k8s_resource(
'stellar',
port_forwards=['8000:8000'],
resource_deps=[]
)

def command_with_dlv(argv):
Expand Down Expand Up @@ -285,6 +296,14 @@ def build_node_yaml():
"--suiMoveEventType",
"0xf82ef05c95ebafcbeb1cce2b636448b8cd1c6daad201f7d04ecddcda15c19d52::publish_message::WormholeMessage",
]

if stellar:
container["command"] += [
"--stellarRPC",
"http://stellar.default.svc.cluster.local:8000/soroban/rpc",
"--stellarContract",
"CBWQUIB4R65Z2DGC263FQ7BBI7TGIGOLFTYMLE6QPWBD5QDOUVJY3AKR",
]

# Handle evm2 configuration based on guardian count and evm2 flag
if require_per_guardian_config:
Expand Down Expand Up @@ -476,6 +495,8 @@ if wormchain:
guardian_resource_deps = guardian_resource_deps + ["wormchain", "wormchain-deploy"]
if sui:
guardian_resource_deps = guardian_resource_deps + ["sui"]
if stellar:
guardian_resource_deps = guardian_resource_deps + ["stellar"]

k8s_resource(
"guardian",
Expand Down
31 changes: 31 additions & 0 deletions node/cmd/guardiand/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/certusone/wormhole/node/pkg/guardiansigner"
"github.com/certusone/wormhole/node/pkg/watchers"
"github.com/certusone/wormhole/node/pkg/watchers/ibc"
"github.com/certusone/wormhole/node/pkg/watchers/stellar"
ethcrypto "github.com/ethereum/go-ethereum/crypto"

"github.com/certusone/wormhole/node/pkg/watchers/cosmwasm"
Expand Down Expand Up @@ -235,6 +236,9 @@ var (
sepoliaRPC *string
sepoliaContract *string

stellarRPC *string
stellarContract *string

holeskyRPC *string
holeskyContract *string

Expand Down Expand Up @@ -386,6 +390,13 @@ func init() {
nearRPC = node.RegisterFlagWithValidationOrFail(NodeCmd, "nearRPC", "Near RPC URL", "http://near:3030", []string{"http", "https"})
nearContract = NodeCmd.Flags().String("nearContract", "", "Near contract")

stellarRPC = node.RegisterFlagWithValidationOrFail(
NodeCmd, "stellarRPC", "Stellar (Soroban) RPC URL", "http://stellar.default.svc.cluster.local:8000/soroban/rpc", []string{"http", "https"},
)
stellarContract = NodeCmd.Flags().String(
"stellarContract", "CBWQUIB4R65Z2DGC263FQ7BBI7TGIGOLFTYMLE6QPWBD5QDOUVJY3AKR", "Wormhole core contract ID on Stellar (e.g., StrKey for Soroban core contract)",
)

wormchainURL = node.RegisterFlagWithValidationOrFail(NodeCmd, "wormchainURL", "Wormhole-chain gRPC URL", "wormchain:9090", []string{""})

ibcWS = node.RegisterFlagWithValidationOrFail(NodeCmd, "ibcWS", "Websocket used to listen to the IBC receiver smart contract on wormchain", "ws://wormchain:26657/websocket", []string{"ws", "wss"})
Expand Down Expand Up @@ -984,6 +995,10 @@ func runNode(cmd *cobra.Command, args []string) {
logger.Fatal("Either --gatewayContract, --gatewayWS and --gatewayLCD must all be set or all unset")
}

if !argsConsistent([]string{*stellarContract, *stellarRPC}) {
logger.Fatal("Either --stellarContract and --stellarRPC must both be set or both unset")
}

if !*chainGovernorEnabled && *coinGeckoApiKey != "" {
logger.Fatal("If coinGeckoApiKey is set, then chainGovernorEnabled must be set")
}
Expand Down Expand Up @@ -1052,6 +1067,7 @@ func runNode(cmd *cobra.Command, args []string) {
rpcMap["avalancheRPC"] = *avalancheRPC
rpcMap["algorandIndexerRPC"] = *algorandIndexerRPC
rpcMap["algorandAlgodRPC"] = *algorandAlgodRPC
rpcMap["stellarRPC"] = *stellarRPC
rpcMap["klaytnRPC"] = *klaytnRPC
rpcMap["celoRPC"] = *celoRPC
rpcMap["nearRPC"] = *nearRPC
Expand Down Expand Up @@ -1718,6 +1734,21 @@ func runNode(cmd *cobra.Command, args []string) {
watcherConfigs = append(watcherConfigs, wc)
}

if shouldStart(stellarRPC) {
wc := &stellar.WatcherConfig{
NetworkID: "61", // label (appears in logs)
ChainID: vaa.ChainIDStellar, // TODO: use your actual Stellar ChainID constant
Rpc: *stellarRPC, // e.g., http://stellar:8000
Contract: *stellarContract, // Soroban core contract id (StrKey)
StartLedger: 0, // This is what stellar expects >= 7
// Optional: you can expose extra tuning knobs in WatcherConfig
// PollInterval: 700 * time.Millisecond,
// MaxLedgerRange: 512,
// RPCTimeout: 10 * time.Second,
}
watcherConfigs = append(watcherConfigs, wc)
}

if shouldStart(movementRPC) {
wc := &aptos.WatcherConfig{
NetworkID: "movement",
Expand Down
Loading
Loading