Skip to content

Commit 29e3eaa

Browse files
authored
chore: append "-url" to "checkpoint-sync" flag (#731)
1 parent e01f275 commit 29e3eaa

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ jobs:
169169
run: mix compile --warnings-as-errors
170170
- name: Run the node
171171
# NOTE: this starts and then stops the application. It should catch simple runtime errors
172-
run: mix run -- --checkpoint-sync https://sync-mainnet.beaconcha.in/
172+
run: mix run -- --checkpoint-sync-url https://sync-mainnet.beaconcha.in/
173173

174174
test:
175175
name: Test

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ iex: compile-all
116116

117117
#▶️ checkpoint-sync: @ Run an interactive terminal using checkpoint sync.
118118
checkpoint-sync: compile-all
119-
iex -S mix run -- --checkpoint-sync https://sync-mainnet.beaconcha.in/
119+
iex -S mix run -- --checkpoint-sync-url https://sync-mainnet.beaconcha.in/
120120

121121
#▶️ sepolia: @ Run an interactive terminal using sepolia network
122122
sepolia: compile-all
123-
iex -S mix run -- --checkpoint-sync https://sepolia.beaconstate.info --network sepolia
123+
iex -S mix run -- --checkpoint-sync-url https://sepolia.beaconstate.info --network sepolia
124124

125125
#🔴 test: @ Run tests
126126
test: compile-all

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ The iex terminal can be closed by pressing ctrl+c two times.
7878
### Checkpoint Sync
7979

8080
You can also sync from a checkpoint given by a trusted third-party.
81-
For that, get the URL that serves the checkpoint, and pass it to the node with the "--checkpoint-sync" flag:
81+
You can specify a URL to fetch it from with the "--checkpoint-sync-url" flag:
8282

8383
```shell
84-
iex -S mix run -- --checkpoint-sync <your_url_here>
84+
iex -S mix run -- --checkpoint-sync-url <your_url_here>
8585
```
8686

8787
Some public endpoints can be found in [eth-clients.github.io/checkpoint-sync-endpoints](https://eth-clients.github.io/checkpoint-sync-endpoints/).

config/runtime.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Config
22

33
switches = [
44
network: :string,
5-
checkpoint_sync: :string,
5+
checkpoint_sync_url: :string,
66
execution_endpoint: :string,
77
execution_jwt: :string,
88
mock_execution: :boolean,
@@ -23,12 +23,12 @@ if not is_testing and not Enum.empty?(remaining_args) do
2323
end
2424

2525
network = Keyword.get(args, :network, "mainnet")
26-
checkpoint_sync = Keyword.get(args, :checkpoint_sync)
26+
checkpoint_sync_url = Keyword.get(args, :checkpoint_sync_url)
2727
execution_endpoint = Keyword.get(args, :execution_endpoint, "http://localhost:8551")
2828
jwt_path = Keyword.get(args, :execution_jwt)
2929

3030
config :lambda_ethereum_consensus, LambdaEthereumConsensus.ForkChoice,
31-
checkpoint_sync: checkpoint_sync
31+
checkpoint_sync_url: checkpoint_sync_url
3232

3333
configs_per_network = %{
3434
"minimal" => MinimalConfig,

lib/lambda_ethereum_consensus/application.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ defmodule LambdaEthereumConsensus.Application do
4949

5050
def checkpoint_sync_url do
5151
Application.fetch_env!(:lambda_ethereum_consensus, LambdaEthereumConsensus.ForkChoice)
52-
|> Keyword.fetch!(:checkpoint_sync)
52+
|> Keyword.fetch!(:checkpoint_sync_url)
5353
end
5454

5555
defp get_operation_mode do

lib/lambda_ethereum_consensus/beacon/beacon_node.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ defmodule LambdaEthereumConsensus.Beacon.BeaconNode do
2626

2727
:not_found ->
2828
Logger.error(
29-
"[Sync] No initial state or block found. Please specify the URL to fetch them from via the --checkpoint-sync flag"
29+
"[Sync] No initial state or block found. Please specify the URL to fetch them from via the --checkpoint-sync-url flag"
3030
)
3131

3232
System.stop(1)

lib/lambda_ethereum_consensus/beacon/checkpoint_sync.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ defmodule LambdaEthereumConsensus.Beacon.CheckpointSync do
1010
@doc """
1111
Safely retrieves the last finalized state and block
1212
"""
13-
@spec get_state(String.t()) ::
13+
@spec get_finalized_block_and_state(String.t()) ::
1414
{:ok, {Types.BeaconState.t(), Types.SignedBeaconBlock.t()}} | {:error, any()}
1515
def get_finalized_block_and_state(url) do
1616
tasks = [Task.async(__MODULE__, :get_state, [url]), Task.async(__MODULE__, :get_block, [url])]

0 commit comments

Comments
 (0)