Skip to content
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 11 commits into from
May 2, 2024
Merged

[Config Change] Multi exec servers #2267

merged 11 commits into from
May 2, 2024

Conversation

tsahee
Copy link
Contributor

@tsahee tsahee commented Apr 30, 2024

This removes rpc validation-only clients.
Rpc clients will always be execution clients.
Both validation and exec clients can support a list of wasmModuleRoots.
Validations are executed against one client only (per wasmModuleRoot), wich will either be a redis queue or if not found an execution server.

This PR also creates a Docker with split-validation, which only has one validator but will be used as base for multi-validator dockers

tsahee added 3 commits April 29, 2024 20:21
returns all the wasmModuleRoots that the application supports
Multiple rpc-URLs are just for multiple execution client.
Every validation is only run on one validation client per wasmModuleRoot.
Fa
@cla-bot cla-bot bot added the s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA. label Apr 30, 2024
@tsahee
Copy link
Contributor Author

tsahee commented May 1, 2024

Testing with multiple exec servers done in this draft PR: #2268

Dockerfile Show resolved Hide resolved
scripts/split-val-entry.sh Outdated Show resolved Hide resolved
staker/block_validator.go Show resolved Hide resolved
scripts/split-val-entry.sh Outdated Show resolved Hide resolved
staker/block_validator.go Outdated Show resolved Hide resolved
staker/block_validator.go Outdated Show resolved Hide resolved
supported, err := spawner.WasmModuleRoots()
if err != nil {
log.Warn("WasmModuleRoots returned error", "err", err)
return false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case is a bit concerning to me because we'll somewhat silently permanently disable this validator. Shouldn't we return an error here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed scemantics to only require one validation to succeed per wasmModuleRoot. So if one spawner is down for some reason but others can cover for it - it'll work which seems like the right behavior to me. If no spawner is found for a certain root it will error out in a different pace.

staker/block_validator.go Outdated Show resolved Hide resolved
staker/stateless_block_validator.go Outdated Show resolved Hide resolved
staker/stateless_block_validator.go Show resolved Hide resolved
RUN apt-get install -y xxd
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y xxd netcat-traditional
Copy link
Collaborator

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

@@ -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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: woth -> with

Copy link
Collaborator

@PlasmaPower PlasmaPower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get this merged for now, and I'll make a follow-up PR for the small requested changes

@PlasmaPower PlasmaPower enabled auto-merge May 2, 2024 16:35
@PlasmaPower PlasmaPower merged commit b4cc111 into master May 2, 2024
8 checks passed
@PlasmaPower PlasmaPower deleted the multi-exec-servers branch May 2, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants