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

test validator write stake account to JSON #33014

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

buffalojoec
Copy link
Contributor

@buffalojoec buffalojoec commented Aug 27, 2023

Problem

The test validator writes its validator identity and vote account to JSON files on startup, but it doesn't do this for its stake account.

Summary of Changes

Write the stake account to JSON on startup.

@steviez
Copy link
Contributor

steviez commented Aug 31, 2023

Not that it is necessarily a problem, but curious about the motivation for this. A real validator has identity and vote account key pairs, and any stake accounts would be either:

  • A stake account owned by operator whose key shouldn't exist on same machine for sake of operational security OR
  • A stake account owned by a delegator whose key definitely doesn't on the machine

@buffalojoec
Copy link
Contributor Author

Not that it is necessarily a problem, but curious about the motivation for this. A real validator has identity and vote account key pairs, and any stake accounts would be either:

  • A stake account owned by operator whose key shouldn't exist on same machine for sake of operational security OR
  • A stake account owned by a delegator whose key definitely doesn't on the machine

That's fair but in the case of a test validator I think it makes sense to be able to access any and all keypairs that operate the machine - that you as the node operator would otherwise be in control of in some fashion.

Specifically, in Web3 JS land, we are looking for the keypair (or even an emitted pubkey) to test our RPC API
https://github.com/buffalojoec/solana-web3.js/blob/account-fixtures-in-tests/packages/rpc-core/src/rpc-methods/__tests__/get-program-accounts-test.ts#L17
https://github.com/buffalojoec/solana-web3.js/blob/account-fixtures-in-tests/packages/rpc-core/src/rpc-methods/__tests__/get-program-accounts-test.ts#L898

@steviez
Copy link
Contributor

steviez commented Sep 1, 2023

Specifically, in Web3 JS land, we are looking for the keypair (or even an emitted pubkey) to test our RPC API

👍

@buffalojoec buffalojoec merged commit 72706d6 into solana-labs:master Sep 1, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants