Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
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
12 changes: 6 additions & 6 deletions .github/workflows/build-application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
ghc: ['8.8.4', '8.10.7', '9.0.1']
cabal: ['3.4.0.0']
cabal: ['3.6']
os: ['ubuntu-18.04', 'ubuntu-20.04', 'macOS-latest']

steps:
Expand All @@ -32,7 +32,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install GHC and Cabal
uses: larskuhtz/actions/setup@e0f107055073590682bc5264b8da5c2b6af39a65
uses: haskell/actions/setup@v1.2.7
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
Expand All @@ -47,18 +47,18 @@ jobs:
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ matrix.os }}-${{ matrix.ghc }}-0-cabal
key: ${{ matrix.os }}-${{ matrix.ghc }}-1-cabal

# Build
- name: Update package database
run: cabal update
- name: Configure build
run: |
rm -rf dist-newstyle/build/*/ghc-*/chainweb-mining-client-*/build/chainweb-mining-client/chainweb-mining-client
cabal build all --dry-run
cabal freeze
cabal build all --dry-run --enable-tests
cabal freeze --enable-tests
- name: Install build dependencies
run: cabal build --only-dependencies
run: cabal build --only-dependencies --enable-tests
- name: Build
run: cabal build

Expand Down
2 changes: 1 addition & 1 deletion main/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ newtype Miner = Miner MinerPublicKey

instance ToJSON Miner where
toJSON (Miner (MinerPublicKey k)) = object
[ "account" .= k
[ "account" .= ("k:" <> k)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that we should unconditionally prepend the k:. This is pretty opaque and has some failure modes. What about allowing the user to also configure the account name? And if they don't supply one, then we can default to k:.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, I'd like to keep it simple. I am not aware of a scenario where someone wanted to mine to anything but just a simple key.

Maybe pools have more sophisticated requirements (e.g. multi-sig accounts). But at the current state chainweb-mining-client is useful mostly for solo-miners.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a --account command line option, that default to the k: account for the public key.

, "public-keys" .= [ k ]
, "predicate" .= ("keys-all" :: T.Text)
]
Expand Down