1

As the title indicates, i'm trying to get the functionality of the getVoteAccounts without relying on the rpc call.

So this method results in 2 arrays: one containing current validatores and another for delinquent ones, along with associated params such as nodePubkey and activatedStake

My goal is to get this data in an on-chain context to validate the signer of an ix with this nodePubkey, validate activatedStake etc

Thank you in advance.

1 Answer 1

1

In my opinion, you cannot fully replicate getVoteAccounts on-chain because Solana programs (smart contracts) cannot directly access or query global account data (like all vote accounts) or perform the complex aggregation and filtering logic provided by the RPC node, due to the constrained runtime environment and lack of global data access in on-chain execution.

New contributor
pizzza1bit is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.