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

Frankie/core#v0.3.0.rc 1 #421

Merged
merged 67 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
ee9ad3d
Closes #381: Add 2 more validators, providing 4 nodes in the devnet.
vitropy Jun 14, 2024
429823e
update the dev/README
frankiebee Jun 14, 2024
7701721
tests - are failing
frankiebee Jun 14, 2024
33fc49f
Add hostname addressing for `dave`'s and `eve`'s TSS server, too.
vitropy Jun 14, 2024
4a78ac7
Suggest newer Docker CLI habits. Fix typo in stderr output.
vitropy Jun 14, 2024
0c26d63
Mount the `./dev` directory into the devnet containers.
vitropy Jun 14, 2024
41b130c
Merge remote-tracking branch 'origin' into vi/four-nodes
mixmix Jun 23, 2024
0cd6c17
chain to proper chain name
JesseAbram Jun 24, 2024
267a3bf
update release to new version and update four-nodes script
frankiebee Oct 8, 2024
b949a5c
https://github.com/entropyxyz/entropy-core/pull/1086 use Charlie
frankiebee Oct 8, 2024
4b1bd8c
generate types for substarte and update polkadotjs
frankiebee Oct 8, 2024
fb5d546
wip: test siging group
frankiebee Oct 8, 2024
e6dbf46
wip: jumpStartNetwork
frankiebee Oct 8, 2024
15e5d0e
Merge branch 'main' of github.com:entropyxyz/sdk into frankie/core#v0…
frankiebee Oct 8, 2024
35b2880
eve -> charlie and fix daves port
frankiebee Oct 8, 2024
7fbb851
jumpStartNetwork where its needed
frankiebee Oct 8, 2024
13730f5
use four-nodes script
frankiebee Oct 9, 2024
7625923
wip: siging
frankiebee Oct 10, 2024
bfca0e0
wip
frankiebee Oct 10, 2024
862b620
fix patch for @polkadot/util
mixmix Oct 10, 2024
c8daea8
githcub CI: timeout after 45mins
mixmix Oct 10, 2024
2d8e084
jumpStartNetwork timeout
mixmix Oct 10, 2024
a09027f
ensure all nodes spun down
mixmix Oct 10, 2024
df69df1
add time out
frankiebee Oct 14, 2024
2e063b2
wip: siging
frankiebee Oct 14, 2024
1453fb3
rename "jump-start network"
mixmix Oct 15, 2024
6c1463a
mention hosts file editing
mixmix Oct 15, 2024
a27ac9d
two-nodes -> four-nodes
frankiebee Oct 15, 2024
2bbce3f
throw in jumpStart if it's not a full validator network we are jump s…
frankiebee Oct 15, 2024
c7d6225
update
frankiebee Oct 15, 2024
51e9e87
Merge branch 'frankie/core#v0.3.0.rc-1' into mixmix/core-release-tweaks
frankiebee Oct 15, 2024
5b360bd
Mixmix/core release tweaks (#422)
frankiebee Oct 15, 2024
8f44b40
add timeout
frankiebee Oct 15, 2024
8f14580
Merge branch 'frankie/core#v0.3.0.rc-1' of github.com:entropyxyz/sdk …
frankiebee Oct 15, 2024
69fb541
rm old file
frankiebee Oct 15, 2024
a993eca
fix jump statrt
frankiebee Oct 15, 2024
16e6553
uncomment the rest of the tests
frankiebee Oct 15, 2024
f851b77
double the tries for github actions cause the nodes doubled
frankiebee Oct 15, 2024
d37e1fd
spooky json now lives && remove two-nodes
frankiebee Oct 18, 2024
23c328e
verifyAndReduceSignatures -> #verifyAndPick
frankiebee Oct 18, 2024
ee80e6f
remove signing group test (protocol no longer has signing groups)
frankiebee Oct 18, 2024
0232701
added exit command to timout for jumpstart
rh0delta Oct 18, 2024
ce971b7
updated comment
rh0delta Oct 18, 2024
9ebe19b
moving error handle to try catch
rh0delta Oct 18, 2024
84c85ba
some logging for ci help
frankiebee Oct 18, 2024
2dac81b
unsub before reject and exit
frankiebee Oct 18, 2024
5c9c8b6
Merge branch 'frankie/core#v0.3.0.rc-1' of github.com:entropyxyz/sdk …
frankiebee Oct 18, 2024
993529b
clarify logs
frankiebee Oct 18, 2024
d60c7ab
Merge branch 'frankie/core#v0.3.0.rc-1' of github.com:entropyxyz/sdk …
frankiebee Oct 18, 2024
ef43e62
more logging
frankiebee Oct 18, 2024
963662b
retry jumpstart every 10 blocks
frankiebee Oct 18, 2024
e020de1
some more logging
frankiebee Oct 18, 2024
f3467df
retry at 50 blocks
frankiebee Oct 18, 2024
0269ffb
missing jumpstart
frankiebee Oct 18, 2024
f06791b
woops still some two-node in their
frankiebee Oct 18, 2024
92f15a4
fix logging
frankiebee Oct 18, 2024
6f1d3c9
retry at 50 again
frankiebee Oct 18, 2024
1914c31
remove timeout in favor of block counting
frankiebee Oct 19, 2024
8ba3785
slim down the logging and charlies balance cant be trusted
frankiebee Oct 19, 2024
f229cf6
use eve, && make loging optional for jumpstart
frankiebee Oct 21, 2024
ade90aa
spindown now has a ENTROPY_DONT_KILL env
frankiebee Oct 21, 2024
9f09fcd
woops
frankiebee Oct 21, 2024
c49ffa5
add script for publishing a pre release
frankiebee Oct 22, 2024
0c0ab1d
no need to jump start here
frankiebee Oct 23, 2024
7a12dc4
core: v0.3.0
frankiebee Oct 23, 2024
a898eaf
clean up the submitTransactionRequest parse unparse nonsense
frankiebee Oct 23, 2024
101a176
Update package.json
mixmix Oct 23, 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
5 changes: 3 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ on:
jobs:
build_test_lint:
name: Build, test, and lint
runs-on: ubuntu-22.04
timeout-minutes: 45
permissions:
contents: read
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -33,6 +34,6 @@ jobs:
password: ${{ secrets.DOCKER_HUB_CI_TOKEN }}
- name: Add TSS server host mappings
run: |
echo "127.0.0.1 alice-tss-server bob-tss-server" | sudo tee -a /etc/hosts
echo "127.0.0.1 alice-tss-server bob-tss-server charlie-tss-server dave-tss-server" | sudo tee -a /etc/hosts
- name: Test
run: yarn run test
16 changes: 10 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,26 @@ Version header format: `[version] Name - year-month-day (entropy-core compatibil

### Added
- `configurationSchema` & `auxiliaryDataSchema` to `ProgramInterface`

- added new testing function `jumpStartNetwork(entropy: Entropy) => Promise<undefined>` This function must be called now with a funded key to kick off the network. **It will not work for networks with less then 4 validators**
- added new docker script for four nodes
- `spinNetworkDown` now has an access to the env var `ENTROPY_DONT_KILL` which will preserve the network
the initial though for this was to look at network logs for debugging

### Fixed

### Changed
### Breaking Changes
- util function rename: `hex2buf` -> `hexStringToBuffer`
- massive changes to `entropy.programs.dev`: (Look at documentation for more details)
- `getProgramInfo` -> `get` and bytecode is returned as a buffer. not a Uint8buffer to match what was deployed
- you now get owned programs for an address using `getByDeployer`.
- interface name change: `ProgramInfo` -> `ProgramInterface`
### Broke

### Dev

### Meta
### Removed
- `dev/docker-scripts/two-nodes.yaml`

### Dev
- update core version: v0.3.0
-

## [0.2.3] Cybele - 2024-07-24 (entropy-core compatibility: 0.2.0)

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ A promise indicating the completion of the registration process.

await entropy.register({
// insert address to specify ProgramModAccount
keyVisibility: 'Permissioned',
initialPrograms: [programData],
programModAccount: '5Gw3s7q9...',
})
Expand Down
12 changes: 7 additions & 5 deletions dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ For the tests to run you **must** edit your `/etc/hosts` file, adding:
```
127.0.0.1 alice-tss-server
127.0.0.1 bob-tss-server
127.0.0.1 charlie-tss-server
127.0.0.1 dave-tss-server
```

### Gotcha 1 - dirty docker
Expand All @@ -45,13 +47,13 @@ that program is already deployed boo").
Have a look what's running:

```bash
docker ps
docker container list
```

You can close them down like this:

```bash
docker compose --file dev/docker-scripts/two-nodes.yaml down
docker compose --file dev/docker-scripts/four-nodes.yaml down
```

### Gotcha 2 - ports still in use?
Expand Down Expand Up @@ -80,7 +82,7 @@ export ENTROPY_CORE_VERSION=latest
If you must do this you should run

```bash
docker compose --file dev/docker-scripts/two-nodes.yaml pull
docker compose --file dev/docker-scripts/four-nodes.yaml pull
```

## When updating core version:
Expand All @@ -91,9 +93,9 @@ docker compose --file dev/docker-scripts/two-nodes.yaml pull
directly from the root directory and then call the generate types script and
then the spin down script:

- `dev/bin/spin-up.sh two-nodes`
- `dev/bin/spin-up.sh four-nodes`
- `dev/bin/generate-types.sh`
- `dev/bin/spin-down.sh two-nodes`
- `dev/bin/spin-down.sh four-nodes`

2. run `yarn tsc` just to make sure that went "okay" or as okay as it can be.
generated types are ignored in tsc check but are used in project (kind of not
Expand Down
2 changes: 1 addition & 1 deletion dev/bin/ENTROPY_CORE_VERSION.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#! /usr/bin/env bash

export ENTROPY_CORE_VERSION=release-v0.2.0
export ENTROPY_CORE_VERSION=release-v0.3.0
5 changes: 5 additions & 0 deletions dev/bin/remove-db.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#! /usr/bin/env bash

rm -rf .entropy
docker compose --file dev/docker-scripts/four-nodes.yaml down 2> /dev/null
docker compose --file dev/docker-scripts/one-node-no-tss.yaml down 2> /dev/null
152 changes: 152 additions & 0 deletions dev/docker-scripts/four-nodes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# Docker Compose file for making an Entropy blockchain network.
# Currently, it's intended for LOCAL DEVNET FUNCTIONALITY ONLY.
# Things will get better and more generic, but for the moment
# this iteration is for simplifying the dogfooding and testing
# workflows our engineers use, and trying to cut down on some
# of the more complicated test code that spins up this kind of
# environment for their tests. Eventually, we will converge on
# a more canonical set of environments and configuration files.
---
name: entropy-devnet-local-4-nodes

services:
alice-tss-server:
# This pulls from Docker Hub, so you can replace the image tag name
# (the string after the `:` in the `image` key) with chatCharlier tag
# name you'd like to use. Each Docker image is built from a specific
# commit in the `entropy-core` repository. Refer to the wiki page at
# https://github.com/entropyxyz/meta/wiki/Git#conventions for details
# about how Git tags, branches, and commits refer to image tags here.
image: entropyxyz/entropy-tss:${ENTROPY_CORE_VERSION:-latest}
Copy link
Collaborator

Choose a reason for hiding this comment

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

🔥 I don't know if we want this to default to latest do we?

I 100% want to know what the version is I'm running and if I forgot to set the ENTROPY_CORE_VERSION this feels like I'm gonna get some random surprise version 👎

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this -latest came as a suggestion from @vitropy i believe i am hestant to remove this as i want to get the latest build for this version tag that i am asking for

Copy link
Contributor

Choose a reason for hiding this comment

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

@mixmix I think @frankiebee is correct here: if you 100% want to know what the version you are running is, simply set ENTROPY_CORE_VERSION in your environment. That is what this variable is for. See Environment variables in our Wiki. If you don't set it, then getting the latest tag mimics the behavior of all other Docker default commands, which is what 99% of users are going to want.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes I get this is a fallback. I just think it might be a foot-gun. Fine to wait and see though!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

lets wait and see

ports:
- "127.0.0.1:3001:3001/tcp"
command:
- "--alice"
- "--threshold-url"
- "0.0.0.0:3001"
- "--chain-endpoint"
- "ws://alice-chain-node:9944"
- "--no-sync"

alice-chain-node:
image: entropyxyz/entropy:${ENTROPY_CORE_VERSION:-latest}
ports:
- "127.0.0.1:9944:9944/tcp"
volumes:
- ${PWD}/dev:/srv/entropy/dev
command:
- "--chain"
- "devnet-local"
- "--alice"
- "--base-path"
- ".entropy/alice"
- "--rpc-port"
- "9944"
- "--rpc-cors"
- "all"
- "--unsafe-rpc-external" # Intentional, for TSS's access.
- "--node-key=0000000000000000000000000000000000000000000000000000000000000001"
- "--tss-server-endpoint"
- "http://alice-tss-server:3001"

bob-tss-server:
image: entropyxyz/entropy-tss:${ENTROPY_CORE_VERSION:-latest}
ports:
- "127.0.0.1:3002:3002/tcp"
command:
- "--bob"
- "--threshold-url"
- "0.0.0.0:3002"
- "--chain-endpoint"
- "ws://bob-chain-node:9944"
- "--no-sync"

# "Bob's chain node."
bob-chain-node:
image: entropyxyz/entropy:${ENTROPY_CORE_VERSION:-latest}
ports:
- "127.0.0.1:9945:9944/tcp"
volumes:
- ${PWD}/dev:/srv/entropy/dev
command:
- "--chain"
- "devnet-local"
- "--bob"
- "--base-path"
- ".entropy/bob"
- "--rpc-port"
- "9944"
- "--rpc-cors"
- "all"
- "--unsafe-rpc-external" # Intentional, for TSS's access.
- "--bootnodes"
- "/dns4/alice-chain-node/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp"
- "--tss-server-endpoint"
- "http://bob-tss-server:3002"

charlie-tss-server:
image: entropyxyz/entropy-tss:${ENTROPY_CORE_VERSION:-latest}
ports:
- "127.0.0.1:3003:3003/tcp"
command:
- "--charlie"
- "--threshold-url"
- "0.0.0.0:3003"
- "--chain-endpoint"
- "ws://charlie-chain-node:9944"
- "--no-sync"

charlie-chain-node:
image: entropyxyz/entropy:${ENTROPY_CORE_VERSION:-latest}
ports:
- "127.0.0.1:9946:9944/tcp"
volumes:
- ${PWD}/dev:/srv/entropy/dev
command:
- "--chain"
- "devnet-local"
- "--charlie" # Shortcut for `--name Charlie --validator`
- "--base-path"
- ".entropy/charlie"
- "--rpc-port"
- "9944"
- "--rpc-cors"
- "all"
- "--unsafe-rpc-external" # Intentional, for TSS's access.
- "--bootnodes"
- "/dns4/alice-chain-node/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp"
- "--tss-server-endpoint"
- "http://charlie-tss-server:3003"
dave-tss-server:
image: entropyxyz/entropy-tss:${ENTROPY_CORE_VERSION:-latest}
ports:
- "127.0.0.1:3004:3004/tcp"
command:
- "--dave"
- "--threshold-url"
- "0.0.0.0:3004"
- "--chain-endpoint"
- "ws://dave-chain-node:9944"
- "--no-sync"

dave-chain-node:
image: entropyxyz/entropy:${ENTROPY_CORE_VERSION:-latest}
ports:
- "127.0.0.1:9947:9944/tcp"
volumes:
- ${PWD}/dev:/srv/entropy/dev
command:
- "--chain"
- "devnet-local"
- "--dave" # Shortcut for `--name Dave --validator`
- "--base-path"
- ".entropy/dave"
- "--rpc-port"
- "9944"
- "--rpc-cors"
- "all"
- "--unsafe-rpc-external" # Intentional, for TSS's access.
- "--bootnodes"
- "/dns4/alice-chain-node/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp"
- "--tss-server-endpoint"
- "http://dave-tss-server:3004"
13 changes: 11 additions & 2 deletions dev/docker-scripts/one-node-no-tss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,22 @@ name: entropy-devnet-local

services:
alice-chain-node:
image: entropyxyz/entropy:$ENTROPY_CORE_VERSION
image: entropyxyz/entropy:${ENTROPY_CORE_VERSION:-latest}
ports:
- "127.0.0.1:9944:9944/tcp" # "RPC Port."
- "127.0.0.1:9944:9944/tcp"
volumes:
- ${PWD}/dev:/srv/entropy/dev
command:
- "--chain"
- "devnet-local"
- "--alice"
- "--base-path"
- ".entropy/alice"
- "--rpc-port"
- "9944"
- "--rpc-cors"
- "all"
- "--unsafe-rpc-external" # Intentional, for TSS's access.
- "--node-key=0000000000000000000000000000000000000000000000000000000000000001"
- "--tss-server-endpoint"
- "http://alice-tss-server:3001"
83 changes: 0 additions & 83 deletions dev/docker-scripts/two-nodes.yaml

This file was deleted.

Loading
Loading