Skip to content

Commit

Permalink
Node: Remove Monad Devnet support (#4248)
Browse files Browse the repository at this point in the history
  • Loading branch information
bruce-riley authored Jan 28, 2025
1 parent c888252 commit 65ac0c4
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 119 deletions.
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 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

0 comments on commit 65ac0c4

Please sign in to comment.