diff --git a/Makefile b/Makefile index c9fd95d65..eb9776069 100644 --- a/Makefile +++ b/Makefile @@ -166,38 +166,39 @@ test-iex: # NODE RUNNERS DISCOVERY_PORT ?= 9009 METRICS_PORT ?= 9568 +MODE ?= full #▶️ mainnet: @ Run an interactive terminal using checkpoint sync for mainnet. mainnet: compile-all - iex -S mix run -- --checkpoint-sync-url https://mainnet-checkpoint-sync.stakely.io/ --metrics --metrics-port $(METRICS_PORT) --discovery-port $(DISCOVERY_PORT) + iex -S mix run -- --checkpoint-sync-url https://mainnet-checkpoint-sync.stakely.io/ --metrics --metrics-port $(METRICS_PORT) --discovery-port $(DISCOVERY_PORT) --mode $(MODE) #▶️ mainnet.logfile: @ Run an interactive terminal using checkpoint sync for mainnet with a log file. mainnet.logfile: compile-all - iex -S mix run -- --checkpoint-sync-url https://mainnet-checkpoint-sync.stakely.io/ --metrics --metrics-port $(METRICS_PORT) --log-file ./logs/mainnet.log --discovery-port $(DISCOVERY_PORT) + iex -S mix run -- --checkpoint-sync-url https://mainnet-checkpoint-sync.stakely.io/ --metrics --metrics-port $(METRICS_PORT) --log-file ./logs/mainnet.log --discovery-port $(DISCOVERY_PORT) --mode $(MODE) #▶️ sepolia: @ Run an interactive terminal using sepolia network sepolia: compile-all - iex -S mix run -- --checkpoint-sync-url https://sepolia.beaconstate.info --network sepolia --metrics --metrics-port $(METRICS_PORT) --discovery-port $(DISCOVERY_PORT) + iex -S mix run -- --checkpoint-sync-url https://sepolia.beaconstate.info --network sepolia --metrics --metrics-port $(METRICS_PORT) --discovery-port $(DISCOVERY_PORT) --mode $(MODE) #▶️ sepolia.logfile: @ Run an interactive terminal using sepolia network with a log file sepolia.logfile: compile-all - iex -S mix run -- --checkpoint-sync-url https://sepolia.beaconstate.info --network sepolia --metrics --metrics-port $(METRICS_PORT) --log-file ./logs/sepolia.log --discovery-port $(DISCOVERY_PORT) + iex -S mix run -- --checkpoint-sync-url https://sepolia.beaconstate.info --network sepolia --metrics --metrics-port $(METRICS_PORT) --log-file ./logs/sepolia.log --discovery-port $(DISCOVERY_PORT) --mode $(MODE) #▶️ holesky: @ Run an interactive terminal using holesky network holesky: compile-all - iex -S mix run -- --checkpoint-sync-url https://checkpoint-sync.holesky.ethpandaops.io --network holesky --metrics --metrics-port $(METRICS_PORT) --discovery-port $(DISCOVERY_PORT) + iex -S mix run -- --checkpoint-sync-url https://checkpoint-sync.holesky.ethpandaops.io --network holesky --metrics --metrics-port $(METRICS_PORT) --discovery-port $(DISCOVERY_PORT) --mode $(MODE) #▶️ holesky.logfile: @ Run an interactive terminal using holesky network with a log file holesky.logfile: compile-all - iex -S mix run -- --checkpoint-sync-url https://checkpoint-sync.holesky.ethpandaops.io --network holesky --log-file ./logs/holesky.log --metrics --metrics-port $(METRICS_PORT) --discovery-port $(DISCOVERY_PORT) + iex -S mix run -- --checkpoint-sync-url https://checkpoint-sync.holesky.ethpandaops.io --network holesky --log-file ./logs/holesky.log --metrics --metrics-port $(METRICS_PORT) --discovery-port $(DISCOVERY_PORT) --mode $(MODE) #▶️ gnosis: @ Run an interactive terminal using gnosis network gnosis: compile-all - iex -S mix run -- --checkpoint-sync-url https://checkpoint.gnosischain.com --network gnosis --metrics --metrics-port $(METRICS_PORT) --discovery-port $(DISCOVERY_PORT) + iex -S mix run -- --checkpoint-sync-url https://checkpoint.gnosischain.com --network gnosis --metrics --metrics-port $(METRICS_PORT) --discovery-port $(DISCOVERY_PORT) --mode $(MODE) #▶️ gnosis.logfile: @ Run an interactive terminal using gnosis network with a log file gnosis.logfile: compile-all - iex -S mix run -- --checkpoint-sync-url https://checkpoint.gnosischain.com --network gnosis --metrics --metrics-port $(METRICS_PORT) --log-file ./logs/gnosis.log --discovery-port $(DISCOVERY_PORT) + iex -S mix run -- --checkpoint-sync-url https://checkpoint.gnosischain.com --network gnosis --metrics --metrics-port $(METRICS_PORT) --log-file ./logs/gnosis.log --discovery-port $(DISCOVERY_PORT) --mode $(MODE) #▶️ checkpoint-sync: @ Run an interactive terminal using checkpoint sync for mainnet. checkpoint-sync: mainnet diff --git a/lib/lambda_ethereum_consensus/application.ex b/lib/lambda_ethereum_consensus/application.ex index dc89954be..41607a126 100644 --- a/lib/lambda_ethereum_consensus/application.ex +++ b/lib/lambda_ethereum_consensus/application.ex @@ -33,7 +33,7 @@ defmodule LambdaEthereumConsensus.Application do :ok end - defp get_children(:db) do + defp get_children(:mixed) do CheckpointStates.new() [ @@ -43,8 +43,14 @@ defmodule LambdaEthereumConsensus.Application do ] end + defp get_children(:db) do + get_children(:mixed) ++ [ + {Task.Supervisor, name: StoreStatesSupervisor} + ] + end + defp get_children(:full) do - get_children(:db) ++ + get_children(:mixed) ++ [ BeaconApi.Endpoint, KeyStoreApi.Endpoint,