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
4dd2ab9d
Commit
4dd2ab9d
authored
Nov 07, 2022
by
Gyanendra Mishra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enabled optional fields
parent
9ef5e2d6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
parse_input.star
src/module_io/parse_input.star
+16
-2
types.proto
types.proto
+1
-1
No files found.
src/module_io/parse_input.star
View file @
4dd2ab9d
...
@@ -16,12 +16,26 @@ DEFAULT_CL_IMAGES = {
...
@@ -16,12 +16,26 @@ DEFAULT_CL_IMAGES = {
BESU_NODE_NAME = "besu"
BESU_NODE_NAME = "besu"
NETHERMIND_NODE_NAME = "nethermind"
NETHERMIND_NODE_NAME = "nethermind"
LAUNCH_ADDITIONAL_ATTR = "launch_additional_services"
def parse_input(input_args):
def parse_input(input_args):
default_input = default_module_input()
default_input = default_module_input()
result = {}
result = {}
for attr in dir(input_args):
for attr in dir(input_args):
value = getattr(input_args, attr)
value = getattr(input_args, attr)
if type(value) == "int" and value == 0:
print(value, type(value), attr, type(attr))
# this is a builtin attribute we don't care about
if attr == "descriptor":
continue
# if there's an optional that exists don't change anything just move on
elif attr == LAUNCH_ADDITIONAL_ATTR:
if proto.has(input_args, LAUNCH_ADDITIONAL_ATTR):
result[attr] = value
else:
result[attr] = default_input[attr]
elif type(value) == "bool" and value == False:
result[attr] = default_input[attr]
elif type(value) == "int" and value == 0:
result[attr] = default_input[attr]
result[attr] = default_input[attr]
elif type(value) == "string" and value == "":
elif type(value) == "string" and value == "":
result[attr] = default_input[attr]
result[attr] = default_input[attr]
...
@@ -128,7 +142,7 @@ def default_module_input():
...
@@ -128,7 +142,7 @@ def default_module_input():
return {
return {
"participants": participants,
"participants": participants,
"network_params": network_params,
"network_params": network_params,
"dont_launch_additional_services": Fals
e,
LAUNCH_ADDITIONAL_ATTR: Tru
e,
"wait_for_finalization": False,
"wait_for_finalization": False,
"wait_for_verifications": False,
"wait_for_verifications": False,
"verifications_epoch_limit": 5,
"verifications_epoch_limit": 5,
...
...
types.proto
View file @
4dd2ab9d
...
@@ -18,7 +18,7 @@ message ModuleInput {
...
@@ -18,7 +18,7 @@ message ModuleInput {
// This is a hack - it's not very elegant - but this is a commonly-requested feature
// This is a hack - it's not very elegant - but this is a commonly-requested feature
// The longterm solution is making the module trivial to decompose so we don't need flags like this; we're working
// The longterm solution is making the module trivial to decompose so we don't need flags like this; we're working
// on this at the Kurtosis product level
// on this at the Kurtosis product level
bool
dont_
launch_additional_services
=
3
;
optional
bool
launch_additional_services
=
3
;
// If set, the module will block until a finalized epoch has occurred.
// If set, the module will block until a finalized epoch has occurred.
// If `waitForVerifications` is set to true, this extra wait will be skipped.
// If `waitForVerifications` is set to true, this extra wait will be skipped.
...
...
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