Skip to content

Commit

Permalink
Merge branch 'main' into joel/add-slashing-params-vaa
Browse files Browse the repository at this point in the history
  • Loading branch information
joelsmith-2019 committed Jan 29, 2025
2 parents a29a60a + 54fc8aa commit a785322
Show file tree
Hide file tree
Showing 17 changed files with 376 additions and 141 deletions.
1 change: 1 addition & 0 deletions .github/workflows/wormchain-icts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
- "ictest-wormchain"
# Disabled due to flakiness in CI.
# - "ictest-ibc-receiver"
- "ictest-validator-hotswap"
- "ictest-cw-wormhole"
fail-fast: false

Expand Down
1 change: 0 additions & 1 deletion node/cmd/guardiand/adminnodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ func runListNodes(cmd *cobra.Command, args []string) {
{"OptimismSepolia", vaa.ChainIDOptimismSepolia},
{"Holesky", vaa.ChainIDHolesky},
{"PolygonSepolia", vaa.ChainIDPolygonSepolia},
{"MonadDevnet", vaa.ChainIDMonadDevnet},
}

if len(only) > 0 {
Expand Down
20 changes: 0 additions & 20 deletions node/cmd/guardiand/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,6 @@ var (
monadRPC *string
monadContract *string

monadDevnetRPC *string
monadDevnetContract *string

inkRPC *string
inkContract *string

Expand Down Expand Up @@ -462,9 +459,6 @@ func init() {
polygonSepoliaRPC = node.RegisterFlagWithValidationOrFail(NodeCmd, "polygonSepoliaRPC", "Polygon on Sepolia RPC URL", "ws://eth-devnet:8545", []string{"ws", "wss"})
polygonSepoliaContract = NodeCmd.Flags().String("polygonSepoliaContract", "", "Polygon on Sepolia contract address")

monadDevnetRPC = node.RegisterFlagWithValidationOrFail(NodeCmd, "monadDevnetRPC", "Monad Devnet RPC URL", "ws://eth-devnet:8545", []string{"ws", "wss"})
monadDevnetContract = NodeCmd.Flags().String("monadDevnetContract", "", "Monad Devnet contract address")

logLevel = NodeCmd.Flags().String("logLevel", "info", "Logging level (debug, info, warn, error, dpanic, panic, fatal)")
publicRpcLogDetailStr = NodeCmd.Flags().String("publicRpcLogDetail", "full", "The detail with which public RPC requests shall be logged (none=no logging, minimal=only log gRPC methods, full=log gRPC method, payload (up to 200 bytes) and user agent (up to 200 bytes))")
publicRpcLogToTelemetry = NodeCmd.Flags().Bool("logPublicRpcToTelemetry", true, "whether or not to include publicRpc request logs in telemetry")
Expand Down Expand Up @@ -855,7 +849,6 @@ func runNode(cmd *cobra.Command, args []string) {
*optimismSepoliaContract = checkEvmArgs(logger, *optimismSepoliaRPC, *optimismSepoliaContract, "optimismSepolia", false)
*holeskyContract = checkEvmArgs(logger, *holeskyRPC, *holeskyContract, "holesky", false)
*polygonSepoliaContract = checkEvmArgs(logger, *polygonSepoliaRPC, *polygonSepoliaContract, "polygonSepolia", false)
*monadDevnetContract = checkEvmArgs(logger, *monadDevnetRPC, *monadDevnetContract, "monadDevnet", false)

if !argsConsistent([]string{*solanaContract, *solanaRPC}) {
logger.Fatal("Both --solanaContract and --solanaRPC must be set or both unset")
Expand Down Expand Up @@ -1029,7 +1022,6 @@ func runNode(cmd *cobra.Command, args []string) {
rpcMap["optimismSepoliaRPC"] = *optimismSepoliaRPC
rpcMap["holeskyRPC"] = *holeskyRPC
rpcMap["polygonSepoliaRPC"] = *polygonSepoliaRPC
rpcMap["monadDevnetRPC"] = *monadDevnetRPC
}

// Other, non-chain specific parameters go here.
Expand Down Expand Up @@ -1760,18 +1752,6 @@ func runNode(cmd *cobra.Command, args []string) {

watcherConfigs = append(watcherConfigs, wc)
}

if shouldStart(monadDevnetRPC) {
wc := &evm.WatcherConfig{
NetworkID: "monad_devnet",
ChainID: vaa.ChainIDMonadDevnet,
Rpc: *monadDevnetRPC,
Contract: *monadDevnetContract,
CcqBackfillCache: *ccqBackfillCache,
}

watcherConfigs = append(watcherConfigs, wc)
}
}

var ibcWatcherConfig *node.IbcWatcherConfig = nil
Expand Down
165 changes: 80 additions & 85 deletions node/pkg/proto/publicrpc/v1/publicrpc.pb.go

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion node/pkg/query/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ var perChainConfig = map[vaa.ChainID]PerChainConfig{
vaa.ChainIDBaseSepolia: {NumWorkers: 1, TimestampCacheSupported: true},
vaa.ChainIDOptimismSepolia: {NumWorkers: 1, TimestampCacheSupported: true},
vaa.ChainIDPolygonSepolia: {NumWorkers: 1, TimestampCacheSupported: true},
vaa.ChainIDMonadDevnet: {NumWorkers: 1, TimestampCacheSupported: true},
vaa.ChainIDHyperEVM: {NumWorkers: 1, TimestampCacheSupported: true},
vaa.ChainIDMonad: {NumWorkers: 1, TimestampCacheSupported: true},
vaa.ChainIDSeiEVM: {NumWorkers: 1, TimestampCacheSupported: true},
Expand Down
1 change: 0 additions & 1 deletion node/pkg/watchers/evm/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,6 @@ func (w *Watcher) getFinality(ctx context.Context) (bool, bool, error) {
w.chainID == vaa.ChainIDKarura ||
w.chainID == vaa.ChainIDMantle ||
w.chainID == vaa.ChainIDMonad ||
w.chainID == vaa.ChainIDMonadDevnet ||
w.chainID == vaa.ChainIDMoonbeam ||
w.chainID == vaa.ChainIDOptimism ||
w.chainID == vaa.ChainIDOptimismSepolia ||
Expand Down
2 changes: 1 addition & 1 deletion node/pkg/watchers/solana/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ func (s *SolanaWatcher) shimProcessRest(
zap.Uint64("sequence", observation.Sequence),
zap.Stringer("emitter_chain", observation.EmitterChain),
zap.Stringer("emitter_address", observation.EmitterAddress),
zap.Bool("isReobservation", false),
zap.Bool("isReobservation", observation.IsReobservation),
zap.Binary("payload", observation.Payload),
zap.Uint8("consistency_level", observation.ConsistencyLevel),
)
Expand Down
2 changes: 1 addition & 1 deletion proto/publicrpc/v1/publicrpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ enum ChainID {
CHAIN_ID_OPTIMISM_SEPOLIA = 10005;
CHAIN_ID_HOLESKY = 10006;
CHAIN_ID_POLYGON_SEPOLIA = 10007;
CHAIN_ID_MONAD_DEVNET = 10008;
// OBSOLETE: CHAIN_ID_MONAD_DEVNET = 10008;
}

// MessageID is a VAA's globally unique identifier (see data availability design document).
Expand Down
8 changes: 1 addition & 7 deletions sdk/vaa/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,6 @@ func (c ChainID) String() string {
return "holesky"
case ChainIDPolygonSepolia:
return "polygon_sepolia"
case ChainIDMonadDevnet:
return "monad_devnet"
default:
return fmt.Sprintf("unknown chain ID: %d", c)
}
Expand Down Expand Up @@ -400,8 +398,6 @@ func ChainIDFromString(s string) (ChainID, error) {
return ChainIDHolesky, nil
case "polygon_sepolia":
return ChainIDPolygonSepolia, nil
case "monad_devnet":
return ChainIDMonadDevnet, nil
default:
return ChainIDUnset, fmt.Errorf("unknown chain ID: %s", s)
}
Expand Down Expand Up @@ -473,7 +469,6 @@ func GetAllNetworkIDs() []ChainID {
ChainIDOptimismSepolia,
ChainIDHolesky,
ChainIDPolygonSepolia,
ChainIDMonadDevnet,
}
}

Expand Down Expand Up @@ -616,8 +611,7 @@ const (
ChainIDHolesky ChainID = 10006
// ChainIDPolygonSepolia is the ChainID of Polygon on Sepolia
ChainIDPolygonSepolia ChainID = 10007
// ChainIDMonadDevnet is the ChainID of Monad Devnet
ChainIDMonadDevnet ChainID = 10008
// OBSOLETE: ChainIDMonadDevnet ChainID = 10008

// Minimum VAA size is derrived from the following assumptions:
// HEADER
Expand Down
3 changes: 0 additions & 3 deletions sdk/vaa/structs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ func TestChainIDFromString(t *testing.T) {
{input: "optimism_sepolia", output: ChainIDOptimismSepolia},
{input: "holesky", output: ChainIDHolesky},
{input: "polygon_sepolia", output: ChainIDPolygonSepolia},
{input: "monad_devnet", output: ChainIDMonadDevnet},

{input: "Solana", output: ChainIDSolana},
{input: "Ethereum", output: ChainIDEthereum},
Expand Down Expand Up @@ -159,7 +158,6 @@ func TestChainIDFromString(t *testing.T) {
{input: "Optimism_Sepolia", output: ChainIDOptimismSepolia},
{input: "Holesky", output: ChainIDHolesky},
{input: "Polygon_Sepolia", output: ChainIDPolygonSepolia},
{input: "Monad_Devnet", output: ChainIDMonadDevnet},
}

// Negative Test Cases
Expand Down Expand Up @@ -367,7 +365,6 @@ func TestChainId_String(t *testing.T) {
{input: 10005, output: "optimism_sepolia"},
{input: 10006, output: "holesky"},
{input: 10007, output: "polygon_sepolia"},
{input: 10008, output: "monad_devnet"},
{input: 10000, output: "unknown chain ID: 10000"},
}

Expand Down
13 changes: 12 additions & 1 deletion wormchain/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,29 +90,40 @@ local-image: build/wormchaind
# Individual Tests ($$ is interpreted as $)
rm-testcache:
go clean -testcache
.PHONY: rm-testcache

ictest-cancel-upgrade: rm-testcache
cd interchaintest && go test -race -v -run ^TestCancelUpgrade$$ ./...
.PHONY: ictest-cancel-upgrade

ictest-malformed-payload: rm-testcache
cd interchaintest && go test -race -v -run ^TestMalformedPayload$$ ./...
.PHONY: ictest-malformed-payload

ictest-slashing-params-update-vaa: rm-testcache
cd interchaintest && go test -race -v -run ^TestSlashingParamsUpdateVaa$$ ./...
.PHONY: ictest-slashing-params-update-vaa

ictest-upgrade-failure: rm-testcache
cd interchaintest && go test -race -v -run ^TestUpgradeFailure$$ ./...
.PHONY: ictest-upgrade-failure

ictest-upgrade: rm-testcache
cd interchaintest && go test -race -v -run ^TestUpgrade$$ ./...
.PHONY: ictest-upgrade

ictest-wormchain: rm-testcache
cd interchaintest && go test -race -v -run ^TestWormchain$$ ./...
.PHONY: ictest-wormchain

ictest-ibc-receiver: rm-testcache
cd interchaintest && go test -race -v -run ^TestIbcReceiver ./...
.PHONY: ictest-ibc-receiver

ictest-cw-wormhole: rm-testcache
cd interchaintest && go test -race -v -run ^TestCWWormhole ./...
.PHONY: ictest-cw-wormhole

.PHONY: ictest-cancel-upgrade ictest-malformed-payload ictest-slashing-params-update-vaa ictest-upgrade-failure ictest-upgrade ictest-wormchain ictest-ibc-receiver ictest-cw-wormhole
ictest-validator-hotswap: rm-testcache
cd interchaintest && go test -race -v -run ^TestValidatorHotswap$$ ./...
.PHONY: ictest-validator-hotswap
2 changes: 1 addition & 1 deletion wormchain/interchaintest/cw_wormhole_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func createSingleNodeCluster(t *testing.T, wormchainVersion string, guardians gu
numFullNodes := 0

wormchainConfig.Images[0].Version = wormchainVersion
wormchainConfig.ModifyGenesis = ModifyGenesis(votingPeriod, maxDepositPeriod, guardians, true)
wormchainConfig.ModifyGenesis = ModifyGenesis(votingPeriod, maxDepositPeriod, guardians, numWormchainVals, true)

cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{
{
Expand Down
Loading

0 comments on commit a785322

Please sign in to comment.