Skip to content

Stop using SysvarSerialize with solana-account #10672

@joncinque

Description

@joncinque

Problem

The SysvarSerialize trait is used in a lot of solana-account helpers to create sysvar accounts in the runtime, but most of these helpers boil down to using bincode::serialize_into with the sysvar id.

However, since the SysvarSerialize trait needs to be implemented on types like Rent and StakeHistory, we also need to keep those in sync when upgrading Agave. This caused a big annoyance during the most recent major version bumps in the SDK.

Proposed Solution

The SysvarSerialize trait isn't helping very much, and just creating more friction. To start, stop using the account helpers and just use bincode directly. After that, we can investigate removing the trait from the SDK totally, but that will be more destructive for on-chain devs.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions