Skip to content

Commit

Permalink
feat: importer component (#1584)
Browse files Browse the repository at this point in the history
* initial commit

* temp fix

* add test

* todo: fix consensus and chain

* fix chain

* fix build errors

* fix modes

* lint

* fix

* rename

* fix

* fix chain

* rename

* refac and implement simpleconsensus

* add simple consensus into main

* lint

* fix: remove optional http url

* fix: review

* temp fix

* comment

* fix init

* change to spawn named

* add blockchain client graceful shutdown

* improve shutdown warnings

* improve shutdown

* small refactoring

* revert optional args and add validations

* revert

* fix

* fix just file

* remove unused test

* remove default flag

* fix missing flag

* fix missing flags

* moving mode config var to stratus config

* fix raft

* improve validation

* naming

* remove unused

* remove unused

* comments

* add ws check

* lint

* fmt

* remove unnecessary condition

* remove unused

* fix just commands

* fix e2e

* improve

* fmt

* fix

* rename

* fix naming

* remove build bin for run with importer

* remove dotfile change

* remove importer online

* set default

* refactor to var

---------

Co-authored-by: Daniel Freire <[email protected]>
  • Loading branch information
gabriel-aranha-cw and carneiro-cw authored Aug 5, 2024
1 parent 7a6372c commit 7bc1805
Show file tree
Hide file tree
Showing 38 changed files with 1,488 additions and 2,120 deletions.
24 changes: 1 addition & 23 deletions .github/workflows/build-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,14 @@ jobs:
- name: Build binaries
run: |
cargo build --release \
--bin run-with-importer --bin stratus --bin importer-online \
--bin stratus \
--features "$FEATURES"
env:
CARGO_PROFILE_RELEASE_DEBUG: 1
TRACING_LOG_FORMAT: json
NO_COLOR: 1
FEATURES: "${{ github.event.inputs.features || 'default' }}"

- name: Upload run with importer
uses: actions/upload-artifact@v4
id: upload-rwi
with:
name: run-with-importer-${{ github.sha }}
path: target/release/run-with-importer
if-no-files-found: error
retention-days: ${{ env.RETENTION_DAYS }}

- name: Upload stratus
uses: actions/upload-artifact@v4
id: upload-str
Expand All @@ -78,21 +69,8 @@ jobs:
path: target/release/stratus
if-no-files-found: error
retention-days: ${{ env.RETENTION_DAYS }}

- name: Upload importer online
uses: actions/upload-artifact@v4
id: upload-iom
with:
name: importer-online-${{ github.sha }}
path: target/release/importer-online
if-no-files-found: error
retention-days: ${{ env.RETENTION_DAYS }}

- name: Print outputs
run: |
echo "Artifact ID: ${{ steps.upload-rwi.outputs.artifact-id }} (run with importer)"
echo "Artifact URL: ${{ steps.upload-rwi.outputs.artifact-url }} (run with importer)"
echo "Artifact ID: ${{ steps.upload-str.outputs.artifact-id }} (stratus)"
echo "Artifact URL: ${{ steps.upload-str.outputs.artifact-url }} (stratus)"
echo "Artifact ID: ${{ steps.upload-iom.outputs.artifact-id }} (importer online)"
echo "Artifact URL: ${{ steps.upload-iom.outputs.artifact-url }} (importer online)"
95 changes: 0 additions & 95 deletions .github/workflows/e2e-generic.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: E2E Run With Importer
name: E2E Leader & Follower

on:
pull_request:
Expand Down Expand Up @@ -26,10 +26,10 @@ on:
- 'Cargo.toml'

jobs:
run_with_importer_test:
leader_follower_test:
strategy:
fail-fast: false
name: E2E Run With Importer on BRLCToken
name: E2E Leader & Follower on BRLCToken
runs-on: ubuntu-latest
timeout-minutes: 45

Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
run: just contracts-flatten --token

- name: Run e2e tests
run: just e2e-importer-online-up
run: just e2e-leader-follower-up
env:
CARGO_PROFILE_RELEASE_DEBUG: 0
RUST_LOG: error
Expand Down
8 changes: 0 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,6 @@ path = "src/bin/rpc_downloader.rs"
name = "importer-offline"
path = "src/bin/importer_offline.rs"

[[bin]]
name = "importer-online"
path = "src/bin/importer_online.rs"

[[bin]]
name = "run-with-importer"
path = "src/bin/run_with_importer.rs"

# ------------------------------------------------------------------------------
# Features
# ------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 7bc1805

Please sign in to comment.