-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Config Change] Multi exec servers #2267
Merged
Merged
Changes from 3 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
610ca21
ValidationSpawner: add WasmModuleRoots function
tsahee 07c0e29
locator: stop on the first found rootPath
tsahee 7328f6a
[Config Change] rpc is for execution-client. can have multiple
tsahee 46106b9
update testnode
tsahee ae3b528
no warning on failing to get module-roots
tsahee 048f55b
add nitro-node-split docker
tsahee 740d6c2
block_validator config: fix bug in loop
tsahee 0f9ee2a
Config: rename ExecutionServer back to Validation + nits
tsahee ebaa171
nitro-node-split docker fixes
tsahee 54f0674
testnode: remove previous change
tsahee 260d14a
Merge branch 'master' into multi-exec-servers
PlasmaPower File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
xxd -l 32 -ps -c 40 /dev/urandom > /tmp/nitro-val.jwt | ||
echo launching validation | ||
/usr/local/bin/nitro-val --file-logging.file nitro-val.log --auth.addr 127.0.0.10 --auth.origins 127.0.0.1 --auth.jwtsecret /tmp/nitro-val.jwt --auth.port 2000 & | ||
sleep 2 | ||
|
||
echo launching validation servers | ||
# To add validation server: | ||
# > launch them here with a different port and --validation.wasm.root-path | ||
# add their port to wait loop | ||
# edit validation-server-configs-list to include the other nodes | ||
/usr/local/bin/nitro-val --file-logging.enable=false --auth.addr 127.0.0.10 --auth.origins 127.0.0.1 --auth.jwtsecret /tmp/nitro-val.jwt --auth.port 52000 & | ||
for port in 52000; do | ||
while ! nc -w1 -z 127.0.0.10 $port; do | ||
echo waiting for validation port $port | ||
sleep 1 | ||
done | ||
done | ||
echo launching nitro-node | ||
/usr/local/bin/nitro --node.block-validator.execution-server.jwtsecret /tmp/nitro-val.jwt --node.block-validator.execution-server.url http://127.0.0.10:2000 "$@" | ||
/usr/local/bin/nitro --node.block-validator.pending-upgrade-module-root="0x8b104a2e80ac6165dc58b9048de12f301d70b02a0ab51396c22b4b4b802a16a4" --node.block-validator.validation-server-configs-list='[{"jwtsecret":"/tmp/nitro-val.jwt","url":"http://127.0.0.10:52000"}]' "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -199,10 +199,10 @@ func NewStatelessBlockValidator( | |
return nil, fmt.Errorf("creating new redis validation client: %w", err) | ||
} | ||
} | ||
configs := config().ExecutionServerConfigs | ||
configs := config().ValidationServerConfigs | ||
for i := range configs { | ||
i := i | ||
confFetcher := func() *rpcclient.ClientConfig { return &config().ExecutionServerConfigs[i] } | ||
confFetcher := func() *rpcclient.ClientConfig { return &config().ValidationServerConfigs[i] } | ||
executionSpawners = append(executionSpawners, validatorclient.NewExecutionClient(confFetcher, stack)) | ||
} | ||
|
||
|
@@ -398,7 +398,7 @@ func (v *StatelessBlockValidator) ValidateResult( | |
} | ||
} | ||
if run == nil { | ||
return false, &entry.End, errors.New("this validation not supported by node") | ||
return false, nil, fmt.Errorf("validation woth WasmModuleRoot %v not supported by node", moduleRoot) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: woth -> with |
||
} | ||
defer run.Cancel() | ||
gsEnd, err := run.Await(ctx) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should remove the apt cache after this