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

Deprecate decoding msg! events to improve errorOnDecodeFailure event parsing. #2340

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nicholasgodfreyclarke
Copy link
Contributor

Anchor decodes events by checking if the transaction log line starts with "Program log:" (msg! system call) or "Program data" (sol_log_data system call).
This means that it attempts to decode all program logs.
After anchor 0.23.0 (2022-03-20) anchor switched to emitting events using the sol_log_data system_call (#1608).
This created a clear distinction between anchor events logs and logs for other purposes.

The problem being that when you pass errorOnDecodeFailure=true to parseLogs it will fail on all non anchor event program logs.
I propose deprecating attempting to parse msg! logs so anchor only attempts to parse genuine anchor event candidates.

@vercel
Copy link

vercel bot commented Dec 23, 2022

@nicholasgodfreyclarke is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@Henry-E
Copy link

Henry-E commented Jan 3, 2023

It looks like some of the tests are failing for this? I think maybe the tests are still expecting the old behaviour.

Out of interest, how much of a breaking change will this be for people that use it expecting the old behaviour?

Need to figure out those parts and then we can decide if it's ok to merge. Plus need to add a changelog if we do go ahead with the breaking change.

@Henry-E Henry-E added question Further information is requested ts labels Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested ts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants