Skip to content

Commit

Permalink
Merge branch 'master' into zach/migrate-circleci-jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
HCastano committed Aug 9, 2024
2 parents f548583 + 15794e6 commit d10bd76
Show file tree
Hide file tree
Showing 169 changed files with 8,810 additions and 6,987 deletions.
17 changes: 16 additions & 1 deletion .circleci/then.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
cargo build --all-targets --release -j $(nproc)
cargo test --all-targets --release
yarn --cwd ../crates/protocol/nodejs-test test
cargo test -p entropy-tss --release -F wasm_test test_wasm
cargo test -p entropy-tss --release --features=test_helpers -F wasm_test test_wasm
no_output_timeout: 45m
build-and-release:
machine:
Expand All @@ -141,6 +141,18 @@ jobs:
steps:
- install-dependencies-and-checkout
- run: cargo doc --no-deps
check-chainspecs:
machine:
image: ubuntu-2204:2022.10.2
resource_class: xlarge
steps:
- install-dependencies-and-checkout
- run:
command: |
cargo run -p entropy -- build-spec --raw --chain dev > chainspec-dev-raw.json
cargo run -p entropy -- build-spec --raw --chain integration-tests > chainspec-integration-raw.json
cargo run -p entropy -- build-spec --raw --chain testnet > chainspec-testnet-raw.json
parameters:
crates:
Expand Down Expand Up @@ -172,6 +184,9 @@ workflows:
- << pipeline.parameters.pallets >>
- << pipeline.parameters.runtime >>
- pipeline.parameters.crates
chainspecs:
jobs:
- check-chainspecs
documentation:
jobs:
- check-doc-build
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ target
.cargo-remote.toml
.entropy
chains

# We specifically want to include the `create-test-keyshares` crate as part of our builds.
scripts
!scripts/create-test-keyshares/

service
shell.nix

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: "!*.dockerbuild"
- name: Create release
env:
GH_TOKEN: ${{ github.token }}
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/cla.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This workflow automates the process of signing our CLA. It makes use of
# the action at https://github.com/contributor-assistant/github-action in
# order to provide automations.
#
# This workflow file should be present in every repository that wants to
# use the Contributor License Agreement automation process. Ideally, it
# would remain more-or-less synchronized across each repository as updates
# are rolled out.
#
# Since the database of signatories is maintained in a remote repository,
# each repository that wishes to make use of the CLA Assistant will also
# need to have a repository secret (named `CLA_ASSISTANT_LITE_PAT`) that
# grants permission to write to the "signatures" file in that repository.
---
name: "CLA Assistant"
on:
issue_comment:
types:
- created
pull_request_target:
types:
- opened
- closed
- synchronize

# Explicitly configure permissions, in case the GITHUB_TOKEN workflow permissions
# are set to read-only in the repository's settings.
permissions:
actions: write
contents: read # We only need to `read` since signatures are in a remote repo.
pull-requests: write
statuses: write

jobs:
CLAAssistant:
runs-on: ubuntu-latest
steps:
- name: "CLA Assistant"
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
uses: entropyxyz/contributor-assistant-github-action@c5f4628ffe1edb97724edb64e0dd4795394d33e5 # exemptRepoOrgMembers
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Required, so that the bot in this repository has `write` permissions to Contents of remote repo.
PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_ASSISTANT_LITE_PAT }}
with:
path-to-signatures: 'legal/cla/v1/signatures.json'
path-to-document: 'https://github.com/entropyxyz/.github/blob/main/legal/cla/v1/cla.md'
branch: 'main'
allowlist: dependabot[bot],entropyxyz
exemptRepoOrgMembers: true
remote-organization-name: entropyxyz
remote-repository-name: .github
26 changes: 12 additions & 14 deletions .github/workflows/container-build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ jobs:
with:
tool-cache: false
docker-images: false
- name: Create temporary directories
run: |
mkdir ${{ runner.temp }}/bin
mkdir ${{ runner.temp}}/artifacts
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
Expand All @@ -68,7 +72,7 @@ jobs:
password: ${{ secrets.DOCKER_HUB_CI_TOKEN }}
- name: Build and push ${{ inputs.docker_build_arg_package }} container image
id: docker-build
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
build-args: |
Expand All @@ -78,13 +82,8 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
push: true
- name: Create image export directory
id: export-dir
run: |
tmpdir=$(mktemp -d)
echo path=${tmpdir} >> $GITHUB_OUTPUT
- name: Export plain binaries from built images
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
build-args: |
Expand All @@ -94,28 +93,27 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
outputs: |
type=local,dest=${{ steps.export-dir.outputs.path }}
type=local,dest=${{ runner.temp }}/bin
- name: Disambiguate binaries by platform
id: artifacts
run: |
dirname=${{ steps.export-dir.outputs.path }}
dirname=${{ runner.temp }}/bin
refname=${{ inputs.git_ref_basename }}
package=${{ inputs.docker_build_arg_package }}
artifact_dir=$(mktemp -d)
artifact_dir=${{ runner.temp }}/artifacts
for platform in linux_amd64 linux_arm64; do
cp ${dirname}/${platform}/usr/local/bin/${package} ${artifact_dir}/${package}_${refname}_${platform}
done
echo dir="${artifact_dir}" >> $GITHUB_OUTPUT
- name: Create genesis runtime bytecode artifact
if: inputs.docker_build_arg_package == 'entropy'
run: |
${{ steps.artifacts.outputs.dir }}/${{ inputs.docker_build_arg_package }}_${{ inputs.git_ref_basename }}_linux_amd64 \
${{ runner.temp }}/artifacts/${{ inputs.docker_build_arg_package }}_${{ inputs.git_ref_basename }}_linux_amd64 \
build-spec --chain testnet \
> ${{ steps.artifacts.outputs.dir }}/${{ inputs.docker_build_arg_package }}-chain-spec-${{ inputs.git_ref_basename }}-${{ github.sha }}.json
> ${{ runner.temp }}/artifacts/${{ inputs.docker_build_arg_package }}-chain-spec-${{ inputs.git_ref_basename }}-${{ github.sha }}.json
- name: Upload ${{ inputs.docker_build_arg_package }} binary artifact
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.docker_build_arg_package}}_${{ inputs.git_ref_basename }}
path: ${{ steps.artifacts.outputs.dir }}/${{ inputs.docker_build_arg_package }}*
path: ${{ runner.temp }}/artifacts/${{ inputs.docker_build_arg_package }}*
if-no-files-found: error
retention-days: 5
77 changes: 75 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,76 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
At the moment this project **does not** adhere to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [[Unreleased]](https://github.com/entropyxyz/entropy-core/compare/release/v0.0.12...master)
## [Unreleased](https://github.com/entropyxyz/entropy-core/compare/release/v0.2.0...master)

### Breaking Changes
- In [#938](https://github.com/entropyxyz/entropy-core/pull/938), the chainspec got a couple of new
fields, `pallet_staking_extension::initial_signers`, `pallet_parameters::total_signers`, and
`pallet_parameters::threshold`, which are used to set up the initial threshold signing
configuration for the network.

### Added
- Jumpstart network ([#918](https://github.com/entropyxyz/entropy-core/pull/918))
- Add Signer groups and rotation ([#938](https://github.com/entropyxyz/entropy-core/pull/938))
- Split jumpstart and register flows ([#952](https://github.com/entropyxyz/entropy-core/pull/952))
- New on-chain registration flow ([#955](https://github.com/entropyxyz/entropy-core/pull/955))
- Reshare confirmation ([#965](https://github.com/entropyxyz/entropy-core/pull/965))
- Set inital signers ([#971](https://github.com/entropyxyz/entropy-core/pull/971))
- Add parent key threshold dynamically ([#974](https://github.com/entropyxyz/entropy-core/pull/974))

### Changed
- Fix TSS `AccountId` keys in chainspec ([#993](https://github.com/entropyxyz/entropy-core/pull/993))

## [0.2.0](https://github.com/entropyxyz/entropy-core/compare/release/v0.1.0...release/v0.2.0) - 2024-07-11

### Breaking Changes
- In [#853](https://github.com/entropyxyz/entropy-core/pull/853) the responsibility of generating a
TSS mnemonic was shifted to operators, which can be done using the `--mnemonic` flag during
process startup. This also allows operators to back up the mnemonic for their TSS.
- In [#856](https://github.com/entropyxyz/entropy-core/pull/856) a new flag, `--mnemonic-option`,
and environment variable `DEPLOYER_MNEMONIC`, were added to the `entropy-test-cli` as ways to
indicate which account to use during registration. This replaces having an account name or
mnemonic directly in the command invocation.
- In [#866](https://github.com/entropyxyz/entropy-core/pull/866) timestamp was removed from
`UserSignatureRequest` and replaced with block_number. Thus check_stale now uses block_number for
stale checks
- In [#881](https://github.com/entropyxyz/entropy-core/pull/881) the `HashingAlgorithm` enum is
given an additional variant `Blake2_256` and marked as `non_exhaustive` meaning we must handle the
case that an unknown variant is added in the future.
- In [#900](https://github.com/entropyxyz/entropy-core/pull/900) the subgroup signer selection was
sorted to ensure a predicatble order across libraries, languages and clients.
- In [#901](https://github.com/entropyxyz/entropy-core/pull/901) the network's currency units were
changed. This resulted in a change to the existential deposit as well as balances of endowed
accounts (e.g development accounts like `//Alice`).

### Added
- Add a way to change program modification account ([#843](https://github.com/entropyxyz/entropy-core/pull/843))
- Add support for `--mnemonic-file` and `THRESHOLD_SERVER_MNEMONIC` ([#864](https://github.com/entropyxyz/entropy-core/pull/864))
- Add validator helpers to cli ([#870](https://github.com/entropyxyz/entropy-core/pull/870))
- Add `blake2` as built in hash function and make `HashingAlgorithm` non-exhaustive ([#881](https://github.com/entropyxyz/entropy-core/pull/881))
- Add sort to subgroup signer selection ([#900](https://github.com/entropyxyz/entropy-core/pull/900))
- Create four node Docker Compose chainspec ([#902](https://github.com/entropyxyz/entropy-core/pull/902))

### Changed
- Move TSS mnemonic out of keystore ([#853](https://github.com/entropyxyz/entropy-core/pull/853))
- Prepare test CLI for use in Programs repo ([#856](https://github.com/entropyxyz/entropy-core/pull/856))
- Replace timestamp with block number ([#866](https://github.com/entropyxyz/entropy-core/pull/866))
- Change currency units ([#901](https://github.com/entropyxyz/entropy-core/pull/901))

## [0.1.0](https://github.com/entropyxyz/entropy-core/compare/release/v0.0.12...release/v0.1.0) - 2024-05-20

This is the first publicly available version of Entropy 🥳

There aren't a lot of new features compared to the `v0.12.0` release. However, one exciting addition
is that crates related to the threshold server (`entropy-tss`) are now published on crates.io.

### Changed
- Make full version of entropy-client possible to compile on wasm ([#816](https://github.com/entropyxyz/entropy-core/pull/816))
- Remove certain endowed accounts from chain ([#819](https://github.com/entropyxyz/entropy-core/pull/819))
- Updates for test-cli before publishing and to work nicely with v0.0.12 ([#830](https://github.com/entropyxyz/entropy-core/pull/830))

### Fixed
- Fix `Account Deserialization` error from verifying key mismatch ([#831](https://github.com/entropyxyz/entropy-core/pull/831))

## [0.0.12](https://github.com/entropyxyz/entropy-core/compare/release/v0.0.11...release/v0.0.12) - 2024-05-02

Expand All @@ -17,6 +86,9 @@ At the moment this project **does not** adhere to
`programs::set_program` extrinsic now takes an additional argument `oracle_data_pointer` of type
`Vec<u8>` (`Uint8Array` on JS). Since oracles are not completely implemented this should be
passed an empty vector/array.
- In [#762](https://github.com/entropyxyz/entropy-core/pull/762) 'Update Substrate to Polkadot 1.7.0'
the genesis chainspec builder has been updated for sc_service 0.36.0, which affects both the
runtime and chainspec.
- In [#709](https://github.com/entropyxyz/entropy-core/pull/709) 'Derive the threshold account
keypair and x25519 keypair from mnemonic using HKDF' the JS `entropy-protocol` bindings have
changed. `Hpke.DecryptAndVerify` now takes a secret x25519 encryption key rather than a secret
Expand All @@ -25,7 +97,8 @@ At the moment this project **does not** adhere to
signing secret key. Similarly in the rust API, `EncryptedSignedMessage` no longer derives x25519
keypairs internally and so the decrypt method now takes a x25519 secret key. Also, the method by
which keypairs are derived from a mnemonic has changed, which means existing validators x25119
and sr25519 keypairs will be different what they were before.
and sr25519 keypairs will be different what they were before. This includes the test accounts in
the chainspec.

### Added
- Add testnet account JSON ([#769](https://github.com/entropyxyz/entropy-core/pull/769))
Expand Down
Loading

0 comments on commit d10bd76

Please sign in to comment.