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

Debug events are ambiguous as to which contract generated them #772

Closed
leighmcculloch opened this issue Apr 22, 2023 · 3 comments
Closed
Assignees

Comments

@leighmcculloch
Copy link
Member

Debug events when output do not include a clear indication of which contract ID generated the event. This can get ambiguous with even small traces involving only a couple contracts. For example:

HostError
Value: Status(ContractError(5))

Debug events (newest first):
   0: "Debug escalating error '' to panic"
   1: "Debug contract call invocation resulted in error Status(ContractError(5))"
   2: "Debug caught panic from contract function 'Symbol(add)', propagating escalated error 'Status(ContractError(5))'"
   3: "Debug escalating error '' to panic"
   4: "Debug incompatible signature format"

(This log is from #771.)

Could we include contract IDs, or truncated contract IDs in debug events?

cc @graydon

@graydon
Copy link
Contributor

graydon commented May 2, 2023

Agreed. This goes together with #681 IMO, we should just have objects kicking around for any contract ID that we can tag anything with that is contract-ID-specific.

(Possibly the object handles for contract IDs can/should be related to the ticket numbers in #132 -- if we're never rolling back object handles it might make sense to assign ticket numbers as "the next free object handle" when pushing a frame)

@graydon graydon mentioned this issue May 12, 2023
@graydon graydon self-assigned this May 15, 2023
@graydon
Copy link
Contributor

graydon commented May 15, 2023

implemented in stellar/stellar-xdr#92 -- should land soon

@graydon
Copy link
Contributor

graydon commented May 30, 2023

Done in #806

@graydon graydon closed this as completed May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@graydon @leighmcculloch and others