Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Implement tracing::Event handling & parent_id for spans and events #6672

Merged
28 commits merged into from
Aug 12, 2020

Conversation

mattrutherford
Copy link
Contributor

@mattrutherford mattrutherford commented Jul 16, 2020

Implement Event for tracing - Events are instantaneous and have no duration, unlike Spans. Arbitrary values can be recorded to events and spans.

Also implement the recording of the hierarchical relationship between spans and events by using parent_id. This provides the context for which a span or event happened and is required for the state-tracing effort to move forward.

polkadot companion: paritytech/polkadot#1560

@github-actions github-actions bot added the A0-please_review Pull request needs code review. label Jul 16, 2020
@mattrutherford mattrutherford added B5-clientnoteworthy C1-low PR touches the given topic and has a low impact on builders. labels Jul 16, 2020
gnunicorn and others added 6 commits July 22, 2020 14:23
# Conflicts:
#	client/executor/src/integration_tests/mod.rs
#	client/tracing/src/lib.rs
#	primitives/io/Cargo.toml
… tracing-events

# Conflicts:
#	client/executor/src/integration_tests/mod.rs
#	client/tracing/src/lib.rs
#	primitives/io/Cargo.toml
@mattrutherford
Copy link
Contributor Author

mattrutherford commented Jul 23, 2020

After ongoing discussion with @gnunicorn, it was decided to limit this PR to the Event handling and parent_id for spans and events in client::tracing. There will be follow up PRs for state tracing and a more comprehensive implementation of tracing for WASM, which is feature gated.

@mattrutherford mattrutherford changed the title Implement Events for tracing Implement tracing::Event handling & parent_id for spans and events Aug 3, 2020
@mattrutherford
Copy link
Contributor Author

For an example of how this can be used, see branch: https://github.com/paritytech/substrate/tree/tracing-events-with-new-spans

Showing storage changes linked to the runtime functions that caused them (currently native only) over 1 block:

