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

State Tracing #134

Merged
merged 115 commits into from
Jan 29, 2021
Merged
Show file tree
Hide file tree
Changes from 100 commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
ecaab00
bring state tracing up to date with repo structure changes
Nov 6, 2020
c601e95
some cleanup
Nov 12, 2020
70c0cf7
rustfmt
Nov 12, 2020
510b6e7
Refactor `ActorContext` -> SystemConfig
Nov 13, 2020
a965d69
Only start tracing actor if targets exit
Nov 13, 2020
e580964
fix comment
Nov 16, 2020
07141f9
Use substrate LocalCallExecutor
Nov 16, 2020
8b26d8f
switch to custom substrate branch
Nov 16, 2020
e78a27e
merge
Nov 16, 2020
a9964e8
switch back to master
Nov 17, 2020
4df6e78
traces are working
Nov 17, 2020
8032135
some cleanup after testing
Nov 18, 2020
0737991
match on spec directly
Nov 19, 2020
27bfb83
map on match instead of in constructor
Nov 19, 2020
dc5403d
clean return value in cli opts
Nov 19, 2020
9ce1d89
clean up Archive builder in binary a bit
Nov 19, 2020
272b6a4
then -> than
Nov 19, 2020
83bd641
are stored
Nov 19, 2020
d24ca38
explicit exports in workers
Nov 19, 2020
e8630e8
merge with master
Nov 19, 2020
a60370c
fix Cargo.lock
Nov 19, 2020
7bfea90
make wasm_runtime_overrides CLI argument consistent with Substrate
Nov 19, 2020
34b599b
add with-tracing to sp-tracing
Nov 19, 2020
9e5e040
"increases memory usage"
Nov 19, 2020
9973cf1
[WIP] Implement Rudimentary subscriber, get rid of sc-tracing/tracing…
Nov 19, 2020
f97b8fd
custom substrate for testing
Nov 20, 2020
98a0228
Span Information about currently executing block + hash
Dec 2, 2020
5d4546b
polishing data format
Dec 8, 2020
7dead34
Error handling
Dec 8, 2020
4bc7109
add WASM binaries to substrate-archive
Dec 8, 2020
b77f8d1
add README about wasm tracing
Dec 8, 2020
e888cc4
update schema
Dec 8, 2020
83ed3e2
state_tracing -> state_traces
Dec 9, 2020
0ff76c5
make Tracing Objects more flexible
Dec 9, 2020
a1f046e
If a Span Tree isn't found, return error
Dec 10, 2020
3202abc
Update Schema
Dec 10, 2020
dcb6c92
wip events/timestamps/format
Dec 11, 2020
f358e89
Add Timestamp to EventMessage and SpanMessage
Dec 14, 2020
a468b84
Timestamp for Spans, move line+file out of JSON
Dec 15, 2020
b03e8c1
Event insertion into database
Dec 16, 2020
c70a5e9
SortedSpans -> CollatedSpans
Dec 16, 2020
7138ebc
Add comments on all functions in state-tracing
Dec 16, 2020
1b8c3f4
Some comment fixups
Dec 16, 2020
a583c96
Fix: Properly filter spans by target
Dec 16, 2020
f4d5113
Fix panic on shutdown when in debug mode
Dec 16, 2020
995a849
Add special key
Dec 16, 2020
1b1a334
is_event for EventMessage should be true
Dec 16, 2020
b966643
remove unused state tracing CLi flag
Dec 16, 2020
b3029bb
make targets work with levels
Dec 17, 2020
c113f1c
Uncomment code for testing.
Dec 17, 2020
8ee3f0e
update schema
Dec 17, 2020
1aa7c33
Fix README
Dec 17, 2020
c561500
remove tabs from doc-comment
Jan 6, 2021
d1d8f24
Clippy lints
Jan 6, 2021
1371f62
merge with master
Jan 6, 2021
b8d47df
merge with master
Jan 11, 2021
5f1e491
fix wasm binaries, add v0.8.27
Jan 11, 2021
27a22ff
docs and removal of debug lines
Jan 11, 2021
6cf46db
merge with master
Jan 11, 2021
0f07b06
rustfmt
Jan 11, 2021
72b96a2
simplify boolean expression
Jan 12, 2021
f1f1f76
increase timeout by 250 ms
Jan 12, 2021
f1987d8
increase timeout to 30s
Jan 12, 2021
7c820d5
remove debug code
Jan 12, 2021
0e7247a
add 0.8.27 to list of supported versions
Jan 12, 2021
c57b560
merge with master
Jan 18, 2021
a53fcea
tracing config
Jan 18, 2021
ce1c106
remove tracing_actor, pull tracing subscriber into its own module
Jan 19, 2021
9f9f8b1
trace insertion
Jan 21, 2021
8a8c0ed
comments and removal of no longer needed info
Jan 21, 2021
c8bea5a
conf -> ctx for Actor Handlers
Jan 21, 2021
2a542c0
some cleanup of errors
Jan 21, 2021
db5b18a
remove debugging commented code
Jan 22, 2021
6d64e3b
Update substrate-archive/src/database.rs
insipx Jan 25, 2021
de031e3
Update substrate-archive/src/wasm_tracing.rs
insipx Jan 25, 2021
70c512e
some improvements
Jan 25, 2021
63f49b7
Merge branch 'master' of github.com:paritytech/substrate-archive into…
Jan 25, 2021
d6b7b57
Merge branch 'insipx/state-tracing' of github.com:paritytech/substrat…
Jan 25, 2021
404e6f1
fix whitespace in license
Jan 25, 2021
d4ef899
make target/name patching clearer
Jan 25, 2021
f8c970e
add comment for BlockHash
Jan 25, 2021
40e95ad
fix comment in block execution task
Jan 25, 2021
249f8a5
unwrap_or_else
Jan 25, 2021
a1ac611
remove timer in blocks
Jan 25, 2021
9afc806
make imports consistent
Jan 25, 2021
1c13bdd
comment for actor timeout
Jan 25, 2021
2a934a5
comment for actor timeout
Jan 25, 2021
aaf7814
SpanEvents -> SpansAndEvents
Jan 26, 2021
4f3a1d4
use Option<Id> for EventMessage + Do not throw out events w/o parent id
Jan 26, 2021
d086d58
small nit fix
Jan 26, 2021
1e059c8
Use bigint for duration and store all nanoseconds
Jan 26, 2021
ad75766
move time calculation to try_close
Jan 26, 2021
cba5b1d
fix try_close
Jan 26, 2021
ad8cd4e
Update substrate-archive/src/wasm_tracing.rs
insipx Jan 27, 2021
38abf09
merge with master
Jan 28, 2021
a14740e
Merge branch 'insipx/state-tracing' of github.com:paritytech/substrat…
Jan 28, 2021
831bff3
re-add dead code
Jan 28, 2021
fbfaad4
uncomment debug
Jan 28, 2021
02a2e60
make sure we are not collecting empty traces
Jan 28, 2021
41e25f6
back to defaults
Jan 28, 2021
dbc8feb
fix merge conflict in node-template
Jan 28, 2021
cd6e6f3
fix style for CI
Jan 28, 2021
56bf85d
update deps in hopes it will please CI
Jan 28, 2021
0f4b778
fix batch reserver count
Jan 28, 2021
1f9d66a
Vec<u8> -> &[u8] to be idiomatic
Jan 28, 2021
585283d
fix bool in tasks && simplify boolean in tracing
Jan 28, 2021
71be70e
avoid allocations in handle_traces
Jan 28, 2021
8143ba9
mem::replace for storage
Jan 28, 2021
422f450
Update bin/polkadot-archive/Cargo.toml
insipx Jan 29, 2021
6f9caca
remove unused cfg(test)
Jan 29, 2021
b1900ca
Merge branch 'insipx/state-tracing' of github.com:paritytech/substrat…
Jan 29, 2021
3ec2049
Remove clones, comments, unused deps
Jan 29, 2021
10bc278
Moar docs
Jan 29, 2021
9b32bb2
fix time error
Jan 29, 2021
52c70fa
update schema
Jan 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,008 changes: 694 additions & 314 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Read the [Doc](https://github.com/paritytech/substrate-archive/blob/master/CONTR

## Documentation

You can build the documentation for this crate by running `cargo doc` in the `archive` directory.
You can build the documentation for this crate by running `cargo doc`.
More Docs [here](https://github.com/paritytech/substrate-archive/wiki)

## Troubleshooting
Expand Down
Binary file modified SubstrateArchiveSchema.pdf
Binary file not shown.
Binary file modified SubstrateArchiveSchema.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions bin/node-template-archive/src/cli_opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,36 @@ impl CliOpts {
3 => log::LevelFilter::Debug,
4 | _ => log::LevelFilter::Trace,
};
<<<<<<< HEAD
insipx marked this conversation as resolved.
Show resolved Hide resolved
let file = matches.value_of("config").expect("Config is a required value");
let chain_spec;
let spec = matches.value_of("spec");
if spec.is_some() {
insipx marked this conversation as resolved.
Show resolved Hide resolved
match spec {
Some("dev") => {
chain_spec = node_template::chain_spec::development_config();
}
Some("") | Some("local") => {
chain_spec = node_template::chain_spec::local_testnet_config();
}
path => {
chain_spec = node_template::chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(
path.expect("checked for existence; qed"),
))
}
}
} else {
panic!("Chain spec could not be loaded; is the path correct?")
}

=======
let chain_spec = match matches.value_of("spec") {
Some("dev") => node_template::chain_spec::development_config(),
Some("") | Some("local") => node_template::chain_spec::local_testnet_config(),
Some(path) => node_template::chain_spec::ChainSpec::from_json_file(PathBuf::from(path)),
_ => panic!("Chain spec could not be loaded; is the path correct?"),
};
>>>>>>> 634ec5d7c62e2b09dca83a0851e517f9e2ed5642
CliOpts {
file: file.map(PathBuf::from),
log_level,
Expand Down
Loading