-
Notifications
You must be signed in to change notification settings - Fork 33
SC: Support call trace deserialization in ABI serializer #1576
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
Conversation
…to return_value_hex_data, and return_value to return_value, to be consistent with names in action_trace
| @@ -34,114 +34,114 @@ DMLOG START_BLOCK 3 | |||
| DMLOG CREATION_OP ROOT 0 | |||
| DMLOG RLIMIT_OP ACCOUNT_USAGE UPD {"owner":"eosio","net_usage":{"last_ordinal":1262304002,"value_ex":0,"consumed":0},"cpu_usage":{"last_ordinal":1262304002,"value_ex":1157,"consumed":101},"ram_usage":2724} | |||
| DMLOG TRX_OP CREATE onblock da9fbe9042e1bc9bd64d7a4506534d492107a29f79ad671c1fea19ae3fb70eb4 01e10b5e02005132b41600000000010000000000ea305500000000221acfa4010000000000ea305500000000a8ed32329801013b3d4b0000000000ea30550000000000015ab65a885a31e441ac485ebd2aeba87bf7ee6e7bcc40bf3a24506ba1000000000000000000000000000000000000000000000000000000000000000062267e8b11d7d8f28e1f991a4de2b08cf92500861af2795765bdc9263cd6f4cd000000000001000021010ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd000000 | |||
| DMLOG APPLIED_TRANSACTION 3 da9fbe9042e1bc9bd64d7a4506534d492107a29f79ad671c1fea19ae3fb70eb403000000023b3d4b01000000037d8ee5c1ef56cd1e16137e82e35b78d60ab1d5cf659ff8b916867a2f01006400000000000000000000000000000000000000000001010000010000000000ea3055ccfe3b56076237b0b6da2f580652ee1420231b96d3d96b28183769ac932c9e5902000000000000000200000000000000010000000000ea3055020000000000000000000000000000ea30550000000000ea305500000000221acfa4010000000000ea305500000000a8ed32329801013b3d4b0000000000ea30550000000000015ab65a885a31e441ac485ebd2aeba87bf7ee6e7bcc40bf3a24506ba1000000000000000000000000000000000000000000000000000000000000000062267e8b11d7d8f28e1f991a4de2b08cf92500861af2795765bdc9263cd6f4cd000000000001000021010ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd00000000000000000000da9fbe9042e1bc9bd64d7a4506534d492107a29f79ad671c1fea19ae3fb70eb403000000023b3d4b01000000037d8ee5c1ef56cd1e16137e82e35b78d60ab1d5cf659ff8b916867a2f00000000000000000000 | |||
| DMLOG APPLIED_TRANSACTION 3 da9fbe9042e1bc9bd64d7a4506534d492107a29f79ad671c1fea19ae3fb70eb403000000023b3d4b01000000038159f32d3c8073a6a2f1ad5aa26e2e804a7815c2b5ef729e84fb803101006400000000000000000000000000000000000000000001010000010000000000ea3055ccfe3b56076237b0b6da2f580652ee1420231b96d3d96b28183769ac932c9e5902000000000000000200000000000000010000000000ea3055020000000000000000000000000000ea30550000000000ea305500000000221acfa4010000000000ea305500000000a8ed32329801013b3d4b0000000000ea30550000000000015ab65a885a31e441ac485ebd2aeba87bf7ee6e7bcc40bf3a24506ba1000000000000000000000000000000000000000000000000000000000000000062267e8b11d7d8f28e1f991a4de2b08cf92500861af2795765bdc9263cd6f4cd000000000001000021010ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd00000000000000000000da9fbe9042e1bc9bd64d7a4506534d492107a29f79ad671c1fea19ae3fb70eb403000000023b3d4b01000000038159f32d3c8073a6a2f1ad5aa26e2e804a7815c2b5ef729e84fb803100000000000000000000 | |||
| DMLOG CREATION_OP ROOT 0 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My guess was that this diff was because of the difference in abi_def. That is indeed the case.
...1736800000000000000
...173680000000000
The difference results in different actions and therefore different action digest and therefore different transaction digest and therefore different block digest.
I verified a block log created by nodeos 1.x with a setabi can be read by nodeos 2.x and also a block log created via nodeos 2.x can be read by a nodeos 1.x.
Therefore, I believe these deep-mind updates are valid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for verifying this!
…bedded in action traces are expanded; add a test to verify that works.
| call_data_header data_header; | ||
| fc::datastream<const char*> ds( cal_trace.data.data(), cal_trace.data.size() ); | ||
| fc::raw::unpack( ds, data_header ); | ||
| std::string fname = eosio::chain::name(data_header.func_name).to_string(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data_header is not guaranteed to exist-- I think this should go within the try block so if the sync call does not have a data_header then you still output the hex_data instead of throwing the exception out. Also do you want to check version in data_header?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! Will it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
… data_header version
Add support of call trace deserialization into ABI serializer. In particular, add support for deserializing binary fields
dataandreturn_valueincall_trace.A deserialized call trace looks like
Resolves #1220
Depends on CDT AntelopeIO/cdt#353