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

events: not outputting contract ids #1457

Open
leighmcculloch opened this issue Aug 12, 2024 · 4 comments
Open

events: not outputting contract ids #1457

leighmcculloch opened this issue Aug 12, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@leighmcculloch
Copy link
Member

leighmcculloch commented Aug 12, 2024

What version are you using?

v21.3.0

What did you do?

$ stellar events

What did you expect to see?

A contract ID included for each event.

What did you see instead?

An empty string for the contract ID for all events.

$ stellar events --start-ledger 1000515 --count 1
Event 0004297179204177920-0000000000 [DIAGNOSTIC]:
  Ledger:   1000515 (closed at 2024-08-11T18:20:19Z)
  Contract: 
  Topics:
            Symbol(ScSymbol(StringM(fn_call)))
            Bytes(ScBytes(BytesM(5592a35e78c59a27a7c61550f436137149341d5d57c8e9338d64e0f2e47ff1be)))
            Symbol(ScSymbol(StringM(set_price)))
  Value: Vec(Some(ScVec(VecM([Vec(Some(ScVec(VecM([I128(Int128Parts { hi: 0, lo: 6030498141684976144 }), I128(Int128Parts { hi: 0, lo: 264300176334177058 }), I128(Int128Parts { hi: 0, lo: 100042306801017 }), I128(Int128Parts { hi: 0, lo: 57089003741740 }), I128(Int128Parts { hi: 0, lo: 14891168315329625 }), I128(Int128Parts { hi: 0, lo: 99998281452494 }), I128(Int128Parts { hi: 0, lo: 34145543629896 }), I128(Int128Parts { hi: 0, lo: 2124833337818254 }), I128(Int128Parts { hi: 0, lo: 462765034860489 }), I128(Int128Parts { hi: 0, lo: 41896389205476 }), I128(Int128Parts { hi: 0, lo: 1044839762379844 }), I128(Int128Parts { hi: 0, lo: 99994385720802 }), I128(Int128Parts { hi: 0, lo: 503678952187986 }), I128(Int128Parts { hi: 0, lo: 10019120674185 }), I128(Int128Parts { hi: 0, lo: 613458381756352 }), I128(Int128Parts { hi: 0, lo: 109893731453483 })])))), U64(1723400400000)]))))
$ stellar events --start-ledger 1000515 --count 1 --output json
{
  "type": "diagnostic",
  "ledger": 1000515,
  "ledgerClosedAt": "2024-08-11T18:20:19Z",
  "id": "0004297179204177920-0000000000",
  "pagingToken": "0004297179204177920-0000000000",
  "contractId": "",
  "topic": [
    "AAAADwAAAAdmbl9jYWxsAA==",
    "AAAADQAAACBVkqNeeMWaJ6fGFVD0NhNxSTQdXVfI6TONZODy5H/xvg==",
    "AAAADwAAAAlzZXRfcHJpY2UAAAA="
  ],
  "value": "AAAAEAAAAAEAAAACAAAAEAAAAAEAAAAQAAAACgAAAAAAAAAAU7CiG+HJShAAAAAKAAAAAAAAAAADqvucLHjDIgAAAAoAAAAAAAAAAAAAWvzqKM15AAAACgAAAAAAAAAAAAAz7BHJ4iwAAAAKAAAAAAAAAAAANOdwTbnMWQAAAAoAAAAAAAAAAAAAWvKqC0vOAAAACgAAAAAAAAAAAAAfDiD/rEgAAAAKAAAAAAAAAAAAB4yGUE68jgAAAAoAAAAAAAAAAAABpOHhhG/JAAAACgAAAAAAAAAAAAAmGsNlXeQAAAAKAAAAAAAAAAAAA7ZGtuJERAAAAAoAAAAAAAAAAAAAWvHB1yXiAAAACgAAAAAAAAAAAAHKF+UGqFIAAAAKAAAAAAAAAAAAAAkcwiD1iQAAAAoAAAAAAAAAAAACLe/o7dfAAAAACgAAAAAAAAAAAABj8qDTiisAAAAFAAABkUKrLIA="
}
@leighmcculloch leighmcculloch added the bug Something isn't working label Aug 12, 2024
@leighmcculloch
Copy link
Member Author

leighmcculloch commented Aug 12, 2024

Actually, these events are diagnostic events, so maybe can't reliable connect some of these events to contracts. That connecting is done in the RPC in any case and isn't a CLI issue.

🤔 But there's still a usability problem here, it's difficult as a user to lookup diagnostic events that relate to specific contract invocations.

@janewang
Copy link

"contractId": "", is this an optional field.

@janewang janewang transferred this issue from stellar/stellar-cli Sep 4, 2024
@janewang
Copy link

janewang commented Sep 4, 2024

Discussed with Platform team and they have confirmed that the RPC is returning an empty string for system events. Transferred to Platform for fix per consensus cc @mollykarcher

@leighmcculloch leighmcculloch transferred this issue from stellar/soroban-rpc Sep 8, 2024
@leighmcculloch
Copy link
Member Author

I transferred the issue to the rs-soroban-env repo because I think this is an issue with the environment. RPC is simply serving a view into what the environment is providing and the environment isn't attaching contract addresses to diagnostic events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

3 participants