You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Especially the parsing of program returns based on log.includes("success") and log.includes("failed") seems a bit flawed,
as the logs of native programs do not have the Program log: prefix like normal programs and, therefore, do not get filtered out beforehand.
This means that if a native program emits a log message containing success or failure, the parsing is incorrect.
One could achieve this by using https://github.com/solana-labs/solana/blob/0cd57addcf4ae242e0d068d09fc0359a4249a5e6/programs/zk-token-proof/src/lib.rs#L33
Currently, the explorer parses the hierarchy of inner instructions based on the program logs:
https://github.com/solana-labs/explorer/blob/7b6116dfdda770c82fa41190cb52b0ffba8f329e/app/utils/program-logs.ts#L91C49-L91C49
Especially the parsing of program returns based on log.includes("success") and log.includes("failed") seems a bit flawed,
as the logs of native programs do not have the
Program log:
prefix like normal programs and, therefore, do not get filtered out beforehand.This means that if a native program emits a log message containing success or failure, the parsing is incorrect.
One could achieve this by using
https://github.com/solana-labs/solana/blob/0cd57addcf4ae242e0d068d09fc0359a4249a5e6/programs/zk-token-proof/src/lib.rs#L33
or, -as the zk-token-proof program doesn't seem to be deployed yet- by grinding a Pubkey containing the string and using one of the various other logs: https://github.com/solana-labs/solana/blob/2210af60ee615eda44bd3afc0b2093c23600a005/program-runtime/src/invoke_context.rs#L600
I guess the best fix here would be using a regex similar to the parsing of an invoked program.
The text was updated successfully, but these errors were encountered: