forked from Supercoolkayy/ZecKit
-
Notifications
You must be signed in to change notification settings - Fork 1
Real blockchain transactions with Zaino/LWD backends and pexpect wallet integration with full M2 and zingolib integration #4
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
Open
Timi16
wants to merge
93
commits into
zecdev:main
Choose a base branch
from
Timi16:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
93 commits
Select commit
Hold shift + click to select a range
856bbcd
Adding faucet requirments
Supercoolkayy 9582f08
Adding file structure
Supercoolkayy d1d28dc
Adding config
Supercoolkayy c06192d
Adding zebra rpc cde
Supercoolkayy c22b57e
Adding Code bases and health
Supercoolkayy 6d6b3d9
Adding wallet and test script
Supercoolkayy 807ace2
Adding init
Supercoolkayy 9591db1
fixing wallet
Supercoolkayy 7a33d27
Funding faucet and routes
Supercoolkayy 62e2ba2
updating faucet
Supercoolkayy 5c45846
updating Wallet cde
Supercoolkayy 68271da
Fixing faucet
Supercoolkayy 59abd5a
Adding faucet finished code
Supercoolkayy fc15466
Adding Rust Cli Setup
Supercoolkayy 49418b2
Adding Commands for cli
Supercoolkayy ed20b07
Adding Commands for cli Up cmmnd
Supercoolkayy b62c769
Adding Commands for cli cmnds up or dwn
Supercoolkayy 37b0ef0
Adding Cli Docs and docker files
Supercoolkayy d6b54e5
Adding Docker file Full FIx
Supercoolkayy c33db13
Adding stats FIx for uptime
Supercoolkayy 3cc2225
Adding complete version of m2
Supercoolkayy bbae701
Adding complete version of m2
Supercoolkayy 43f374a
Updating readme For Milestone2
Supercoolkayy 4ce9c2c
Removing rdundant dicker files
Supercoolkayy 89aa745
Adding FIxed version with ZingoLib
Supercoolkayy d3eabb2
Pushing milestone 2 fixes
Supercoolkayy 2993761
Pushing milestone2
Supercoolkayy 9ed4b11
Pushing milestone2
Supercoolkayy 059c870
Pushing milestone2
Supercoolkayy 96a772f
Pushing milestone2 readme ready fr pr
Supercoolkayy 9e56333
Adding limitations for m2
Supercoolkayy e7e5d5e
Adding Readme
Supercoolkayy 677045c
Adding zaino backend
Supercoolkayy 2ae25a5
Adding Zaino Bug fixes
Timi16 3b0a1b9
Adding Wallet fix For zaino
Timi16 be867de
Fixing bugs to send
Timi16 d1a4f4b
Adding Wallet full code
Timi16 86d1db3
Adding stable version
Timi16 aa1865f
Adding lightwalletd
Timi16 10d09a2
Adding lightwalletd
Timi16 22bdcef
Adding lightwalletd
Timi16 099df12
making cli changes
Timi16 b1ee323
making cli changes
Timi16 04a7175
Adding Changes to up command
Timi16 3254256
Adding changes
Timi16 9de9f1b
Adding Readme file
Timi16 971b7e2
Adding Zecdev update
Timi16 202cdbe
Adding technical spec
Timi16 a121163
Adding docker activity
Timi16 ea935aa
Bringing the cli up and testing
Timi16 25c5c81
chnging dckerfile
Timi16 ceb0876
Making changes
Timi16 7624ebf
Adding compose file
Timi16 fdf5d8f
Adding dockerfile in zaino
Timi16 dcc73cd
Keep local Dockerfile changes
Timi16 4f8ac09
Adding Fixes on dcker file
Timi16 4ea9b30
Adding my prev zaino file that had tls fixes
Timi16 7aaabb5
Adding fixes:
Timi16 2a05fe1
Adding fixes on dockerfile and increasing time
Timi16 5d3281e
Adding fixes on dockerfile and increasing time
Timi16 d94d518
Adding fixes on dockerfile and increasing time
Timi16 9ae4061
Adding e2e testing
Timi16 0f1d7da
Enhance E2E test workflow with Docker support
Timi16 141a9d1
Remove timeout from ZecKit Devnet startup command
Timi16 3c1fbec
Enhance cleanup and startup processes in e2e-test.yml
Timi16 c454485
Refactor e2e-test workflow for better readability
Timi16 90e8229
Correct name of E2E test suite in workflow
Timi16 d485443
Enhance E2E test workflow with fresh start option
Timi16 4a2bcdc
Improve timeout management in e2e-test workflow
Timi16 c20a7f6
Adjust timeout and improve logging in e2e tests
Timi16 ccdac49
Refactor e2e-test workflow for clarity and efficiency
Timi16 827e951
Adjust timeout and messages in e2e test workflow
Timi16 bf040fc
Refactor e2e-test.yml for improved readability
Timi16 de2cf1a
Increase service health check timeout to 10 minutes
Timi16 87ed81d
Change ZecKit Devnet command to use fresh backend
Timi16 efdc970
Refactor e2e-test workflow for clarity and efficiency
Timi16 7a7ef3b
Implement healthcheck for zaino service
Timi16 635bd0a
Changing the name from zecdev to zeckit
Timi16 9b868f8
use Zebra validateaddress RPC instead of regex
Timi16 58b80de
fix: use Zebra's generate RPC method for mining
Timi16 18dbde6
Adding Faucet in rust
Timi16 0151980
Adding Faucet in rust
Timi16 1c3a12c
Adding docker compose yml fixes Path
Timi16 57a74ce
Adding fixes in Dockerfile and Changing cargo file to 2021
Timi16 3c81467
Making librustzcash used instead of rpc
Timi16 81271ff
Fixing faucet
Timi16 04ec69a
Changing compile time
Timi16 429998b
hiding logs
Timi16 81d8cfd
Demonstration to oscar
Timi16 df6e413
Revert to stable version
Timi16 1bc62de
Fixing logs
Timi16 7579e11
Adding Zingo container removal
Timi16 97808f2
Added fixes to archietecture
Timi16 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,250 @@ | ||
| name: E2E Tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - develop | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - develop | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| e2e-tests: | ||
| name: ZecKit E2E Test Suite | ||
| runs-on: self-hosted | ||
|
|
||
| timeout-minutes: 60 | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Start Docker Desktop | ||
| run: | | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo " Starting Docker Desktop" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
|
|
||
| if ! docker ps > /dev/null 2>&1; then | ||
| open /Applications/Docker.app | ||
|
|
||
| echo "Waiting for Docker daemon..." | ||
| for i in {1..60}; do | ||
| if docker ps > /dev/null 2>&1; then | ||
| echo "✓ Docker daemon is ready!" | ||
| break | ||
| fi | ||
| echo "Attempt $i/60: Docker not ready yet, waiting..." | ||
| sleep 2 | ||
| done | ||
| else | ||
| echo "✓ Docker already running" | ||
| fi | ||
|
|
||
| docker --version | ||
| docker compose version | ||
| echo "" | ||
|
|
||
| - name: Check environment | ||
| run: | | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo " Environment Check" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| docker --version | ||
| docker compose version | ||
| rustc --version | ||
| cargo --version | ||
| echo "" | ||
|
|
||
| - name: Clean up previous runs | ||
| run: | | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo " Cleaning Up Previous Runs" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
|
|
||
| # Stop containers | ||
| echo "Stopping containers..." | ||
| docker compose down 2>/dev/null || true | ||
|
|
||
| # Remove volumes to clear stale data (keeps images!) | ||
| echo "Removing stale volumes..." | ||
| docker volume rm zeckit_zebra-data 2>/dev/null || true | ||
| docker volume rm zeckit_zaino-data 2>/dev/null || true | ||
| docker volume rm zeckit_zingo-data 2>/dev/null || true | ||
| docker volume rm zeckit_faucet-wallet-data 2>/dev/null || true | ||
|
|
||
| # Remove orphaned containers | ||
| docker compose down --remove-orphans 2>/dev/null || true | ||
|
|
||
| echo "✓ Cleanup complete (images preserved)" | ||
| echo "" | ||
|
|
||
| - name: Build CLI binary | ||
| run: | | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo " Building zeckit CLI" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| cd cli | ||
| cargo build --release | ||
| cd .. | ||
| echo "✓ CLI binary built" | ||
| ls -lh cli/target/release/zeckit | ||
| echo "" | ||
|
|
||
| - name: Start devnet with zaino backend | ||
| run: | | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo " Starting ZecKit Devnet" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo "" | ||
|
|
||
| # No --fresh flag, but volumes are already cleared above | ||
| ./cli/target/release/zeckit up --backend zaino & | ||
| PID=$! | ||
|
|
||
| SECONDS=0 | ||
| MAX_SECONDS=3600 | ||
|
|
||
| while kill -0 $PID 2>/dev/null && [ $SECONDS -lt $MAX_SECONDS ]; do | ||
| sleep 30 | ||
| ELAPSED_MIN=$((SECONDS / 60)) | ||
| echo "⏱️ Starting devnet... ($ELAPSED_MIN minutes elapsed)" | ||
| done | ||
|
|
||
| if kill -0 $PID 2>/dev/null; then | ||
| echo "✗ Devnet startup timed out after 1 hour" | ||
| kill $PID 2>/dev/null || true | ||
| echo "" | ||
| echo "Container logs:" | ||
| docker compose logs || true | ||
| exit 1 | ||
| fi | ||
|
|
||
| wait $PID | ||
| EXIT_CODE=$? | ||
|
|
||
| if [ $EXIT_CODE -ne 0 ]; then | ||
| echo "✗ Devnet startup failed!" | ||
| echo "" | ||
| echo "Container logs:" | ||
| docker compose logs || true | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "" | ||
| echo "✓ Devnet started successfully" | ||
| echo "" | ||
|
|
||
| - name: Run smoke tests | ||
| run: | | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo " Running Smoke Tests" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo "" | ||
|
|
||
| ./cli/target/release/zeckit test | ||
|
|
||
| TEST_EXIT_CODE=$? | ||
|
|
||
| echo "" | ||
| if [ $TEST_EXIT_CODE -eq 0 ]; then | ||
| echo "✓ All smoke tests PASSED!" | ||
| else | ||
| echo "✗ Smoke tests FAILED!" | ||
| exit 1 | ||
| fi | ||
| echo "" | ||
|
|
||
| - name: Check wallet balance | ||
| if: always() | ||
| run: | | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo " Wallet Status" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo "" | ||
|
|
||
| docker exec zeckit-zingo-wallet bash -c "echo -e 'balance\nquit' | zingo-cli --data-dir /var/zingo --server http://zaino:9067 --chain regtest --nosync" 2>/dev/null || echo "Could not retrieve balance" | ||
| echo "" | ||
|
|
||
| - name: Check faucet status | ||
| if: always() | ||
| run: | | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo " Faucet Status" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo "" | ||
|
|
||
| curl -s http://127.0.0.1:8080/stats | jq . || echo "Could not get faucet stats" | ||
| echo "" | ||
|
|
||
| - name: Collect logs | ||
| if: always() | ||
| run: | | ||
| echo "Collecting logs for artifact..." | ||
| mkdir -p logs | ||
|
|
||
| docker compose logs zebra > logs/zebra.log 2>&1 || true | ||
| docker compose logs zaino > logs/zaino.log 2>&1 || true | ||
| docker compose logs zingo-wallet-zaino > logs/zingo-wallet.log 2>&1 || true | ||
| docker compose logs faucet-zaino > logs/faucet.log 2>&1 || true | ||
| docker ps -a > logs/containers.log 2>&1 || true | ||
| docker network ls > logs/networks.log 2>&1 || true | ||
|
|
||
| echo "✓ Logs collected" | ||
|
|
||
| - name: Upload logs on failure | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: e2e-test-logs-${{ github.run_number }} | ||
| path: logs/ | ||
| retention-days: 7 | ||
|
|
||
| - name: Cleanup | ||
| if: always() | ||
| run: | | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo " Cleanup" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo "" | ||
|
|
||
| echo "Stopping containers (keeping images for next run)..." | ||
| docker compose down --remove-orphans 2>/dev/null || true | ||
|
|
||
| echo "✓ Cleanup complete" | ||
| echo "" | ||
|
|
||
| - name: Test summary | ||
| if: always() | ||
| run: | | ||
| echo "" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo " E2E Test Execution Summary" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo "" | ||
|
|
||
| if [ "${{ job.status }}" == "success" ]; then | ||
| echo "✓ Status: ALL TESTS PASSED ✓" | ||
| echo "" | ||
| echo "Completed checks:" | ||
| echo " ✓ Docker Desktop started" | ||
| echo " ✓ CLI binary built" | ||
| echo " ✓ Devnet started (clean state, cached images)" | ||
| echo " ✓ Smoke tests passed" | ||
| echo " ✓ Wallet synced" | ||
| echo " ✓ Faucet operational" | ||
| echo "" | ||
| echo "The ZecKit devnet is working correctly!" | ||
| else | ||
| echo "✗ Status: TESTS FAILED ✗" | ||
| echo "" | ||
| echo "Check the logs above for details" | ||
| echo "Artifact logs: e2e-test-logs-${{ github.run_number }}" | ||
| fi | ||
|
|
||
| echo "" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,4 +98,6 @@ docker-compose.override.yml | |
|
|
||
| # Windows | ||
| Thumbs.db | ||
| ehthumbs_vista.db | ||
| ehthumbs_vista.db | ||
| actions-runner/ | ||
| *.bak | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.