Skip to content

Commit b027909

Browse files
Felipe Rosastevenj
andauthored
feat(cardano-chain-follower): Implementation (#43)
* chore: cardano-node-follower crate API design * chore: allow Blue Oak license (need for minicbor crate) * chore: drop node-to-client support and make rollback chain update return a block * feat: Add chain follower config and builder * chore: Remove chain follower crate example (hard to keep up to date) * chore: Remove chain follower struct fields (implementation specific) * feat: Add chain follower block fetch methods * chore: Add fetch block and fetch block range examples * chore: Fix lint and fmt * chore: Add chain reader struct and refactor some methods * chore: Add words to cspell project dictionary * chore: fix fmt * chore: Change read_block point type * chore: Fix lint * chore: Update rust CI version * feat: Chain reader implemetation * feat: Chain follower implemetation * chore: Add tracing-subscriber to examples (logging enabled by default env) * chore: Fix lint * chore: Fix lint * chore: Remove Cargo.lock * feat: Cardano chain follower Mithril snapshots integration (#60) * feat(cardano-chain-follower): Split reader and follower and reader now supports reading single block and block ranges from Mithril snapshots * feat(cardano-chain-follower): Follower now uses request-response to communicate with its background task * feat(cardano-chain-follower): Follower reads blocks from Mithril snapshot (if configured) * chore(cardano-chain-follower): Cleanup traces and add missing docs * chore(cardano-chain-follower): Fix linter issues * chore(cardano-chain-follower): Fix formatting * chore(cardano-chain-follower): Fix spelling and cspell config * chore(cardano-chain-follower): Use pallas_hardano as a separate crate to avoid license issues * chore: Add cleanup comment to Cargo.toml * chore: Update CI files --------- Co-authored-by: Steven Johnson <stevenj@users.noreply.github.com>
1 parent b9088e7 commit b027909

File tree

23 files changed

+1260
-1909
lines changed

23 files changed

+1260
-1909
lines changed

.config/dictionaries/project.dic

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ addrr
33
adminer
44
asyncio
55
auditability
6+
backpressure
7+
blockfetch
68
BROTLI
79
cardano
810
cbor
911
CEST
12+
chainsync
1013
chrono
1114
ciphertext
1215
codepoints
@@ -25,6 +28,7 @@ fontawesome
2528
fsgr
2629
genhtml
2730
gmtime
31+
hardano
2832
ideascale
2933
Intellij
3034
iohk
@@ -38,6 +42,7 @@ Leshiy
3842
localizable
3943
mdlint
4044
miniprotocols
45+
mithril
4146
mitigations
4247
moderations
4348
multiera

cspell.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
//.config/dictionaries/cspell/sv/cspell-ext.json
216216
//.config/dictionaries/cspell/tr_TR/cspell-ext.json
217217
//.config/dictionaries/cspell/uk_UA/cspell-ext.json
218-
//.config/dictionaries/cspell/vi_VN/cspell-ext.json
218+
//.config/dictionaries/cspell/vi_VN/cspell-ext.json
219219
],
220220
"ignorePaths": [
221221
".config/dictionaries/**",
@@ -225,6 +225,7 @@
225225
"**/.gitignore",
226226
".vscode/**",
227227
"**/.idea/**",
228-
"hermes/wasm/*/**"
228+
"hermes/wasm/*/**",
229+
"hermes/crates/cardano-chain-follower/examples/snapshot_data"
229230
]
230-
}
231+
}

docs/Earthfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ src:
1111
# Now copy into that any artifacts we pull from the builds.
1212
COPY --dir ../+repo-docs/repo /docs/includes
1313
# copy Rust docs
14-
COPY ./../hermes+hosted-build/doc /docs/src/api/rust-docs
14+
COPY ./../hermes+build/doc /docs/src/api/rust-docs
1515

1616
# Build the docs here.
1717
docs:

hermes/.cargo/config.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Use MOLD linker where possible, but ONLY in CI applicable targets.
22
# cspell: words rustflags armv gnueabihf msvc nextest idents rustdocflags
33
# cspell: words rustdoc lintfix lintrestrict testfast testdocs codegen testci testunit
4-
# cspell: words fmtchk fmtfix
4+
# cspell: words fmtchk fmtfix testcov
55

66
# Configure how Docker container targets build.
77

@@ -28,6 +28,8 @@ rustflags = [
2828
"-C", "target-feature=-crt-static"
2929
]
3030

31+
[target.wasm32-unknown-unknown]
32+
rustflags = ["--cap-lints", "warn"]
3133

3234
[build]
3335

