Skip to content

Commit acf37fe

Browse files
Explorer crate (#3350)
* workspace: add explorer crate - the logging setup is copy-pasted from jormungandr * jormungandr: remove explorer module * jormungandr: remove async-graphql dep from jormungandr * jormungandr-lib: remove explorer import * tests: remove explorer * tests: regen explorer schema without treasury for now having integration tests with the explorer and jormungandr will always be good anyway, so having a way of launching an explorer in integration tests for the purposes of testing the explorer is something that we probably want. This is a first approximation towards that. * tests: add explorer env var * tests: remove explorer where necessary * remove whitespace from autgenerated graphql schema in order to please the editorconfig check * port Transaction total_count fix * add(port) ConfigParams to GraphQL * remove enum name from variants * reorganize imports * explorer crate: add warp filter like in jormungandr * circle: build explorer before running tests * add(port) MintToken * fix tests: use rest for current time instead of explorer * return a Result in set_tip this makes the code a bit more self-documenting than with a boolean, even if the error value is not actually used here. * remove unused Result alias * build explorer in actions test pipeline too * handly tally type at an earlier point because otherwise the function will panic for public tally, as there is no decrypted tally * log listen address when cors is not enabled * collect tally result instead of looping * remove line added by mistake * fix PersistentSequence::is_empty it was returning the opposite value * remove unused files * impl From instead of TryFrom * use Certificate::from instead of try_from * fix tests: explorer is not a node setting anymore * add retry when querying the explorer to account for slow IO, or performance issues when running the test * move explorer process spawn to JormungandrProcess this allows using it in other tests, like in `retire_stake_pool_explorer` and other integration tests * remove unnecessary thread::sleep in test * handle evm config param by just panicking, proper suppport can be done later * fix compilation issues * port EvmConfig code from jormungandr * add changelog entry * update Cargo.lock * port/update config_param.rs * refactor subscriber init * test: send explorer logs to stdout * explorer sanity test: reduce attemps to 20 Co-authored-by: Giacomo Pasini <[email protected]>
1 parent 7861428 commit acf37fe

File tree

70 files changed

+1956
-903
lines changed

Some content is hidden

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

70 files changed

+1956
-903
lines changed

.circleci/config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ commands:
9393
name: Build jcli
9494
command: |
9595
cargo build -p jcli --bin jcli << parameters.mode >> << parameters.cargo_behavior >>
96+
- run:
97+
name: Build explorer
98+
command: |
99+
cargo build -p explorer --bin explorer << parameters.mode >> << parameters.cargo_behavior >>
96100
- run:
97101
name: Build tests
98102
command: |

.github/workflows/test.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,13 @@ jobs:
195195
command: build
196196
args: --tests --all-features ${{ env.CARGO_FLAGS }}
197197

198+
- name: Build explorer
199+
uses: actions-rs/cargo@v1
200+
timeout-minutes: 30
201+
with:
202+
command: build
203+
args: -p explorer ${{ env.CARGO_FLAGS }}
204+
198205
- name: Run tests
199206
uses: actions-rs/cargo@v1
200207
timeout-minutes: 90

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
- Change `blockContentSizeAvg` to represent information as a percentage of the block max size.
2323
- Bump ed25519-bip32 from 0.4.0 to 0.4.1
2424
- Now the tally is incremental and is always available in the rest API. The
25-
EncryptedVoteTally certificate serves no purpose anymore and is thus removed.
25+
- Add standalone explorer crate.
2626

2727
## Release 0.13.0
2828

0 commit comments

Comments
 (0)