Node: remove support for Ropsten (#1818)
* Node: Remove support for Ropsten * Node: Remove support for Ropsten * Fix build error
This commit is contained in:
parent
3b8683f18e
commit
61454a39bd
|
@ -119,8 +119,6 @@ func chainIdToCoinGeckoPlatform(chain vaa.ChainID) string {
|
|||
return "" // TODO: not currently supported
|
||||
case vaa.ChainIDXpla:
|
||||
return "" // TODO: not currently supported
|
||||
case vaa.ChainIDEthereumRopsten:
|
||||
return "ethereum"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
|
|
@ -58,7 +58,6 @@ func transformHexAddressToNative(chain vaa.ChainID, address string) string {
|
|||
vaa.ChainIDPolygon,
|
||||
vaa.ChainIDAvalanche,
|
||||
vaa.ChainIDOasis,
|
||||
vaa.ChainIDEthereumRopsten,
|
||||
vaa.ChainIDAurora,
|
||||
vaa.ChainIDFantom,
|
||||
vaa.ChainIDKarura,
|
||||
|
|
|
@ -45,7 +45,6 @@ var nftEmitters = map[string]string{
|
|||
"00000000000000000000000051a02d0dcb5e52F5b92bdAA38FA013C91c7309A9": "0x51a02d0dcb5e52F5b92bdAA38FA013C91c7309A9", // polygon
|
||||
"000000000000000000000000D601BAf2EEE3C028344471684F6b27E789D9075D": "0xD601BAf2EEE3C028344471684F6b27E789D9075D", // avalanche
|
||||
"000000000000000000000000C5c25B41AB0b797571620F5204Afa116A44c0ebA": "0xC5c25B41AB0b797571620F5204Afa116A44c0ebA", // oasis
|
||||
"0000000000000000000000002b048Da40f69c8dc386a56705915f8E966fe1eba": "0x2b048Da40f69c8dc386a56705915f8E966fe1eba", // ethereum ropsten
|
||||
}
|
||||
var muNFTEmitters sync.RWMutex
|
||||
|
||||
|
@ -81,7 +80,6 @@ var tokenTransferEmitters = map[string]string{
|
|||
"000000000000000000000000377D55a7928c046E18eEbb61977e714d2a76472a": "0x377D55a7928c046E18eEbb61977e714d2a76472a", // polygon
|
||||
"00000000000000000000000061E44E506Ca5659E6c0bba9b678586fA2d729756": "0x61E44E506Ca5659E6c0bba9b678586fA2d729756", // avalanche
|
||||
"00000000000000000000000088d8004A9BdbfD9D28090A02010C19897a29605c": "0x88d8004A9BdbfD9D28090A02010C19897a29605c", // oasis
|
||||
"000000000000000000000000F174F9A837536C449321df1Ca093Bb96948D5386": "0xF174F9A837536C449321df1Ca093Bb96948D5386", // ethereum ropsten
|
||||
"9e28beafa966b2407bffb0d48651e94972a56e69f3c0897d9e8facbdaeb98386": "terra1nc5tatafv6eyq7llkr2gv50ff9e22mnf70qgjlv737ktmt4eswrquka9l6", // terra2
|
||||
"8edf5b0e108c3a1a0a4b704cc89591f2ad8d50df24e991567e640ed720a94be2": "6", // algorand
|
||||
}
|
||||
|
|
|
@ -281,8 +281,6 @@ func chainIdStringToType(chainId string) vaa.ChainID {
|
|||
return vaa.ChainIDAptos
|
||||
case "28":
|
||||
return vaa.ChainIDXpla
|
||||
case "10001":
|
||||
return vaa.ChainIDEthereumRopsten
|
||||
}
|
||||
return vaa.ChainIDUnset
|
||||
}
|
||||
|
|
|
@ -66,16 +66,6 @@ func runListNodes(cmd *cobra.Command, args []string) {
|
|||
|
||||
log.Printf("%d nodes in guardian state set", len(nodes))
|
||||
|
||||
// Check if any node is sending Ropsten metrics
|
||||
var isTestnet bool
|
||||
for _, node := range nodes {
|
||||
for _, network := range node.RawHeartbeat.Networks {
|
||||
if vaa.ChainID(network.Id) == vaa.ChainIDEthereumRopsten {
|
||||
isTestnet = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
w := tabwriter.NewWriter(os.Stdout, 0, 8, 2, ' ', 0)
|
||||
|
||||
headers := []string{
|
||||
|
@ -118,17 +108,11 @@ func runListNodes(cmd *cobra.Command, args []string) {
|
|||
{"Moonbeam", vaa.ChainIDMoonbeam},
|
||||
{"Arbitrum", vaa.ChainIDArbitrum},
|
||||
{"Xpla", vaa.ChainIDXpla},
|
||||
{"Injective", vaa.ChainIDInjective},
|
||||
{"Neon", vaa.ChainIDNeon},
|
||||
{"Wormchain", vaa.ChainIDWormchain},
|
||||
}
|
||||
|
||||
if isTestnet {
|
||||
networks = append(networks, network{"Ropsten", vaa.ChainIDEthereumRopsten})
|
||||
networks = append(networks, network{"Neon", vaa.ChainIDNeon})
|
||||
networks = append(networks, network{"Injective", vaa.ChainIDInjective})
|
||||
networks = append(networks, network{"Arbitrum", vaa.ChainIDArbitrum})
|
||||
networks = append(networks, network{"XPLA", vaa.ChainIDXpla})
|
||||
}
|
||||
|
||||
if len(only) > 0 {
|
||||
var filtered []network
|
||||
for _, network := range networks {
|
||||
|
|
|
@ -78,9 +78,6 @@ var (
|
|||
polygonRPC *string
|
||||
polygonContract *string
|
||||
|
||||
ethRopstenRPC *string
|
||||
ethRopstenContract *string
|
||||
|
||||
auroraRPC *string
|
||||
auroraContract *string
|
||||
|
||||
|
@ -207,9 +204,6 @@ func init() {
|
|||
polygonRPC = NodeCmd.Flags().String("polygonRPC", "", "Polygon RPC URL")
|
||||
polygonContract = NodeCmd.Flags().String("polygonContract", "", "Polygon contract address")
|
||||
|
||||
ethRopstenRPC = NodeCmd.Flags().String("ethRopstenRPC", "", "Ethereum Ropsten RPC URL")
|
||||
ethRopstenContract = NodeCmd.Flags().String("ethRopstenContract", "", "Ethereum Ropsten contract address")
|
||||
|
||||
avalancheRPC = NodeCmd.Flags().String("avalancheRPC", "", "Avalanche RPC URL")
|
||||
avalancheContract = NodeCmd.Flags().String("avalancheContract", "", "Avalanche contract address")
|
||||
|
||||
|
@ -283,7 +277,7 @@ func init() {
|
|||
logLevel = NodeCmd.Flags().String("logLevel", "info", "Logging level (debug, info, warn, error, dpanic, panic, fatal)")
|
||||
|
||||
unsafeDevMode = NodeCmd.Flags().Bool("unsafeDevMode", false, "Launch node in unsafe, deterministic devnet mode")
|
||||
testnetMode = NodeCmd.Flags().Bool("testnetMode", false, "Launch node in testnet mode (enables testnet-only features like Ropsten)")
|
||||
testnetMode = NodeCmd.Flags().Bool("testnetMode", false, "Launch node in testnet mode (enables testnet-only features)")
|
||||
devNumGuardians = NodeCmd.Flags().Uint("devNumGuardians", 5, "Number of devnet guardians to include in guardian set")
|
||||
nodeName = NodeCmd.Flags().String("nodeName", "", "Node name to announce in gossip heartbeats")
|
||||
|
||||
|
@ -571,12 +565,6 @@ func runNode(cmd *cobra.Command, args []string) {
|
|||
}
|
||||
|
||||
if *testnetMode {
|
||||
if *ethRopstenRPC == "" {
|
||||
logger.Fatal("Please specify --ethRopstenRPC")
|
||||
}
|
||||
if *ethRopstenContract == "" {
|
||||
logger.Fatal("Please specify --ethRopstenContract")
|
||||
}
|
||||
if *neonRPC == "" {
|
||||
logger.Fatal("Please specify --neonRPC")
|
||||
}
|
||||
|
@ -593,12 +581,6 @@ func runNode(cmd *cobra.Command, args []string) {
|
|||
logger.Fatal("Please specify --injectiveContract")
|
||||
}
|
||||
} else {
|
||||
if *ethRopstenRPC != "" {
|
||||
logger.Fatal("Please do not specify --ethRopstenRPC in non-testnet mode")
|
||||
}
|
||||
if *ethRopstenContract != "" {
|
||||
logger.Fatal("Please do not specify --ethRopstenContract in non-testnet mode")
|
||||
}
|
||||
if *neonRPC != "" && !*unsafeDevMode {
|
||||
logger.Fatal("Please do not specify --neonRPC")
|
||||
}
|
||||
|
@ -714,7 +696,6 @@ func runNode(cmd *cobra.Command, args []string) {
|
|||
ethContractAddr := eth_common.HexToAddress(*ethContract)
|
||||
bscContractAddr := eth_common.HexToAddress(*bscContract)
|
||||
polygonContractAddr := eth_common.HexToAddress(*polygonContract)
|
||||
ethRopstenContractAddr := eth_common.HexToAddress(*ethRopstenContract)
|
||||
avalancheContractAddr := eth_common.HexToAddress(*avalancheContract)
|
||||
oasisContractAddr := eth_common.HexToAddress(*oasisContract)
|
||||
auroraContractAddr := eth_common.HexToAddress(*auroraContract)
|
||||
|
@ -1148,15 +1129,6 @@ func runNode(cmd *cobra.Command, args []string) {
|
|||
}
|
||||
|
||||
if *testnetMode {
|
||||
if shouldStart(ethRopstenRPC) {
|
||||
logger.Info("Starting Eth Ropsten watcher")
|
||||
readiness.RegisterComponent(common.ReadinessEthRopstenSyncing)
|
||||
chainObsvReqC[vaa.ChainIDEthereumRopsten] = make(chan *gossipv1.ObservationRequest, observationRequestBufferSize)
|
||||
if err := supervisor.Run(ctx, "ethropstenwatch",
|
||||
evm.NewEthWatcher(*ethRopstenRPC, ethRopstenContractAddr, "ethropsten", common.ReadinessEthRopstenSyncing, vaa.ChainIDEthereumRopsten, lockC, nil, 1, chainObsvReqC[vaa.ChainIDEthereumRopsten], *unsafeDevMode, nil).Run); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if shouldStart(neonRPC) {
|
||||
logger.Info("Starting Neon watcher")
|
||||
readiness.RegisterComponent(common.ReadinessNeonSyncing)
|
||||
|
|
|
@ -11,7 +11,6 @@ const (
|
|||
ReadinessAptosSyncing readiness.Component = "aptosSyncing"
|
||||
ReadinessBSCSyncing readiness.Component = "bscSyncing"
|
||||
ReadinessPolygonSyncing readiness.Component = "polygonSyncing"
|
||||
ReadinessEthRopstenSyncing readiness.Component = "ethRopstenSyncing"
|
||||
ReadinessAvalancheSyncing readiness.Component = "avalancheSyncing"
|
||||
ReadinessOasisSyncing readiness.Component = "oasisSyncing"
|
||||
ReadinessAuroraSyncing readiness.Component = "auroraSyncing"
|
||||
|
|
|
@ -36,9 +36,6 @@ enum ChainID {
|
|||
CHAIN_ID_GNOSIS = 25;
|
||||
CHAIN_ID_PYTHNET = 26;
|
||||
CHAIN_ID_XPLA = 28;
|
||||
// Special case - Eth has two testnets. CHAIN_ID_ETHEREUM is Goerli,
|
||||
// but we also want to connect to Ropsten, so we add a separate chain.
|
||||
CHAIN_ID_ETHEREUM_ROPSTEN = 10001;
|
||||
}
|
||||
|
||||
// MessageID is a VAA's globally unique identifier (see data availability design document).
|
||||
|
|
|
@ -29,7 +29,6 @@ var knownTestnetTokenbridgeEmitters = map[vaa.ChainID]string{
|
|||
vaa.ChainIDArbitrum: "00000000000000000000000023908A62110e21C04F3A4e011d24F901F911744A",
|
||||
vaa.ChainIDNeon: "000000000000000000000000c7a204bdbfe983fcd8d8e61d02b475d4073ff97e",
|
||||
vaa.ChainIDXpla: "b66da121bd3621c8d2604c08c82965640fe682d606af26a302ee09094f5e62cf",
|
||||
vaa.ChainIDEthereumRopsten: "000000000000000000000000F174F9A837536C449321df1Ca093Bb96948D5386",
|
||||
}
|
||||
|
||||
// KnownTestnetNFTBridgeEmitters is a map of known NFT emitters on the various L1 testnets.
|
||||
|
@ -50,5 +49,4 @@ var knownTestnetNFTBridgeEmitters = map[vaa.ChainID]string{
|
|||
vaa.ChainIDMoonbeam: "00000000000000000000000098a0f4b96972b32fcb3bd03caeb66a44a6ab9edb",
|
||||
vaa.ChainIDArbitrum: "000000000000000000000000Ee3dB83916Ccdc3593b734F7F2d16D630F39F1D0",
|
||||
vaa.ChainIDNeon: "00000000000000000000000023908a62110e21c04f3a4e011d24f901f911744a",
|
||||
vaa.ChainIDEthereumRopsten: "0000000000000000000000002b048da40f69c8dc386a56705915f8e966fe1eba",
|
||||
}
|
||||
|
|
|
@ -168,8 +168,6 @@ func (c ChainID) String() string {
|
|||
return "aptos"
|
||||
case ChainIDSui:
|
||||
return "sui"
|
||||
case ChainIDEthereumRopsten:
|
||||
return "ethereum-ropsten"
|
||||
case ChainIDKarura:
|
||||
return "karura"
|
||||
case ChainIDAcala:
|
||||
|
@ -229,8 +227,6 @@ func ChainIDFromString(s string) (ChainID, error) {
|
|||
return ChainIDSui, nil
|
||||
case "aptos":
|
||||
return ChainIDAptos, nil
|
||||
case "ethereum-ropsten":
|
||||
return ChainIDEthereumRopsten, nil
|
||||
case "karura":
|
||||
return ChainIDKarura, nil
|
||||
case "acala":
|
||||
|
@ -313,9 +309,6 @@ const (
|
|||
//ChainIDWormchain is the ChainID of Wormchain
|
||||
ChainIDWormchain ChainID = 3104
|
||||
|
||||
// ChainIDEthereumRopsten is the ChainID of Ethereum Ropsten
|
||||
ChainIDEthereumRopsten ChainID = 10001
|
||||
|
||||
// Minimum VAA size is derrived from the following assumptions:
|
||||
// HEADER
|
||||
// - Supported VAA Version (1 byte)
|
||||
|
|
|
@ -47,7 +47,6 @@ func TestChainIDFromString(t *testing.T) {
|
|||
{input: "injective", output: ChainIDInjective},
|
||||
{input: "arbitrum", output: ChainIDArbitrum},
|
||||
{input: "xpla", output: ChainIDXpla},
|
||||
{input: "ethereum-ropsten", output: ChainIDEthereumRopsten},
|
||||
|
||||
{input: "Solana", output: ChainIDSolana},
|
||||
{input: "Ethereum", output: ChainIDEthereum},
|
||||
|
@ -72,7 +71,6 @@ func TestChainIDFromString(t *testing.T) {
|
|||
{input: "Injective", output: ChainIDInjective},
|
||||
{input: "Arbitrum", output: ChainIDArbitrum},
|
||||
{input: "XPLA", output: ChainIDXpla},
|
||||
{input: "Ethereum-ropsten", output: ChainIDEthereumRopsten},
|
||||
{input: "Wormchain", output: ChainIDWormchain},
|
||||
{input: "wormchain", output: ChainIDWormchain},
|
||||
}
|
||||
|
@ -169,7 +167,6 @@ func TestChainId_String(t *testing.T) {
|
|||
{input: 22, output: "aptos"},
|
||||
{input: 23, output: "arbitrum"},
|
||||
{input: 28, output: "xpla"},
|
||||
{input: 10001, output: "ethereum-ropsten"},
|
||||
{input: 3104, output: "wormchain"},
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue