Skip to content

Conversation

@linh2931
Copy link
Contributor

@linh2931 linh2931 commented Apr 23, 2025

As sync calls can make nested sync calls, we need to log more information to help Deepmind to correlate an action/sync call to operations. We implement the following minimum changes to deepmind logging:

  • Introduce a new execution_id. Whenever an action starts or a sync call is made, increment execution_id by 1.
  • Replace every current use of action_id with execution_id.

For the following action/call example,

action_1
    create table
    sync_call_1
         db_store
         sync_call_2
              db_update
         db_store
    remove table

you would see deepmind logging as (other parameters of table operations are omitted for simplicity)

   CREATION_OP ROOT 0
   TBL_OP INS 0
   CREATION_OP CALL 1
   DB_OP INS 1
   CREATION_OP CALL 2
   DB_OP UPD 2
   DB_OP INS 1
   TBL_OP REM 0

Please note, the action_traces inside transaction_trace in APPLIED_TRANSACTION has been updated to include sync call traces. action_traces has two new fields:

struct action_trace {
    ... // existing fields
   std::vector<call_trace>              call_traces;
   std::vector<fc::unsigned_int>   console_markers;   // used for pretty printing console logs
}

See

for definition of call_trace

Resolves #1221

@linh2931 linh2931 requested review from heifner and spoonincode April 23, 2025 17:45
@spoonincode
Copy link
Contributor

Why do we not have the call data & call return value & readonlyness etc? Deepmind historically has been the most exhaustive history output so not sure why it has barely anything vs what we're doing in ship & trace

@heifner
Copy link
Contributor

heifner commented Apr 23, 2025

Why do we not have the call data & call return value & readonlyness etc? Deepmind historically has been the most exhaustive history output so not sure why it has barely anything vs what we're doing in ship & trace

It correlates action_id to the transaction_trace which is exported in deepmind.

@spoonincode
Copy link
Contributor

o yeah should have remembered that from #1333 👍

@heifner
Copy link
Contributor

heifner commented Apr 23, 2025

Need to add to PR description the change in transaction_trace for sync calls. This change also affects deepmind.
https://github.com/AntelopeIO/spring/blob/main/libraries/chain/deep_mind.cpp#L157-L157

Base automatically changed from eosio_exit_fix to sync_call April 23, 2025 23:38
@linh2931
Copy link
Contributor Author

Need to add to PR description the change in transaction_trace for sync calls. This change also affects deepmind. https://github.com/AntelopeIO/spring/blob/main/libraries/chain/deep_mind.cpp#L157-L157

Thanks. Done.

@linh2931 linh2931 merged commit 8dfca85 into sync_call Jul 15, 2025
28 checks passed
@linh2931 linh2931 deleted the sync_call_deepmind_support branch July 15, 2025 16:05
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

Successfully merging this pull request may close these issues.

3 participants