1

Just an over all system question... Are changes to any custom data values on a PDA account logged in anyway where someone can view the update history of the values? In other words, is there a way for someone to view the data change history for a single value of a PDA?

1 Answer 1

3

Only transaction data is persisted longterm and accessible through the public RPC nodes at api.mainnet-beta.com, and the actual account contents are not snapshotted at each transaction.

You can fetch at all transactions that reference the PDA using getSignaturesForAddress and getTransaction, but it won't give you the contents of the account.

If you want to keep track of state updated, you'll need to use a separate service or create your own server to listen to transactions referencing the account. You can use the accountSubscribe websocket endpoint https://docs.solana.com/api/websocket#accountsubscribe to get live updates anytime the contents change.

3
  • Was accepted answer but I asked a similar question about whether or not the data is still viewable when deleted. solana.stackexchange.com/questions/8946/…. and I got an answer suggesting it is still viewable. Not sure what to believe now.
    – ZeroNine
    Commented Jan 9 at 1:58
  • @ZeroNine is it technically possible to use the ledger data to recreate the contents of your account. While Jon states that account contents are not snapshotted at each transaction, there are checkpoints where you can build using the transactions to get your account data again.
    – Jacob Creech
    Commented Jan 9 at 3:27
  • So if I understand this correctly, to summarize, the changes are not by default easily viewable to the public but if someone really wanted to, they can figure it out. Is this correct or is this data already easily viewable through some means now?
    – ZeroNine
    Commented Jan 9 at 4:00

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.