@@ -110,23 +112,21 @@ codegen-units = 16
110112
[alias]
111113
lint = "clippy --all-targets -- -D warnings -D clippy::pedantic -D clippy::unwrap_used -D clippy::expect_used -D clippy::exit -D clippy::get_unwrap -D clippy::index_refutable_slice -D clippy::indexing_slicing -D clippy::match_on_vec_items -D clippy::match_wild_err_arm -D clippy::missing_panics_doc -D clippy::panic -D clippy::string_slice -D clippy::unchecked_duration_subtraction -D clippy::unreachable -D clippy::missing_docs_in_private_items"
112114
lintfix = "clippy --all-targets --fix --allow-dirty -- -D warnings -D clippy::pedantic -D clippy::unwrap_used -D clippy::expect_used -D clippy::exit -D clippy::get_unwrap -D clippy::index_refutable_slice -D clippy::indexing_slicing -D clippy::match_on_vec_items -D clippy::match_wild_err_arm -D clippy::missing_panics_doc -D clippy::panic -D clippy::string_slice -D clippy::unchecked_duration_subtraction -D clippy::unreachable -D clippy::missing_docs_in_private_items"
113-
lintrestrict = "clippy -- -D warnings -D clippy::pedantic -D clippy::restriction -D clippy::missing_docs_in_private_items"
114-
lint-vscode = "clippy --workspace --message-format=json-diagnostic-rendered-ansi --all-targets -- -D warnings -D clippy::pedantic -D clippy::unwrap_used -D clippy::expect_used -D clippy::exit -D clippy::get_unwrap -D clippy::index_refutable_slice -D clippy::indexing_slicing -D clippy::match_on_vec_items -D clippy::match_wild_err_arm -D clippy::missing_panics_doc -D clippy::panic -D clippy::string_slice -D clippy::unchecked_duration_subtraction -D clippy::unreachable -D clippy::missing_docs_in_private_items"
115+
lint-vscode = "clippy --message-format=json-diagnostic-rendered-ansi --all-targets -- -D warnings -D clippy::pedantic -D clippy::unwrap_used -D clippy::expect_used -D clippy::exit -D clippy::get_unwrap -D clippy::index_refutable_slice -D clippy::indexing_slicing -D clippy::match_on_vec_items -D clippy::match_wild_err_arm -D clippy::missing_panics_doc -D clippy::panic -D clippy::string_slice -D clippy::unchecked_duration_subtraction -D clippy::unreachable -D clippy::missing_docs_in_private_items"
115116

116-
docs = "doc --workspace -r --all-features --no-deps --bins --document-private-items --examples --locked"
117+
docs = "doc --release --no-deps --document-private-items --bins --lib --examples"
117118
# nightly docs build broken... when they are'nt we can enable these docs... --unit-graph --timings=html,json -Z unstable-options"
118-
testfast = "nextest run --release --workspace --locked"
119-
testunit = "nextest run --release --bins --lib --workspace --locked -P ci"
120-
testci = "nextest run --release --workspace --locked -P ci"
121-
testdocs = "test --doc --release --workspace --locked"
119+
testunit = "nextest run --release --bins --lib -P ci"
120+
testcov = "llvm-cov nextest --release --bins --lib -P ci"
121+
testdocs = "test --doc --release"
122122

123123
# Rust formatting, MUST be run with +nightly
124124
fmtchk = "fmt -- --check -v --color=always"
125125
fmtfix = "fmt -- -v"
126126

127127
[term]
128-
quiet = false # whether cargo output is quiet
129-
verbose = true # whether cargo provides verbose output
130-
color = 'always' # whether cargo colorizes output use `CARGO_TERM_COLOR="off"` to disable.
131-
progress.when = 'auto' # whether cargo shows progress bar
132-
progress.width = 80 # width of progress bar
128+
quiet = false # whether cargo output is quiet
129+
verbose = false # whether cargo provides verbose output
130+
color = 'auto' # whether cargo colorizes output use `CARGO_TERM_COLOR="off"` to disable.
131+
progress.when = 'never' # whether cargo shows progress bar
132+
progress.width = 80 # width of progress bar

hermes/.config/nextest.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ path = "junit.xml"
3535
# The name of the top-level "report" element in JUnit report. If aggregating
3636
# reports across different test runs, it may be useful to provide separate names
3737
# for each report.
38-
report-name = "cat-gateway"
38+
report-name = "nextest"
3939

4040
# Whether standard output and standard error for passing tests should be stored in the JUnit report.
4141
# Output is stored in the <system-out> and <system-err> elements of the <testcase> element.

0 commit comments

Comments
 (0)