2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  frame_executive: extract_pre_digest, time: 670, id: 2, parent_id: Some(1)
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  frame_executive: runtime_upgraded, time: 12890, id: 4, parent_id: Some(3)
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(3), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 255, 85, 59, 90, 152, 98, 165, 22, 147, 157, 130, 179, 211, 216, 102, 26]", value="[2]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(3), message="set", key="[58, 101, 120, 116, 114, 105, 110, 115, 105, 99, 95, 105, 110, 100, 101, 120]", value="[0, 0, 0, 0]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(3), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 2, 165, 193, 177, 154, 183, 160, 79, 83, 108, 81, 154, 202, 73, 131, 172]", value="[1, 0, 0, 0]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(3), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 153, 231, 249, 63, 198, 169, 143, 8, 116, 253, 5, 127, 17, 28, 77, 45]", value="[4, 6, 66, 65, 66, 69, 181, 1, 1, 0, 0, 0, 0, 198, 22, 184, 31, 0, 0, 0, 0, 38, 244, 241, 172, 148, 87, 33, 213, 216, 72, 39, 197, 43, 145, 125, 119, 7, 49, 23, 183, 189, 0, 31, 160, 41, 144, 57, 173, 154, 87, 190, 46, 29, 253, 183, 140, 101, 233, 83, 126, 207, 59, 136, 103, 252, 103, 213, 139, 42, 134, 6, 236, 106, 83, 186, 46, 226, 100, 226, 94, 240, 27, 174, 2, 47, 132, 59, 202, 136, 20, 188, 155, 160, 87, 41, 226, 205, 241, 210, 155, 30, 138, 130, 145, 228, 29, 84, 215, 233, 119, 45, 98, 110, 41, 85, 1]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(3), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 138, 66, 243, 51, 35, 203, 92, 237, 59, 68, 221, 130, 95, 218, 159, 204]", value="[254, 37, 167, 221, 21, 39, 156, 245, 189, 145, 68, 227, 146, 101, 99, 64, 149, 127, 97, 226, 98, 197, 41, 62, 180, 155, 131, 14, 115, 108, 172, 163]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(3), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 164, 71, 4, 181, 104, 210, 22, 103, 53, 106, 90, 5, 12, 17, 135, 70, 180, 222, 242, 92, 253, 166, 239, 58, 0, 0, 0, 0]", value="[254, 37, 167, 221, 21, 39, 156, 245, 189, 145, 68, 227, 146, 101, 99, 64, 149, 127, 97, 226, 98, 197, 41, 62, 180, 155, 131, 14, 115, 108, 172, 163]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(3), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 176, 108, 51, 32, 198, 172, 25, 109, 129, 52, 66, 226, 112, 134, 141, 99]", value="[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(3), message="clear", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 52, 171, 245, 203, 52, 214, 36, 67, 120, 205, 219, 241, 142, 132, 157, 150]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(3), message="clear", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 128, 212, 30, 94, 22, 5, 103, 101, 188, 132, 97, 133, 16, 114, 201, 215]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(3), message="clear", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 10, 152, 253, 190, 156, 230, 197, 88, 55, 87, 108, 96, 199, 175, 56, 80]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(3), message="clear_prefix", prefix="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 187, 148, 225, 194, 26, 218, 183, 20, 152, 60, 240, 102, 34, 225, 222, 118]"
2020-08-03 18:07:30.013 tokio-blocking-driver TRACE sc_tracing  pallet_scheduler: on_initialize, time: 7560, id: 5, parent_id: Some(3)
2020-08-03 18:07:30.013 tokio-blocking-driver TRACE sc_tracing  pallet_society: on_initialize, time: 170, id: 6, parent_id: Some(3)
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(7), message="set", key="[189, 42, 82, 147, 121, 71, 80, 136, 211, 226, 154, 145, 140, 212, 120, 114, 26, 57, 236, 118, 123, 213, 38, 145, 17, 230, 73, 42, 22, 117, 112, 42]", value="[4, 254, 37, 167, 221, 21, 39, 156, 245, 189, 145, 68, 227, 146, 101, 99, 64, 149, 127, 97, 226, 98, 197, 41, 62, 180, 155, 131, 14, 115, 108, 172, 163]"
2020-08-03 18:07:30.013 tokio-blocking-driver TRACE sc_tracing  pallet_randomness_collective_flip: on_initialize, time: 14630, id: 7, parent_id: Some(3)
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(8), message="set", key="[213, 196, 27, 82, 163, 113, 170, 54, 201, 37, 76, 227, 67, 36, 242, 165, 59, 153, 107, 185, 136, 234, 142, 225, 91, 173, 63, 253, 47, 104, 219, 218]", value="[0]"
2020-08-03 18:07:30.013 tokio-blocking-driver TRACE sc_tracing  pallet_offences: on_initialize, time: 21391, id: 8, parent_id: Some(3)
2020-08-03 18:07:30.013 tokio-blocking-driver TRACE sc_tracing  pallet_treasury: on_initialize, time: 160, id: 9, parent_id: Some(3)
2020-08-03 18:07:30.013 tokio-blocking-driver TRACE sc_tracing  pallet_elections_phragmen: on_initialize, time: 70, id: 10, parent_id: Some(3)
2020-08-03 18:07:30.013 tokio-blocking-driver TRACE sc_tracing  pallet_democracy: on_initialize, time: 9410, id: 11, parent_id: Some(3)
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(12), message="set", key="[28, 182, 243, 110, 2, 122, 187, 32, 145, 207, 181, 17, 10, 181, 8, 127, 103, 135, 17, 209, 94, 187, 206, 186, 92, 208, 206, 161, 88, 230, 103, 90]", value="[198, 22, 184, 31, 0, 0, 0, 0]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(12), message="append", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 153, 231, 249, 63, 198, 169, 143, 8, 116, 253, 5, 127, 17, 28, 77, 45]", value="[4, 66, 65, 66, 69, 41, 1, 1, 4, 212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(12), message="set", key="[28, 182, 243, 110, 2, 122, 187, 32, 145, 207, 181, 17, 10, 181, 8, 127, 3, 35, 71, 86, 87, 224, 137, 15, 189, 191, 102, 251, 36, 180, 100, 158]", value="[197, 22, 184, 31]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(12), message="set", key="[28, 182, 243, 110, 2, 122, 187, 32, 145, 207, 181, 17, 10, 181, 8, 127, 6, 21, 91, 60, 217, 168, 201, 229, 233, 162, 63, 213, 220, 19, 165, 237]", value="[198, 22, 184, 31, 0, 0, 0, 0]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(12), message="set", key="[28, 182, 243, 110, 2, 122, 187, 32, 145, 207, 181, 17, 10, 181, 8, 127, 250, 146, 222, 145, 10, 124, 226, 189, 88, 233, 151, 41, 198, 151, 39, 193]", value="[1, 123, 61, 193, 183, 48, 46, 244, 206, 117, 240, 134, 172, 231, 95, 107, 195, 137, 232, 217, 137, 196, 252, 27, 160, 193, 97, 53, 61, 251, 6, 252, 95]"
2020-08-03 18:07:30.013 tokio-blocking-driver TRACE sc_tracing  pallet_session: on_initialize, time: 138752, id: 12, parent_id: Some(3)
2020-08-03 18:07:30.013 tokio-blocking-driver TRACE sc_tracing  pallet_staking: on_initialize, time: 13190, id: 13, parent_id: Some(3)
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(14), message="set", key="[213, 123, 206, 84, 95, 179, 130, 195, 69, 112, 229, 223, 191, 51, 143, 94, 189, 223, 132, 197, 235, 35, 230, 245, 58, 247, 37, 136, 13, 143, 254, 144]", value="[0]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(14), message="set", key="[213, 123, 206, 84, 95, 179, 130, 195, 69, 112, 229, 223, 191, 51, 143, 94, 50, 109, 33, 188, 103, 164, 179, 64, 35, 213, 119, 88, 93, 114, 191, 215]", value="[190, 93, 219, 21, 121, 183, 46, 132, 82, 79, 194, 158, 120, 96, 158, 60, 175, 66, 232, 90, 161, 24, 235, 254, 11, 10, 212, 4, 181, 189, 210, 95]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(14), message="set", key="[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 128, 204, 101, 116, 40, 22, 113, 178, 153, 193, 114, 125, 122, 198, 140, 171, 180, 222, 242, 92, 253, 166, 239, 58, 0, 0, 0, 0]", value="[20, 0, 0, 0, 4, 190, 93, 219, 21, 121, 183, 46, 132, 82, 79, 194, 158, 120, 96, 158, 60, 175, 66, 232, 90, 161, 24, 235, 254, 11, 10, 212, 4, 181, 189, 210, 95, 20, 0, 0, 0]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(14), message="set", key="[43, 6, 175, 151, 25, 172, 100, 215, 85, 98, 60, 218, 141, 221, 155, 148, 177, 195, 113, 222, 217, 233, 197, 101, 232, 155, 167, 131, 196, 213, 245, 249, 180, 222, 242, 92, 253, 166, 239, 58, 0, 0, 0, 0, 229, 53, 38, 49, 72, 218, 175, 73, 190, 93, 219, 21, 121, 183, 46, 132, 82, 79, 194, 158, 120, 96, 158, 60, 175, 66, 232, 90, 161, 24, 235, 254, 11, 10, 212, 4, 181, 189, 210, 95]", value="[1, 0, 0, 0]"
2020-08-03 18:07:30.013 tokio-blocking-driver TRACE sc_tracing  pallet_authorship: on_initialize, time: 78101, id: 14, parent_id: Some(3)
2020-08-03 18:07:30.013 tokio-blocking-driver TRACE sc_tracing  pallet_timestamp: on_initialize, time: 60, id: 15, parent_id: Some(3)
2020-08-03 18:07:30.013 tokio-blocking-driver TRACE sc_tracing  pallet_babe: on_initialize, time: 870, id: 16, parent_id: Some(3)
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(3), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 52, 171, 245, 203, 52, 214, 36, 67, 120, 205, 219, 241, 142, 132, 157, 150]", value="[192, 219, 153, 90, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(3), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 255, 85, 59, 90, 152, 98, 165, 22, 147, 157, 130, 179, 211, 216, 102, 26]", value="[0, 0, 0, 0, 0]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  frame_executive: initialize_block_impl, time: 514866, id: 3, parent_id: Some(1), values: block_number="1"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing  frame_executive: initialize_block, time: 552126, id: 1, parent_id: None
2020-08-03 18:07:30.024 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(18), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 223, 29, 174, 184, 152, 104, 55, 242, 28, 197, 209, 117, 150, 187, 120, 209, 180, 222, 242, 92, 253, 166, 239, 58, 0, 0, 0, 0]", value="[44, 40, 4, 3, 0, 11, 80, 224, 74, 181, 115, 1]"
2020-08-03 18:07:30.024 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(18), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 168, 109, 165, 169, 50, 104, 79, 25, 149, 57, 131, 111, 203, 140, 136, 111]", value="[11, 0, 0, 0]"
2020-08-03 18:07:30.024 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(18), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 52, 171, 245, 203, 52, 214, 36, 67, 120, 205, 219, 241, 142, 132, 157, 150]", value="[128, 24, 120, 107, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]"
2020-08-03 18:07:30.024 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(19), message="set", key="[240, 195, 101, 195, 207, 89, 214, 113, 235, 114, 218, 14, 122, 65, 19, 196, 159, 31, 5, 21, 244, 98, 205, 207, 132, 224, 241, 214, 4, 93, 252, 187]", value="[80, 224, 74, 181, 115, 1, 0, 0]"
2020-08-03 18:07:30.024 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(19), message="set", key="[240, 195, 101, 195, 207, 89, 214, 113, 235, 114, 218, 14, 122, 65, 19, 196, 187, 209, 8, 196, 137, 153, 100, 247, 7, 253, 175, 251, 130, 99, 96, 101]", value="[1]"
2020-08-03 18:07:30.024 tokio-blocking-driver TRACE sc_tracing  pallet_timestamp: set, time: 28570, id: 19, parent_id: Some(18)
2020-08-03 18:07:30.024 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(18), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 10, 152, 253, 190, 156, 230, 197, 88, 55, 87, 108, 96, 199, 175, 56, 80]", value="[1, 0, 0, 0]"
2020-08-03 18:07:30.024 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(18), message="append", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 128, 212, 30, 94, 22, 5, 103, 101, 188, 132, 97, 133, 16, 114, 201, 215]", value="[0, 0, 0, 0, 0, 0, 0, 128, 227, 106, 9, 0, 0, 0, 0, 2, 0, 0]"
2020-08-03 18:07:30.024 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(18), message="set", key="[58, 101, 120, 116, 114, 105, 110, 115, 105, 99, 95, 105, 110, 100, 101, 120]", value="[1, 0, 0, 0]"
2020-08-03 18:07:30.024 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(18), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 255, 85, 59, 90, 152, 98, 165, 22, 147, 157, 130, 179, 211, 216, 102, 26]", value="[0, 1, 0, 0, 0]"
2020-08-03 18:07:30.024 tokio-blocking-driver INFO sc_tracing  frame_executive: apply_extrinsic_with_len, time: 119162, id: 18, parent_id: Some(17), values: encoded="[40, 4, 3, 0, 11, 80, 224, 74, 181, 115, 1]"
2020-08-03 18:07:30.024 tokio-blocking-driver INFO sc_tracing  frame_executive: apply_extrinsic, time: 130022, id: 17, parent_id: None, values: encoded="[40, 4, 3, 0, 11, 80, 224, 74, 181, 115, 1]"
2020-08-03 18:07:30.029 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(20), message="clear", key="[58, 101, 120, 116, 114, 105, 110, 115, 105, 99, 95, 105, 110, 100, 101, 120]"
2020-08-03 18:07:30.029 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(20), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 189, 192, 189, 48, 62, 152, 85, 129, 58, 168, 163, 13, 78, 252, 81, 18]", value="[1, 0, 0, 0]"
2020-08-03 18:07:30.029 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(20), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 255, 85, 59, 90, 152, 98, 165, 22, 147, 157, 130, 179, 211, 216, 102, 26]", value="[1]"
2020-08-03 18:07:30.029 tokio-blocking-driver TRACE sc_tracing  pallet_grandpa: on_finalize, time: 9631, id: 21, parent_id: Some(20)
2020-08-03 18:07:30.029 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(22), message="set", key="[246, 143, 66, 92, 245, 100, 90, 172, 178, 174, 89, 181, 27, 174, 217, 4, 185, 115, 128, 206, 95, 78, 112, 251, 249, 214, 181, 134, 110, 181, 149, 39]", value="[4, 0, 0, 0, 0]"
2020-08-03 18:07:30.029 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(22), message="set", key="[246, 143, 66, 92, 245, 100, 90, 172, 178, 174, 89, 181, 27, 174, 217, 4, 32, 212, 154, 20, 167, 99, 225, 203, 200, 135, 172, 208, 151, 249, 32, 20]", value="[4, 0, 0, 0, 0]"
2020-08-03 18:07:30.029 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(22), message="set", key="[246, 143, 66, 92, 245, 100, 90, 172, 178, 174, 89, 181, 27, 174, 217, 4, 155, 88, 55, 66, 24, 244, 142, 175, 91, 194, 59, 123, 62, 124, 240, 138]", value="[0, 0, 0, 0]"
2020-08-03 18:07:30.029 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(22), message="set", key="[246, 143, 66, 92, 245, 100, 90, 172, 178, 174, 89, 181, 27, 174, 217, 4, 250, 146, 222, 145, 10, 124, 226, 189, 88, 233, 151, 41, 198, 151, 39, 193]", value="[1]"
2020-08-03 18:07:30.029 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(22), message="set", key="[246, 143, 66, 92, 245, 100, 90, 172, 178, 174, 89, 181, 27, 174, 217, 4, 185, 115, 128, 206, 95, 78, 112, 251, 249, 214, 181, 134, 110, 181, 149, 39]", value="[8, 0, 0, 0, 0, 0, 0, 0, 0]"
2020-08-03 18:07:30.029 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(22), message="set", key="[246, 143, 66, 92, 245, 100, 90, 172, 178, 174, 89, 181, 27, 174, 217, 4, 32, 212, 154, 20, 167, 99, 225, 203, 200, 135, 172, 208, 151, 249, 32, 20]", value="[8, 0, 0, 0, 0, 0, 0, 0, 0]"
2020-08-03 18:07:30.029 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(22), message="set", key="[246, 143, 66, 92, 245, 100, 90, 172, 178, 174, 89, 181, 27, 174, 217, 4, 155, 88, 55, 66, 24, 244, 142, 175, 91, 194, 59, 123, 62, 124, 240, 138]", value="[0, 0, 0, 0]"
2020-08-03 18:07:30.029 tokio-blocking-driver TRACE sc_tracing  pallet_finality_tracker: on_finalize, time: 66460, id: 22, parent_id: Some(20)
2020-08-03 18:07:30.029 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(23), message="set", key="[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 72, 125, 244, 100, 228, 74, 83, 75, 166, 176, 203, 179, 36, 7, 181, 135]", value="[0, 0, 0, 0, 1, 80, 224, 74, 181, 115, 1, 0, 0]"
2020-08-03 18:07:30.029 tokio-blocking-driver TRACE sc_tracing  pallet_staking: on_finalize, time: 17971, id: 23, parent_id: Some(20)
2020-08-03 18:07:30.029 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(24), message="set", key="[63, 20, 103, 160, 150, 188, 215, 26, 91, 106, 12, 129, 85, 226, 8, 16, 63, 46, 223, 59, 223, 56, 29, 235, 227, 49, 171, 116, 70, 173, 223, 220]", value="[151, 32, 22, 11, 119, 180, 224, 13, 0, 0, 0, 0, 0, 0, 0, 0]"
2020-08-03 18:07:30.029 tokio-blocking-driver TRACE sc_tracing  pallet_transaction_payment: on_finalize, time: 15670, id: 24, parent_id: Some(20)
2020-08-03 18:07:30.029 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(25), message="clear", key="[213, 123, 206, 84, 95, 179, 130, 195, 69, 112, 229, 223, 191, 51, 143, 94, 50, 109, 33, 188, 103, 164, 179, 64, 35, 213, 119, 88, 93, 114, 191, 215]"
2020-08-03 18:07:30.029 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(25), message="clear", key="[213, 123, 206, 84, 95, 179, 130, 195, 69, 112, 229, 223, 191, 51, 143, 94, 189, 223, 132, 197, 235, 35, 230, 245, 58, 247, 37, 136, 13, 143, 254, 144]"
2020-08-03 18:07:30.029 tokio-blocking-driver TRACE sc_tracing  pallet_authorship: on_finalize, time: 16900, id: 25, parent_id: Some(20)
2020-08-03 18:07:30.029 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(26), message="clear", key="[240, 195, 101, 195, 207, 89, 214, 113, 235, 114, 218, 14, 122, 65, 19, 196, 187, 209, 8, 196, 137, 153, 100, 247, 7, 253, 175, 251, 130, 99, 96, 101]"
2020-08-03 18:07:30.029 tokio-blocking-driver TRACE sc_tracing  pallet_timestamp: on_finalize, time: 7310, id: 26, parent_id: Some(20)
2020-08-03 18:07:30.029 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(27), message="clear", key="[28, 182, 243, 110, 2, 122, 187, 32, 145, 207, 181, 17, 10, 181, 8, 127, 250, 146, 222, 145, 10, 124, 226, 189, 88, 233, 151, 41, 198, 151, 39, 193]"
2020-08-03 18:07:30.029 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(27), message="set", key="[28, 182, 243, 110, 2, 122, 187, 32, 145, 207, 181, 17, 10, 181, 8, 127, 185, 9, 54, 89, 215, 168, 86, 128, 151, 87, 19, 77, 43, 200, 110, 98, 180, 222, 242, 92, 253, 166, 239, 58, 0, 0, 0, 0]", value="[4, 123, 61, 193, 183, 48, 46, 244, 206, 117, 240, 134, 172, 231, 95, 107, 195, 137, 232, 217, 137, 196, 252, 27, 160, 193, 97, 53, 61, 251, 6, 252, 95]"
2020-08-03 18:07:30.030 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(27), message="clear", key="[28, 182, 243, 110, 2, 122, 187, 32, 145, 207, 181, 17, 10, 181, 8, 127, 3, 35, 71, 86, 87, 224, 137, 15, 189, 191, 102, 251, 36, 180, 100, 158]"
2020-08-03 18:07:30.030 tokio-blocking-driver TRACE sc_tracing  pallet_babe: on_finalize, time: 38911, id: 27, parent_id: Some(20)
2020-08-03 18:07:30.030 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(20), message="clear", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 223, 29, 174, 184, 152, 104, 55, 242, 28, 197, 209, 117, 150, 187, 120, 209, 180, 222, 242, 92, 253, 166, 239, 58, 0, 0, 0, 0]"
2020-08-03 18:07:30.030 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(20), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 176, 108, 51, 32, 198, 172, 25, 109, 129, 52, 66, 226, 112, 134, 141, 99]", value="[23, 238, 173, 0, 188, 231, 134, 30, 111, 75, 158, 3, 21, 247, 171, 184, 45, 39, 127, 45, 235, 87, 219, 90, 237, 186, 51, 219, 100, 166, 198, 233]"
2020-08-03 18:07:30.030 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(20), message="clear", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 255, 85, 59, 90, 152, 98, 165, 22, 147, 157, 130, 179, 211, 216, 102, 26]"
2020-08-03 18:07:30.030 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(20), message="clear", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 189, 192, 189, 48, 62, 152, 85, 129, 58, 168, 163, 13, 78, 252, 81, 18]"
2020-08-03 18:07:30.030 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(20), message="clear", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 168, 109, 165, 169, 50, 104, 79, 25, 149, 57, 131, 111, 203, 140, 136, 111]"
2020-08-03 18:07:30.030 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(20), message="clear", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 2, 165, 193, 177, 154, 183, 160, 79, 83, 108, 81, 154, 202, 73, 131, 172]"
2020-08-03 18:07:30.030 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(20), message="clear", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 138, 66, 243, 51, 35, 203, 92, 237, 59, 68, 221, 130, 95, 218, 159, 204]"
2020-08-03 18:07:30.030 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(20), message="clear", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 153, 231, 249, 63, 198, 169, 143, 8, 116, 253, 5, 127, 17, 28, 77, 45]"
2020-08-03 18:07:30.030 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(20), message="clear", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 176, 108, 51, 32, 198, 172, 25, 109, 129, 52, 66, 226, 112, 134, 141, 99]"
2020-08-03 18:07:30.030 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(20), message="root"
2020-08-03 18:07:30.030 tokio-blocking-driver INFO sc_tracing  sp_io::storage, parent_id: Some(20), message="changes_root", parent_hash="[254, 37, 167, 221, 21, 39, 156, 245, 189, 145, 68, 227, 146, 101, 99, 64, 149, 127, 97, 226, 98, 197, 41, 62, 180, 155, 131, 14, 115, 108, 172, 163]"
2020-08-03 18:07:30.030 tokio-blocking-driver INFO sc_tracing  frame_executive: finalize_block, time: 458965, id: 20, parent_id: None, values: block_number="1"
2020-08-03 18:07:30.032 tokio-runtime-worker DEBUG sc_tracing  sc_service::client::client: import_block, time: 158662, id: 28, parent_id: None
2020-08-03 18:07:30.032  INFO sc_tracing  frame_executive: extract_pre_digest, time: 370, id: 30, parent_id: Some(29)
2020-08-03 18:07:30.032  INFO sc_tracing  sp_io::storage, parent_id: Some(29), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 255, 85, 59, 90, 152, 98, 165, 22, 147, 157, 130, 179, 211, 216, 102, 26]", value="[2]"
2020-08-03 18:07:30.032  INFO sc_tracing  sp_io::storage, parent_id: Some(29), message="set", key="[58, 101, 120, 116, 114, 105, 110, 115, 105, 99, 95, 105, 110, 100, 101, 120]", value="[0, 0, 0, 0]"
2020-08-03 18:07:30.032  INFO sc_tracing  sp_io::storage, parent_id: Some(29), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 2, 165, 193, 177, 154, 183, 160, 79, 83, 108, 81, 154, 202, 73, 131, 172]", value="[1, 0, 0, 0]"
2020-08-03 18:07:30.032  INFO sc_tracing  sp_io::storage, parent_id: Some(29), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 153, 231, 249, 63, 198, 169, 143, 8, 116, 253, 5, 127, 17, 28, 77, 45]", value="[4, 6, 66, 65, 66, 69, 181, 1, 1, 0, 0, 0, 0, 198, 22, 184, 31, 0, 0, 0, 0, 38, 244, 241, 172, 148, 87, 33, 213, 216, 72, 39, 197, 43, 145, 125, 119, 7, 49, 23, 183, 189, 0, 31, 160, 41, 144, 57, 173, 154, 87, 190, 46, 29, 253, 183, 140, 101, 233, 83, 126, 207, 59, 136, 103, 252, 103, 213, 139, 42, 134, 6, 236, 106, 83, 186, 46, 226, 100, 226, 94, 240, 27, 174, 2, 47, 132, 59, 202, 136, 20, 188, 155, 160, 87, 41, 226, 205, 241, 210, 155, 30, 138, 130, 145, 228, 29, 84, 215, 233, 119, 45, 98, 110, 41, 85, 1]"
2020-08-03 18:07:30.032  INFO sc_tracing  sp_io::storage, parent_id: Some(29), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 138, 66, 243, 51, 35, 203, 92, 237, 59, 68, 221, 130, 95, 218, 159, 204]", value="[254, 37, 167, 221, 21, 39, 156, 245, 189, 145, 68, 227, 146, 101, 99, 64, 149, 127, 97, 226, 98, 197, 41, 62, 180, 155, 131, 14, 115, 108, 172, 163]"
2020-08-03 18:07:30.032  INFO sc_tracing  sp_io::storage, parent_id: Some(29), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 164, 71, 4, 181, 104, 210, 22, 103, 53, 106, 90, 5, 12, 17, 135, 70, 180, 222, 242, 92, 253, 166, 239, 58, 0, 0, 0, 0]", value="[254, 37, 167, 221, 21, 39, 156, 245, 189, 145, 68, 227, 146, 101, 99, 64, 149, 127, 97, 226, 98, 197, 41, 62, 180, 155, 131, 14, 115, 108, 172, 163]"
2020-08-03 18:07:30.032  INFO sc_tracing  sp_io::storage, parent_id: Some(29), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 176, 108, 51, 32, 198, 172, 25, 109, 129, 52, 66, 226, 112, 134, 141, 99]", value="[23, 238, 173, 0, 188, 231, 134, 30, 111, 75, 158, 3, 21, 247, 171, 184, 45, 39, 127, 45, 235, 87, 219, 90, 237, 186, 51, 219, 100, 166, 198, 233]"
2020-08-03 18:07:30.033  INFO sc_tracing  sp_io::storage, parent_id: Some(29), message="clear", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 52, 171, 245, 203, 52, 214, 36, 67, 120, 205, 219, 241, 142, 132, 157, 150]"
2020-08-03 18:07:30.033  INFO sc_tracing  frame_executive: offchain_worker, time: 149392, id: 29, parent_id: None

Copy link
Contributor

@gnunicorn gnunicorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, minor requests for changes.

client/tracing/src/lib.rs Outdated Show resolved Hide resolved
client/tracing/src/lib.rs Show resolved Hide resolved
client/tracing/src/lib.rs Show resolved Hide resolved
client/tracing/Cargo.toml Outdated Show resolved Hide resolved
@mattrutherford
Copy link
Contributor Author

mattrutherford commented Aug 11, 2020

Polkadot PR needs to be approved: paritytech/polkadot#1560

client/tracing/src/lib.rs Outdated Show resolved Hide resolved
client/tracing/src/lib.rs Outdated Show resolved Hide resolved
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
@mattrutherford
Copy link
Contributor Author

bot merge

@ghost
Copy link

ghost commented Aug 12, 2020

Trying merge.

@ghost ghost merged commit 0c3cdf1 into master Aug 12, 2020
@ghost ghost deleted the tracing-events branch August 12, 2020 11:53
@liuchengxu
Copy link
Contributor

Hi, @mattrutherford, just saw the log you posted above, I realize that the tracing feature can be used to dump all the key&value associated to the state changes, then we could parse these key/values to extract the raw meta info and then build a new state db using the database like postgres, right?

@mattrutherford
Copy link
Contributor Author

Hi @liuchengxu - yes that's correct, this is exactly one of the use-cases planned for this feature. However, please note that the branch containing the new traces is not merged yet, but hopefully will be ready soon.

Also perhaps of interest, we have another PR open to switch the logging system over in totality to tracing: #6825

@liuchengxu
Copy link
Contributor

liuchengxu commented Aug 17, 2020

@mattrutherford Awesome! Do you also have a plan to build a new state db using this feature on your own or prefer let the third party to do this job? We are very interested in this and would love to help push it. I'm the developer from ChainX by the way :(.

@mattrutherford
Copy link
Contributor Author

Hi @liuchengxu actually perhaps https://github.com/paritytech/substrate-archive already does what you need?

weichweich added a commit to KILTprotocol/substrate that referenced this pull request Aug 18, 2020
commit f8c83bd
Author: Roman Borschel <romanb@users.noreply.github.com>
Date:   Tue Aug 18 07:59:32 2020 +0200

    Add support for sourced metrics. (paritytech#6895)

    * Add support for sourced metrics.

    A sourced metric is a metric that obtains its values
    from an existing source, rather than the values being
    independently recorded. It thus allows collecting
    metrics from existing counters or gauges without
    having to duplicate them in a dedicated prometheus
    counter or gauge (and hence another atomic value).

    The first use-case is to feed the bandwidth counters
    from libp2p directly into prometheus.

    * Tabs, not spaces.

    * Tweak bandwidth counter registration.

    * Add debug assertion for variable labels and values.

    * Document monotonicity requirement for sourced counters.

    * CI

    * Update client/network/src/service.rs

    Co-authored-by: Max Inden <mail@max-inden.de>

    Co-authored-by: Max Inden <mail@max-inden.de>

commit 8e1ed7d
Author: Shawn Tabrizi <shawntabrizi@gmail.com>
Date:   Mon Aug 17 22:59:23 2020 +0200

    WeightInfo for System, Timestamp, and Utility (paritytech#6868)

    * initial updates to system

    * fix compile

    * Update writer.rs

    * update weights

    * finish system weights

    * timestamp weights

    * utility weight

    * Fix overflow in weight calculations

    * add back weight notes

    * Update for whitelisted benchmarks

    * add trait bounds

    * Revert "add trait bounds"

    This reverts commit 12b08b7.

    * Update weights for unaccounted for read

commit 399421a
Author: Wei Tang <wei@that.world>
Date:   Mon Aug 17 21:07:30 2020 +0200

    Derive Clone for AlwaysCanAuthor, NeverCanAuthor, CanAuthorWithNativeVersion (paritytech#6906)

commit 287ecc2
Author: Wei Tang <wei@that.world>
Date:   Mon Aug 17 19:36:29 2020 +0200

    pow: add access to pre-digest for algorithm verifiers (paritytech#6900)

    * pow: fetch pre-runtime digest to verifier

    * Add Other error type

    * Fix log target and change docs to refer to pre_runtime

commit 488b7c7
Author: Wei Tang <wei@that.world>
Date:   Mon Aug 17 13:41:09 2020 +0200

    babe, aura, pow: only call check_inherents if authoring version is compatible (paritytech#6862)

    * pow: check can_author_with before calling check_inherents

    * babe: check can_author_with before calling check_inherents

    * aura: check can_author_with before calling check_inherents

    * Fix node and node template compile

    * Add missing comma

    * Put each parameter on its own line

    * Add debug print

    * Fix line width too long

    * Fix pow line width issue

commit fc743da
Author: Pierre Krieger <pierre.krieger1708@gmail.com>
Date:   Mon Aug 17 11:19:16 2020 +0200

    Add a DirectedGossip struct (paritytech#6803)

    * Add a DirectedGossip struct

    * Move protocol from prototype::new to biuld

    * More traits impls

    * Explain ordering

    * Apply suggestions from code review

    Co-authored-by: Toralf Wittner <tw@dtex.org>

    * Address concerns

    * Add basic test

    * Concerns

    * More concerns

    * Remove QueueSenderPrototype

    * Rename

    * Apply suggestions from code review

    Co-authored-by: Max Inden <mail@max-inden.de>

    Co-authored-by: Toralf Wittner <tw@dtex.org>
    Co-authored-by: parity-processbot <>
    Co-authored-by: Max Inden <mail@max-inden.de>

commit 0079140
Author: Bastian Köcher <bkchr@users.noreply.github.com>
Date:   Sun Aug 16 00:05:36 2020 +0200

    Don't take the origin in `can_set_code` (paritytech#6899)

    It makes no sense that `can_set_code` takes the origin for checking it.
    Everybody reusing this function is only interested in the other checks
    that are done by this function. The origin should be checked by every
    dispatchable individually.

commit cd3b62b
Author: Seun Lanlege <seunlanlege@gmail.com>
Date:   Sat Aug 15 10:08:31 2020 +0100

    RpcHandlers Refactorings (paritytech#6846)

    * allow access to the underlying Pubsub instance from RpcHandlers

    * bump Cargo.lock

    * no more Arc<RpcHandlers>

    * bump Cargo.lock

    * Debug,.

    * Arc<RpcHandlers>

    * RpcHandler

    * RpcHandlers::io_handler

    * remove chain spec from cli

    * address pr comments

    * remove stray newline

    Co-authored-by: Ashley <ashley.ruglys@gmail.com>

    Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
    Co-authored-by: Ashley <ashley.ruglys@gmail.com>

commit eec7d71
Author: Max Inden <mail@max-inden.de>
Date:   Fri Aug 14 18:15:45 2020 +0200

    client/authority-discovery: Revert query interval change (paritytech#6897)

    Revert the accidental query interval change from every one minute back
    to every 10 minutes.

commit 13b0650
Author: Roman Borschel <romanb@users.noreply.github.com>
Date:   Fri Aug 14 10:41:47 2020 +0200

    Update to libp2p-0.23. (paritytech#6870)

    * Update to libp2p-0.23.

    Thereby incorporate bandwidth measurement along the
    lines previously done by libp2p itself.

    * Tweak dependencies for wasm32 compilation.

    For wasm32 we need to enable unstable features to
    make `task::Builder::local` available.

    * Simplify dependencies.

    * Simplify.

    Leave the calculation of bytes sent/received per second
    to the outer layers of the code, subject to their own
    individual update intervals.

    * Cleanup

    * Re-add lost dev dependency.

    * Avoid division by zero.

    * Remove redundant metric.

    * Enable sending of noise legacy handshakes.

    * Add comment about monotonic gauge.

    * CI

commit 0e703a5
Author: Alan Sapede <alan.sapede@gmail.com>
Date:   Fri Aug 14 04:15:59 2020 -0400

    Adds debug logs to EVM frame (paritytech#6887)

commit f16cbc1
Author: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Date:   Thu Aug 13 23:30:22 2020 +0200

    More renaming to move away from phragmen. (paritytech#6886)

commit 8993a75
Author: André Silva <123550+andresilva@users.noreply.github.com>
Date:   Thu Aug 13 19:38:14 2020 +0100

    network: don't log re-discovered addresses (paritytech#6881)

    * network: move LruHashSet to network crate utils

    * network: don't log re-discovered external addresses

    * Update client/network/src/utils.rs

    Co-authored-by: mattrutherford <44339188+mattrutherford@users.noreply.github.com>

    Co-authored-by: mattrutherford <44339188+mattrutherford@users.noreply.github.com>

commit 4d3c948
Author: Alexander Popiak <alexander.popiak@parity.io>
Date:   Thu Aug 13 18:54:05 2020 +0200

    add runtime migrations to release notes/changelog (paritytech#6875)

commit d019a66
Author: Wei Tang <wei@that.world>
Date:   Thu Aug 13 14:53:42 2020 +0200

    pallet-evm: avoid double fee payment (paritytech#6858)

    * pallet-evm: avoid double fee payment

    * Only skip fee payment for successful calls

commit ed4f7a1
Author: Bastian Köcher <bkchr@users.noreply.github.com>
Date:   Wed Aug 12 21:35:10 2020 +0200

    Make `HexDisplay` useable in `no_std` (paritytech#6883)

    Actually I use this quite often when debugging some WASM bugs and there
    is no harm in enabling it by default. Before I just always copied it
    everytime I needed it.

commit 473a23f
Author: Max Inden <mail@max-inden.de>
Date:   Wed Aug 12 16:16:40 2020 +0200

    client/authority-discovery: Introduce AuthorityDiscoveryService (paritytech#6760)

    * client/authority-discovery: Rename AuthorityDiscovery to XXXWorker

    * client/authority-discovery: Introduce AuthorityDiscoveryService

    Add a basic `AuthorityDiscoveryService` implementation which enables
    callers to get the addresses for a given `AuthorityId` from the local
    cache.

    * client/authority-discovery: Split into worker and service mod

    Move `Service` and `Worker` to their own Rust modules resulting in the
    following file structure.

    ├── build.rs
    ├── Cargo.toml
    └── src
        ├── error.rs
        ├── lib.rs
        ├── service.rs
        ├── tests.rs
        ├── worker
        │   ├── addr_cache.rs
        │   ├── schema
        │   │   └── dht.proto
        │   └── tests.rs
        └── worker.rs

    * client/authority-discovery: Cache PeerId -> AuthorityId mapping

    * client/authority-discovery: Update priority group on interval

    Instead of updating the authority discovery peerset priority group each
    time a new DHT value is found, update it regularly on an interval.

    This removes the need for deterministic random selection. Instead of
    trying to return a random stable set of `Multiaddr`s, the `AddrCache`
    now returns a random set on each call.

    * client/authority-discovery: Implement Service::get_authority_id

    * client/authority-discovery: Use HashMap instead of BTreeMap

    * client/authority-discovery: Rework priority group interval

    * client/authority-discovery: Fix comment

    * bin/node/cli: Update authority discovery constructor

    * client/authority-discovery: Fuse from_service receiver

    * client/authority-discovery: Remove Rng import

    * client/authority-discovery: Ignore Multiaddr without PeerId

    * client/authority-discovery/service: Add note on returned None

    * client/authority-discovery/addr_cache: Replace double clone with deref

commit c495f89
Author: Cecile Tonglet <cecile@parity.io>
Date:   Wed Aug 12 16:07:11 2020 +0200

    Add async test helper to timeout and provide a task_executor automatically (paritytech#6651)

    * Initial commit

    Forked at: 60e3a69
    Parent branch: origin/master

    * Add async test helper to timeout and provide a task_executor automatically

    * simplify error message to avoid difference between CI and locally

    * forgot env var

    * Use runtime env var instead of build env var

    * Rename variable to SUBSTRATE_TEST_TIMEOUT

    * CLEANUP

    Forked at: 60e3a69
    Parent branch: origin/master

    * Apply suggestions from code review

    Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

    * Re-export from test-utils

    * Default value to 120

    * fix wrong crate in ci

    * Revert "Default value to 120"

    This reverts commit 8e45871.

    * Fix version

    * WIP

    Forked at: 60e3a69
    Parent branch: origin/master

    * WIP

    Forked at: 60e3a69
    Parent branch: origin/master

    * WIP

    Forked at: 60e3a69
    Parent branch: origin/master

    * remove feature flag

    * fix missing dependency

    * CLEANUP

    Forked at: 60e3a69
    Parent branch: origin/master

    * fix test

    * Removed autotests=false

    * Some doc...

    * Apply suggestions from code review

    Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

    * WIP

    Forked at: 60e3a69
    Parent branch: origin/master

    * WIP

    Forked at: 60e3a69
    Parent branch: origin/master

    * Update test-utils/src/lib.rs

    Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

commit 0c3cdf1
Author: mattrutherford <44339188+mattrutherford@users.noreply.github.com>
Date:   Wed Aug 12 12:53:21 2020 +0100

    Implement tracing::Event handling & parent_id for spans and events (paritytech#6672)

    * implement events handling, implement parent_id for spans & events

    * add events to sp_io::storage

    * update test

    * add tests

    * adjust limit

    * let tracing crate handle parent_ids

    * re-enable current-id tracking

    * add test for threads with CurrentSpan

    * fix log level

    * remove redundant check for non wasm traces

    * remove duplicate definition in test

    * Adding conditional events API

    * prefer explicit parent_id over current,

    enhance test

    * limit changes to client::tracing event implementation

    * remove From impl due to fallback required on parent_id

    * implement SPAN_LIMIT

    change event log output

    * change version of tracing-core

    * update dependancies

    * revert limit

    * remove duplicate dependency

    * Apply suggestions from code review

    Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

    Co-authored-by: Matt Rutherford <mattrutherford@users.noreply.github.com>
    Co-authored-by: Benjamin Kampmann <ben@parity.io>
    Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

commit 5b809d2
Author: Wei Tang <wei@that.world>
Date:   Wed Aug 12 12:46:28 2020 +0200

    pallet-evm: fix wrong logic in mutate_account_basic (paritytech#6786)

    * pallet-evm: fix wrong logic in mutate_account_basic

    * Add test for mutate account

commit f6d66db
Author: Pierre Krieger <pierre.krieger1708@gmail.com>
Date:   Wed Aug 12 11:58:01 2020 +0200

    Add a warning if users pass --sentry or --sentry-nodes (paritytech#6779)

    * Add a warning if users pass --sentry or --sentry-nodes

    * Apply suggestions from code review

    Co-authored-by: Max Inden <mail@max-inden.de>

    * Fix text

    Co-authored-by: parity-processbot <>
    Co-authored-by: Max Inden <mail@max-inden.de>

commit d7979d0
Author: Shaopeng Wang <spxwang@gmail.com>
Date:   Wed Aug 12 21:21:36 2020 +1200

    Implement 'transactional' annotation for runtime functions. (paritytech#6763)

    * Implement 'transactional' annotation for runtime functions.

    * Allow function attributes for dispatchable calls in decl_module.

    * decl_module docs: add transactional function example.

    * decl_module docs: add function attributes notes.

    * Fix license header.

commit d4efdf0
Author: Pierre Krieger <pierre.krieger1708@gmail.com>
Date:   Wed Aug 12 10:58:16 2020 +0200

    Fuse the import queue receiver (paritytech#6876)

    * Fix the import queue receiver

    * Add logging

commit a20fbd5
Author: André Silva <123550+andresilva@users.noreply.github.com>
Date:   Tue Aug 11 22:21:45 2020 +0100

    docs: fix references to code of conduct document (paritytech#6879)

commit e7cc595
Author: h4x3rotab <h4x3rotab@gmail.com>
Date:   Wed Aug 12 04:12:34 2020 +0800

    Add Phala Network SS58 address type (paritytech#6758)

commit fe3fc04
Author: André Silva <123550+andresilva@users.noreply.github.com>
Date:   Tue Aug 11 20:55:15 2020 +0100

    docs: convert code of conduct to markdown (paritytech#6878)

commit 72addfa
Author: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Date:   Tue Aug 11 17:07:17 2020 +0200

    Fix wrong staking doc about transaction payment. (paritytech#6873)

    * Fx paritytech#4616

    * Fix paritytech#4616

commit 4064378
Author: André Silva <123550+andresilva@users.noreply.github.com>
Date:   Tue Aug 11 16:05:59 2020 +0100

    grandpa: change some logging from trace to debug (paritytech#6872)

    * grandpa: change some logging from trace to debug

    * grandpa: cleanup unused import

commit 6f57582
Author: Nikolay Volf <nikvolf@gmail.com>
Date:   Tue Aug 11 18:05:31 2020 +0300

    Move to upstream wasmtime, refactor globals snapshot  (paritytech#6759)

    * refactor globals snapshot

    * ignore test

    * update pwasm-utils ref

    * line width

    * add doc comment for internal struct

    * add explanation for iteration

    * Demote rustdoc to a comment

    * use 0.14

    Co-authored-by: Sergei Shulepov <sergei@parity.io>

commit a362997
Author: Arkadiy Paronyan <arkady.paronyan@gmail.com>
Date:   Tue Aug 11 16:12:30 2020 +0200

    Block packet size limit (paritytech#6398)

    * Block packet size limit

    * Update client/network/src/protocol.rs

    Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>

    * Add block response limit

    Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
@liuchengxu
Copy link
Contributor

@mattrutherford Thanks for the link! That's near to what we want and I already contacted aplaza, thanks again!

insipx pushed a commit to insipx/substrate that referenced this pull request Nov 9, 2020
…aritytech#6672)

* implement events handling, implement parent_id for spans & events

* add events to sp_io::storage

* update test

* add tests

* adjust limit

* let tracing crate handle parent_ids

* re-enable current-id tracking

* add test for threads with CurrentSpan

* fix log level

* remove redundant check for non wasm traces

* remove duplicate definition in test

* Adding conditional events API

* prefer explicit parent_id over current,

enhance test

* limit changes to client::tracing event implementation

* remove From impl due to fallback required on parent_id

* implement SPAN_LIMIT

change event log output

* change version of tracing-core

* update dependancies

* revert limit

* remove duplicate dependency

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Matt Rutherford <mattrutherford@users.noreply.github.com>
Co-authored-by: Benjamin Kampmann <ben@parity.io>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants