Skip to content

Commit ad068e0

Browse files
authored
Merge branch 'main' into GH-1492-late-block-test
2 parents da13143 + e8952eb commit ad068e0

63 files changed

Lines changed: 1719 additions & 1003 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ else()
111111
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-partial-specialization" )
112112
endif()
113113
endif()
114+
115+
set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -latomic")
114116
endif()
115117

116118
if(ENABLE_WERROR)

CMakeModules/EosioTester.cmake.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ target_include_directories(EosioChain INTERFACE
120120
@CMAKE_INSTALL_FULL_INCLUDEDIR@/springboringssl
121121
@CMAKE_INSTALL_FULL_INCLUDEDIR@/softfloat )
122122

123-
#adds -ltr. Ubuntu eosio.contracts build breaks without this
123+
#adds -lrt and -latomic. Ubuntu eosio.contracts build breaks without this
124124
if(UNIX AND NOT APPLE)
125-
target_link_libraries(EosioChain INTERFACE ${LIBRT})
125+
target_link_libraries(EosioChain INTERFACE ${LIBRT} -latomic)
126126
endif()
127127

128128
add_library(EosioTester INTERFACE)

CMakeModules/EosioTesterBuild.cmake.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ target_include_directories(EosioChain INTERFACE
122122
@CMAKE_SOURCE_DIR@/libraries/wasm-jit/include )
123123

124124

125-
#adds -ltr. Ubuntu eosio.contracts build breaks without this
125+
#adds -lrt and -latomic. Ubuntu eosio.contracts build breaks without this
126126
if(UNIX AND NOT APPLE)
127-
target_link_libraries(EosioChain INTERFACE ${LIBRT})
127+
target_link_libraries(EosioChain INTERFACE ${LIBRT} -latomic)
128128
endif()
129129

130130
add_library(EosioTester INTERFACE)
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
## Description
2-
Pack and unpack transactions
2+
Pack and unpack data
33

44
## subcommands
55
- [pack_transaction](pack_transaction.md) - From plain signed json to packed form
66
- [unpack_transaction](unpack_transaction.md) - From packed to plain signed json form
77
- [pack_action_data](pack_action_data.md) - From json action data to packed form
88
- [unpack_action_data](unpack_action_data.md) - From packed to json action data form
9+
- [pack_hex](pack_hex.md) - From JSON to packed HEX form
10+
- [unpack_hex](unpack_hex.md) - From packed HEX to JSON form
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
## Description
2+
3+
From packed HEX to JSON form
4+
5+
## Positionals
6+
7+
- `json` _TEXT_ - The JSON of built-in types including: signed_block, transaction/action_trace, transaction, action, abi_def
8+
9+
## Options
10+
11+
- `-h,--help` - Print this help message and exit
12+
- `--type` - Type of the JSON data
13+
- `--abi-file` - The abi file that contains --type for packing
14+
15+
## Usage
16+
17+
```sh
18+
cleos convert pack_hex --type transaction_trace '{
19+
"id": "da9fbe9042e1bc9bd64d7a4506534d492107a29f79ad671c1fea19ae3fb70eb4",
20+
"block_num": 3,
21+
"block_time": "2020-01-01T00:00:01.000",
22+
"producer_block_id": "000000038159f32d3c8073a6a2f1ad5aa26e2e804a7815c2b5ef729e84fb8031",
23+
"receipt": {
24+
"status": "executed",
25+
"cpu_usage_us": 100,
26+
"net_usage_words": 0
27+
},
28+
"elapsed": 0,
29+
"net_usage": 0,
30+
"scheduled": false,
31+
"action_traces": [{
32+
"action_ordinal": 1,
33+
"creator_action_ordinal": 0,
34+
"closest_unnotified_ancestor_action_ordinal": 0,
35+
"receipt": {
36+
"receiver": "eosio",
37+
"act_digest": "ccfe3b56076237b0b6da2f580652ee1420231b96d3d96b28183769ac932c9e59",
38+
"global_sequence": 2,
39+
"recv_sequence": 2,
40+
"auth_sequence": [[
41+
"eosio",
42+
2
43+
]
44+
],
45+
"code_sequence": 0,
46+
"abi_sequence": 0
47+
},
48+
"receiver": "eosio",
49+
"act": {
50+
"account": "eosio",
51+
"name": "onblock",
52+
"authorization": [{
53+
"actor": "eosio",
54+
"permission": "active"
55+
}
56+
],
57+
"data": "013b3d4b0000000000ea30550000000000015ab65a885a31e441ac485ebd2aeba87bf7ee6e7bcc40bf3a24506ba1000000000000000000000000000000000000000000000000000000000000000062267e8b11d7d8f28e1f991a4de2b08cf92500861af2795765bdc9263cd6f4cd000000000001000021010ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd"
58+
},
59+
"context_free": false,
60+
"elapsed": 0,
61+
"console": "",
62+
"trx_id": "da9fbe9042e1bc9bd64d7a4506534d492107a29f79ad671c1fea19ae3fb70eb4",
63+
"block_num": 3,
64+
"block_time": "2020-01-01T00:00:01.000",
65+
"producer_block_id": "000000038159f32d3c8073a6a2f1ad5aa26e2e804a7815c2b5ef729e84fb8031",
66+
"account_ram_deltas": [],
67+
"return_value": ""
68+
}
69+
],
70+
"failed_dtrx_trace": null
71+
}'
72+
```
73+
74+
## Output
75+
76+
77+
```
78+
"da9fbe9042e1bc9bd64d7a4506534d492107a29f79ad671c1fea19ae3fb70eb403000000023b3d4b01000000038159f32d3c8073a6a2f1ad5aa26e2e804a7815c2b5ef729e84fb803101006400000000000000000000000000000000000000000001010000010000000000ea3055ccfe3b56076237b0b6da2f580652ee1420231b96d3d96b28183769ac932c9e5902000000000000000200000000000000010000000000ea3055020000000000000000000000000000ea30550000000000ea305500000000221acfa4010000000000ea305500000000a8ed32329801013b3d4b0000000000ea30550000000000015ab65a885a31e441ac485ebd2aeba87bf7ee6e7bcc40bf3a24506ba1000000000000000000000000000000000000000000000000000000000000000062267e8b11d7d8f28e1f991a4de2b08cf92500861af2795765bdc9263cd6f4cd000000000001000021010ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd00000000000000000000da9fbe9042e1bc9bd64d7a4506534d492107a29f79ad671c1fea19ae3fb70eb403000000023b3d4b01000000038159f32d3c8073a6a2f1ad5aa26e2e804a7815c2b5ef729e84fb80310000000000000000"
79+
```
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
## Description
2+
3+
From packed HEX to json form
4+
5+
## Positionals
6+
7+
- `hex` _TEXT_ - The packed HEX of built-in types including: signed_block, transaction/action_trace, transaction, action, abi_def
8+
9+
## Options
10+
11+
- `-h,--help` - Print this help message and exit
12+
- `--type` - Type of the HEX data, if not specified then some common types are attempted.
13+
- `--abi-file` - The abi file that contains --type for unpacking
14+
15+
## Usage
16+
17+
```sh
18+
cleos convert unpack_hex da9fbe9042e1bc9bd64d7a4506534d492107a29f79ad671c1fea19ae3fb70eb403000000023b3d4b01000000038159f32d3c8073a6a2f1ad5aa26e2e804a7815c2b5ef729e84fb803101006400000000000000000000000000000000000000000001010000010000000000ea3055ccfe3b56076237b0b6da2f580652ee1420231b96d3d96b28183769ac932c9e5902000000000000000200000000000000010000000000ea3055020000000000000000000000000000ea30550000000000ea305500000000221acfa4010000000000ea305500000000a8ed32329801013b3d4b0000000000ea30550000000000015ab65a885a31e441ac485ebd2aeba87bf7ee6e7bcc40bf3a24506ba1000000000000000000000000000000000000000000000000000000000000000062267e8b11d7d8f28e1f991a4de2b08cf92500861af2795765bdc9263cd6f4cd000000000001000021010ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd00000000000000000000da9fbe9042e1bc9bd64d7a4506534d492107a29f79ad671c1fea19ae3fb70eb403000000023b3d4b01000000038159f32d3c8073a6a2f1ad5aa26e2e804a7815c2b5ef729e84fb803100000000000000000000
19+
```
20+
21+
## Output
22+
23+
24+
```json
25+
{
26+
"id": "da9fbe9042e1bc9bd64d7a4506534d492107a29f79ad671c1fea19ae3fb70eb4",
27+
"block_num": 3,
28+
"block_time": "2020-01-01T00:00:01.000",
29+
"producer_block_id": "000000038159f32d3c8073a6a2f1ad5aa26e2e804a7815c2b5ef729e84fb8031",
30+
"receipt": {
31+
"status": "executed",
32+
"cpu_usage_us": 100,
33+
"net_usage_words": 0
34+
},
35+
"elapsed": 0,
36+
"net_usage": 0,
37+
"scheduled": false,
38+
"action_traces": [{
39+
"action_ordinal": 1,
40+
"creator_action_ordinal": 0,
41+
"closest_unnotified_ancestor_action_ordinal": 0,
42+
"receipt": {
43+
"receiver": "eosio",
44+
"act_digest": "ccfe3b56076237b0b6da2f580652ee1420231b96d3d96b28183769ac932c9e59",
45+
"global_sequence": 2,
46+
"recv_sequence": 2,
47+
"auth_sequence": [[
48+
"eosio",
49+
2
50+
]
51+
],
52+
"code_sequence": 0,
53+
"abi_sequence": 0
54+
},
55+
"receiver": "eosio",
56+
"act": {
57+
"account": "eosio",
58+
"name": "onblock",
59+
"authorization": [{
60+
"actor": "eosio",
61+
"permission": "active"
62+
}
63+
],
64+
"data": "013b3d4b0000000000ea30550000000000015ab65a885a31e441ac485ebd2aeba87bf7ee6e7bcc40bf3a24506ba1000000000000000000000000000000000000000000000000000000000000000062267e8b11d7d8f28e1f991a4de2b08cf92500861af2795765bdc9263cd6f4cd000000000001000021010ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd"
65+
},
66+
"context_free": false,
67+
"elapsed": 0,
68+
"console": "",
69+
"trx_id": "da9fbe9042e1bc9bd64d7a4506534d492107a29f79ad671c1fea19ae3fb70eb4",
70+
"block_num": 3,
71+
"block_time": "2020-01-01T00:00:01.000",
72+
"producer_block_id": "000000038159f32d3c8073a6a2f1ad5aa26e2e804a7815c2b5ef729e84fb8031",
73+
"account_ram_deltas": [],
74+
"return_value": ""
75+
}
76+
],
77+
"failed_dtrx_trace": null
78+
}
79+
```

0 commit comments

Comments
 (0)