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

RPCChainVM Improvements #3631

Open
aaronbuchwald opened this issue Jan 2, 2025 · 0 comments
Open

RPCChainVM Improvements #3631

aaronbuchwald opened this issue Jan 2, 2025 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@aaronbuchwald
Copy link
Collaborator

The RPCChainVM allows AvalancheGo to run a VM over gRPC rather than being registered within the AvalancheGo binary.

There are a few features or expectations that the RPCChainVM does not maintain that should either be fixed or explicitly documented for VM developers.

Discrepancies

Snow Ctx Lock

The snow context lock is held by the consensus engine while processing any message except for explicitly async App-specific messages. However, this lock is not transmitted over gRPC.

You can see the *snow.Context type created and passed in to the VM server is not populated, which provides a fresh default value for the lock that is unrelated to the lock held by the consensus engine:

if err := vm.vm.Initialize(ctx, vm.ctx, vm.db, req.GenesisBytes, req.UpgradeBytes, req.ConfigBytes, toEngine, nil, appSenderClient); err != nil {

Snow Log

The log passed in to the VM is always configured at the info level:

// TODO: Allow the logger to be configured by the client

Ideally, this would inherit the log level from AvalancheGo by default. Alternatively, we should make it explicit that it's disconnected from AvalancheGo and the VM must configure the log level itself.

@aaronbuchwald aaronbuchwald added enhancement New feature or request good first issue Good for newcomers labels Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant