Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ethereum-package
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
ethereum-package
Commits
18b141ed
Unverified
Commit
18b141ed
authored
Oct 18, 2023
by
Gyanendra Mishra
Committed by
GitHub
Oct 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: zero count validators and parallel keystore generation (#302)
Co-authored-by:
Barnabas Busa
<
busa.barnabas@gmail.com
>
parent
49596fd4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
92 additions
and
4 deletions
+92
-4
config.yml
.circleci/config.yml
+37
-2
parallel-keystores-1.json
.circleci/tests/parallel-keystores-1.json
+14
-0
parallel-keystores-2.json
.circleci/tests/parallel-keystores-2.json
+14
-0
parallel-keystores-3.json
.circleci/tests/parallel-keystores-3.json
+18
-0
cl_validator_keystore_generator.star
..._validator_keystores/cl_validator_keystore_generator.star
+9
-2
No files found.
.circleci/config.yml
View file @
18b141ed
...
@@ -251,6 +251,25 @@ jobs:
...
@@ -251,6 +251,25 @@ jobs:
-
checkout
-
checkout
-
run
:
kurtosis run ${PWD} "$(cat ./.circleci/tests/mix-with-tools.json)"
-
run
:
kurtosis run ${PWD} "$(cat ./.circleci/tests/mix-with-tools.json)"
parallel_key_store_generation_1
:
executor
:
ubuntu_vm
steps
:
-
<<
:
*setup_kurtosis
-
checkout
-
run
:
kurtosis run ${PWD} "$(cat ./.circleci/tests/parallel-keystores-1.json)"
parallel_key_store_generation_2
:
executor
:
ubuntu_vm
steps
:
-
<<
:
*setup_kurtosis
-
checkout
-
run
:
kurtosis run ${PWD} "$(cat ./.circleci/tests/parallel-keystores-2.json)"
parallel_key_store_generation_3
:
executor
:
ubuntu_vm
steps
:
-
<<
:
*setup_kurtosis
-
checkout
-
run
:
kurtosis run ${PWD} "$(cat ./.circleci/tests/parallel-keystores-3.json)"
workflows
:
workflows
:
check_latest_version
:
check_latest_version
:
when
:
<< pipeline.parameters.should-enable-check-latest-version-workflow >>
when
:
<< pipeline.parameters.should-enable-check-latest-version-workflow >>
...
@@ -301,12 +320,12 @@ workflows:
...
@@ -301,12 +320,12 @@ workflows:
filters
:
filters
:
branches
:
branches
:
ignore
:
ignore
:
-
main
-
main
-
lint
:
-
lint
:
filters
:
filters
:
branches
:
branches
:
ignore
:
ignore
:
-
main
-
main
-
mev
:
-
mev
:
filters
:
filters
:
branches
:
branches
:
...
@@ -325,3 +344,19 @@ workflows:
...
@@ -325,3 +344,19 @@ workflows:
branches
:
branches
:
ignore
:
ignore
:
-
main
-
main
-
parallel_key_store_generation_1
:
filters
:
branches
:
ignore
:
-
main
-
parallel_key_store_generation_2
:
filters
:
branches
:
ignore
:
-
main
-
parallel_key_store_generation_3
:
filters
:
branches
:
ignore
:
-
main
.circleci/tests/parallel-keystores-1.json
0 → 100644
View file @
18b141ed
{
"participants"
:
[
{
"el_client_type"
:
"geth"
,
"cl_client_type"
:
"teku"
},
{
"el_client_type"
:
"geth"
,
"cl_client_type"
:
"teku"
,
"validator_count"
:
0
}
],
"parallel_keystore_generation"
:
true
}
.circleci/tests/parallel-keystores-2.json
0 → 100644
View file @
18b141ed
{
"participants"
:
[
{
"el_client_type"
:
"geth"
,
"cl_client_type"
:
"teku"
,
"validator_count"
:
0
},
{
"el_client_type"
:
"geth"
,
"cl_client_type"
:
"teku"
}
],
"parallel_keystore_generation"
:
true
}
.circleci/tests/parallel-keystores-3.json
0 → 100644
View file @
18b141ed
{
"participants"
:
[
{
"el_client_type"
:
"geth"
,
"cl_client_type"
:
"teku"
},
{
"el_client_type"
:
"geth"
,
"cl_client_type"
:
"teku"
,
"validator_count"
:
0
},
{
"el_client_type"
:
"geth"
,
"cl_client_type"
:
"teku"
}
],
"parallel_keystore_generation"
:
true
}
src/prelaunch_data_generator/cl_validator_keystores/cl_validator_keystore_generator.star
View file @
18b141ed
...
@@ -163,7 +163,9 @@ def generate_cl_valdiator_keystores_in_parallel(plan, mnemonic, participants):
...
@@ -163,7 +163,9 @@ def generate_cl_valdiator_keystores_in_parallel(plan, mnemonic, participants):
for idx, participant in enumerate(participants):
for idx, participant in enumerate(participants):
output_dirpath = NODE_KEYSTORES_OUTPUT_DIRPATH_FORMAT_STR.format(idx)
output_dirpath = NODE_KEYSTORES_OUTPUT_DIRPATH_FORMAT_STR.format(idx)
if participant.validator_count == 0:
if participant.validator_count == 0:
all_output_dirpaths.append(output_dirpath)
all_generation_commands.append(None)
all_output_dirpaths.append(None)
finished_files_to_verify.append(None)
continue
continue
start_index = idx * participant.validator_count
start_index = idx * participant.validator_count
stop_index = (idx + 1) * participant.validator_count
stop_index = (idx + 1) * participant.validator_count
...
@@ -188,6 +190,9 @@ def generate_cl_valdiator_keystores_in_parallel(plan, mnemonic, participants):
...
@@ -188,6 +190,9 @@ def generate_cl_valdiator_keystores_in_parallel(plan, mnemonic, participants):
for idx in range(0, len(participants)):
for idx in range(0, len(participants)):
service_name = service_names[idx]
service_name = service_names[idx]
generation_command = all_generation_commands[idx]
generation_command = all_generation_commands[idx]
if generation_command == None:
# no generation command as validator count is 0
continue
plan.exec(
plan.exec(
recipe=ExecRecipe(
recipe=ExecRecipe(
command=["sh", "-c", generation_command + " >/dev/null 2>&1 &"]
command=["sh", "-c", generation_command + " >/dev/null 2>&1 &"]
...
@@ -199,6 +204,9 @@ def generate_cl_valdiator_keystores_in_parallel(plan, mnemonic, participants):
...
@@ -199,6 +204,9 @@ def generate_cl_valdiator_keystores_in_parallel(plan, mnemonic, participants):
for idx in range(0, len(participants)):
for idx in range(0, len(participants)):
service_name = service_names[idx]
service_name = service_names[idx]
output_dirpath = all_output_dirpaths[idx]
output_dirpath = all_output_dirpaths[idx]
if output_dirpath == None:
# no output dir path as validator count is 0
continue
generation_finished_filepath = finished_files_to_verify[idx]
generation_finished_filepath = finished_files_to_verify[idx]
verificaiton_command = ["ls", generation_finished_filepath]
verificaiton_command = ["ls", generation_finished_filepath]
plan.wait(
plan.wait(
...
@@ -221,7 +229,6 @@ def generate_cl_valdiator_keystores_in_parallel(plan, mnemonic, participants):
...
@@ -221,7 +229,6 @@ def generate_cl_valdiator_keystores_in_parallel(plan, mnemonic, participants):
service_name = service_names[idx]
service_name = service_names[idx]
output_dirpath = all_output_dirpaths[idx]
output_dirpath = all_output_dirpaths[idx]
running_total_validator_count += participant.validator_count
padded_idx = zfill_custom(idx + 1, len(str(len(participants))))
padded_idx = zfill_custom(idx + 1, len(str(len(participants))))
keystore_start_index = running_total_validator_count
keystore_start_index = running_total_validator_count
running_total_validator_count += participant.validator_count
running_total_validator_count += participant.validator_count
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment