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

Restructure repo #5

Merged
merged 25 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
558f11d
Restructure and update repo
locallycompact Oct 16, 2024
b792247
Add github CI
locallycompact Oct 16, 2024
2884d0b
.gitignore: init
locallycompact Oct 16, 2024
ed11415
Add system image
locallycompact Oct 16, 2024
e300d43
Add cardano-node
locallycompact Oct 16, 2024
7928860
Fix nixos-config modules
zeme-wana Oct 17, 2024
be97ec1
Fix code and build
locallycompact Oct 17, 2024
ca1eddf
Add nixosModule
locallycompact Oct 17, 2024
ca870e3
TEMP: change ip
locallycompact Oct 23, 2024
041b857
README: init
locallycompact Oct 31, 2024
990fea4
Attempt to use nixos-generators to build a local version
noonio Nov 1, 2024
a96519b
Fix cardano-node by adding host; correct args to hydra-explorer
noonio Nov 2, 2024
206a2c9
Make the headers readable
noonio Nov 5, 2024
2815b97
Static path argument; static content in nixosModule; start chain from…
noonio Nov 7, 2024
c1080d2
Fix tests
noonio Nov 7, 2024
927a7c4
More access to deploy
noonio Nov 7, 2024
f392418
Add ffankenz
noonio Nov 8, 2024
1f7e936
Bring over final spec test; still failing at present
noonio Nov 8, 2024
8bc8062
Run tests inside shell so that required executables exist
noonio Nov 8, 2024
3a7f491
Remove commented out things
noonio Nov 8, 2024
1e84969
Just use cabal to run the hydra-explorer
noonio Nov 12, 2024
b864b86
Has to still run in the nixShell
noonio Nov 12, 2024
c3746ac
Try cabal update
noonio Nov 12, 2024
e98264f
Depend on exe in build tool so cabal can run it
noonio Nov 12, 2024
dbca5d9
Remove commented-out code
noonio Nov 14, 2024
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 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
50 changes: 50 additions & 0 deletions .github/workflows/ci-nix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "CI"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
merge_group:
push:
branches:
- master
- release
pull_request:

permissions:
checks: write
pull-requests: write

jobs:
build-test:
name: "Build & test"
runs-on: ubuntu-latest

steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4

- name: ❄ Prepare nix
uses: cachix/install-nix-action@v30
with:
extra_nix_config: |
accept-flake-config = true
log-lines = 1000

- name: ❄ Cachix cache of nix derivations
uses: cachix/cachix-action@v15
with:
name: cardano-scaling
authToken: '${{ secrets.CACHIX_CARDANO_SCALING_AUTH_TOKEN }}'

- name: ❓ Build and test
run: |
nix run .#apps.x86_64-linux.hydra-explorer -- --help

# Note: The tests need to find `json-schemas/hydra-explorer-api.yaml`;
# so they need to be run in this specific folder.
cd hydra-explorer

# We need the packages in the shell to run the tests
nix develop -c cabal update
nix develop -c cabal test all
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dist-newstyle
result*

test-results.xml
hspec-results.md

.pre-commit-config.yaml
14 changes: 0 additions & 14 deletions NOTICE

This file was deleted.

22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# Hydra Explorer
# hydra-explorer

A small executable which connects to a chain like the `hydra-node`, but puts any
observations as traces onto `stdout`.
This is the system image repository for the hydra-explorer service.

To run, pass a `--node-socket` and the corresponding network id. For example:
## Deployment

``` shell
hydra-explorer \
--node-socket testnets/preprod/node.socket \
--testnet-magic 1
```sh
nix run .#apps.x86_64-linux.nixinate.hydra-explorer
```

Note: this assumes you are running a cardano-node in preprod.
## Testing locally

By definition, hydra-explorer will bind port 9090.
```sh
nix build .#qemu
cp result/nixos.qcow2 .
chmod 755 nixos.qcow2
qemu-system-x86_64 -enable-kvm -m 8000 -drive file=nixos.qcow2,media=disk,if=virtio -nic user,model=virtio
```
33 changes: 33 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
repository cardano-haskell-packages
url: https://chap.intersectmbo.org/
secure: True
root-keys:
3e0cce471cf09815f930210f7827266fd09045445d65923e6d0238a6cd15126f
443abb7fb497a134c343faf52f0b659bd7999bc06b7f63fa76dc99d631f9bea1
a86a1f6ce86c449c46666bda44268677abf29b5b2d2eb5ec7af903ec2f117a82
bcec67e8e99cabfa7764d75ad9b158d72bfacf70ca1d0ec8bc6b4406d1bf8413
c00aae8461a256275598500ea0e187588c35a5d5d7454fb57eac18d9edb86a56
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee

index-state:
, hackage.haskell.org 2024-10-14T02:12:15Z
, cardano-haskell-packages 2024-10-14T23:19:53Z

packages:
hydra-explorer

source-repository-package
type: git
location: https://github.com/cardano-scaling/hydra
tag: d55c4efb896273dc39d4bdc4fc83ec361de55f73
--sha256: sha256-LziIjrdjMA8dVPKMwKskLyjlnx5HhpDwTjC9sek5Bfo=
subdir:
hydra-cardano-api
hydra-chain-observer
hydra-cluster
hydra-node
hydra-plutus
hydra-plutus-extras
hydra-prelude
hydra-test-utils
hydra-tx
Loading