[refactor] Convert hyphen to underscore in the directory tree (#524)

* Move price-service to price_service

* Update references to price-service

* Rename target-chains to target_chains

* Update references to target-chains

* Rename tilt-devnet to tilt_devnet

* Update references to tilt-devnet

* Rename wormhole-attester to wormhole_attester

* Update references to wormhole-attester

* Rename multisig-wh-message-builder

* Update references to wh-msg-bldr

* Fix dockerfile issue

* Rename remove-executor to remote_executor

* Update references to remote-executor

* Rename xc-governance-sdk-js

* Update references to the governance sdk

* Move docker-images to docker_images

* Update references to docker-images
This commit is contained in:
Ali Behjati 2023-01-24 19:06:22 +01:00 committed by GitHub
parent 58f3ddcb13
commit 084acdb57e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
382 changed files with 111 additions and 111 deletions

View File

@ -1,14 +1,14 @@
on: on:
pull_request: pull_request:
paths: paths:
- target-chains/ethereum/** - target_chains/ethereum/**
- governance/xc-governance-sdk-js/** - governance/xc_governance_sdk_js/**
push: push:
branches: branches:
- main - main
paths: paths:
- target-chains/ethereum/** - target_chains/ethereum/**
- governance/xc-governance-sdk-js/** - governance/xc_governance_sdk_js/**
name: Ethereum Contract name: Ethereum Contract
@ -18,13 +18,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
defaults: defaults:
run: run:
working-directory: target-chains/ethereum/ working-directory: target_chains/ethereum/
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install XC-governance sdk dependencies - name: Install XC-governance sdk dependencies
run: npm ci run: npm ci
working-directory: governance/xc-governance-sdk-js working-directory: governance/xc_governance_sdk_js
- name: Install contract npm dependencies - name: Install contract npm dependencies
run: npm ci run: npm ci

View File

@ -37,8 +37,8 @@ jobs:
env: env:
AWS_REGION: us-east-1 AWS_REGION: us-east-1
- run: | - run: |
DOCKER_BUILDKIT=1 docker build -f tilt-devnet/docker-images/Dockerfile.wasm -o type=local,dest=. . DOCKER_BUILDKIT=1 docker build -f tilt_devnet/docker_images/Dockerfile.wasm -o type=local,dest=. .
DOCKER_BUILDKIT=1 docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f price-service/Dockerfile.price_service . DOCKER_BUILDKIT=1 docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f price_service/Dockerfile.price_service .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
env: env:
ECR_REGISTRY: public.ecr.aws ECR_REGISTRY: public.ecr.aws

View File

@ -3,13 +3,13 @@ name: Pyth CosmWasm Contract
on: on:
pull_request: pull_request:
paths: paths:
- target-chains/cosmwasm/** - target_chains/cosmwasm/**
- third_party/pyth/p2w-sdk/rust/** - third_party/pyth/p2w-sdk/rust/**
push: push:
branches: branches:
- main - main
paths: paths:
- target-chains/cosmwasm/** - target_chains/cosmwasm/**
- third_party/pyth/p2w-sdk/rust/** - third_party/pyth/p2w-sdk/rust/**
env: env:
@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
defaults: defaults:
run: run:
working-directory: target-chains/cosmwasm/contracts/pyth working-directory: target_chains/cosmwasm/contracts/pyth
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Build - name: Build

View File

@ -2,10 +2,10 @@ name: Check Remote Executor
on: on:
pull_request: pull_request:
paths: [governance/remote-executor/**] paths: [governance/remote_executor/**]
push: push:
branches: [main] branches: [main]
paths: [governance/remote-executor/**] paths: [governance/remote_executor/**]
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -22,4 +22,4 @@ jobs:
sh -c "$(curl -sSfL https://release.solana.com/stable/install)" sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
- name: Run executor tests - name: Run executor tests
run: cargo test-bpf --manifest-path ./governance/remote-executor/Cargo.toml run: cargo test-bpf --manifest-path ./governance/remote_executor/Cargo.toml

View File

@ -21,43 +21,43 @@ repos:
- id: cargo-fmt-remote-executor - id: cargo-fmt-remote-executor
name: Cargo format for remote executor name: Cargo format for remote executor
language: "rust" language: "rust"
entry: cargo +nightly fmt --manifest-path ./governance/remote-executor/Cargo.toml --all -- --config-path rustfmt.toml entry: cargo +nightly fmt --manifest-path ./governance/remote_executor/Cargo.toml --all -- --config-path rustfmt.toml
pass_filenames: false pass_filenames: false
files: governance/remote-executor files: governance/remote_executor
- id: cargo-clippy-remote-executor - id: cargo-clippy-remote-executor
name: Cargo clippy for remote executor name: Cargo clippy for remote executor
language: "rust" language: "rust"
entry: cargo +nightly clippy --manifest-path ./governance/remote-executor/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings entry: cargo +nightly clippy --manifest-path ./governance/remote_executor/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
pass_filenames: false pass_filenames: false
files: governance/remote-executor files: governance/remote_executor
# Hooks for the attester # Hooks for the attester
- id: cargo-fmt-attester - id: cargo-fmt-attester
name: Cargo format for attester name: Cargo format for attester
language: "rust" language: "rust"
entry: cargo +nightly fmt --manifest-path ./wormhole-attester/Cargo.toml --all -- --config-path rustfmt.toml entry: cargo +nightly fmt --manifest-path ./wormhole_attester/Cargo.toml --all -- --config-path rustfmt.toml
pass_filenames: false pass_filenames: false
files: wormhole-attester files: wormhole_attester
- id: cargo-clippy-attester - id: cargo-clippy-attester
name: Cargo clippy for attester name: Cargo clippy for attester
language: "rust" language: "rust"
entry: | entry: |
bash -c 'EMITTER_ADDRESS=0 BRIDGE_ADDRESS=0 cargo +nightly clippy --manifest-path \ bash -c 'EMITTER_ADDRESS=0 BRIDGE_ADDRESS=0 cargo +nightly clippy --manifest-path \
./wormhole-attester/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings' ./wormhole_attester/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings'
pass_filenames: false pass_filenames: false
files: wormhole-attester files: wormhole_attester
# Hooks for cosmwasm contract # Hooks for cosmwasm contract
- id: cargo-fmt-cosmwasm - id: cargo-fmt-cosmwasm
name: Cargo format for cosmwasm contract name: Cargo format for cosmwasm contract
language: "rust" language: "rust"
entry: cargo +nightly fmt --manifest-path ./target-chains/cosmwasm/Cargo.toml --all -- --config-path rustfmt.toml entry: cargo +nightly fmt --manifest-path ./target_chains/cosmwasm/Cargo.toml --all -- --config-path rustfmt.toml
pass_filenames: false pass_filenames: false
files: target-chains/cosmwasm files: target_chains/cosmwasm
- id: cargo-clippy-cosmwasm - id: cargo-clippy-cosmwasm
name: Cargo clippy for cosmwasm contract name: Cargo clippy for cosmwasm contract
language: "rust" language: "rust"
entry: cargo +nightly clippy --manifest-path ./target-chains/cosmwasm/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings entry: cargo +nightly clippy --manifest-path ./target_chains/cosmwasm/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
pass_filenames: false pass_filenames: false
files: target-chains/cosmwasm files: target_chains/cosmwasm
# Hooks for p2w-sdk/rust # Hooks for p2w-sdk/rust
- id: cargo-fmt-p2w-sdk - id: cargo-fmt-p2w-sdk
name: Cargo format for p2w-sdk name: Cargo format for p2w-sdk

View File

@ -12,7 +12,7 @@ Within this monorepo you will find the following subprojects:
## Wormhole Attester ## Wormhole Attester
> wormhole-attester > wormhole_attester
The main Pyth implementation currently exists as an [on-chain contract][] on The main Pyth implementation currently exists as an [on-chain contract][] on
Solana. In order to expose these prices cross-chain, the Wormhole Attester Solana. In order to expose these prices cross-chain, the Wormhole Attester
@ -27,7 +27,7 @@ various receiver contracts.
### Ethereum ### Ethereum
> target-chains/ethereum/contracts/pyth > target_chains/ethereum/contracts/pyth
The Ethereum contract acts as a receiver for Pyth prices relayed from the The Ethereum contract acts as a receiver for Pyth prices relayed from the
Wormhole Attester. It also provides a public API for other Ethereum contracts Wormhole Attester. It also provides a public API for other Ethereum contracts
@ -39,7 +39,7 @@ examples.
## Price Service ## Price Service
> price-service > price_service
The Price Service is an off-chain service which constantly observes the The Price Service is an off-chain service which constantly observes the
Wormhole network watching for price attestations emitted from the Pyth Solana Wormhole network watching for price attestations emitted from the Pyth Solana

View File

@ -66,16 +66,16 @@ def k8s_yaml_with_ns(objects):
local_resource( local_resource(
name = "wasm-gen", name = "wasm-gen",
cmd = "tilt docker build -- -f tilt-devnet/docker-images/Dockerfile.wasm -o type=local,dest=. .", cmd = "tilt docker build -- -f tilt_devnet/docker_images/Dockerfile.wasm -o type=local,dest=. .",
env = {"DOCKER_BUILDKIT": "1"}, env = {"DOCKER_BUILDKIT": "1"},
deps = "./wormhole-attester", deps = "./wormhole_attester",
labels = ["wasm"], labels = ["wasm"],
allow_parallel=True, allow_parallel=True,
trigger_mode = trigger_mode, trigger_mode = trigger_mode,
) )
def build_node_yaml(): def build_node_yaml():
node_yaml = read_yaml_stream("tilt-devnet/k8s/node.yaml") node_yaml = read_yaml_stream("tilt_devnet/k8s/node.yaml")
for obj in node_yaml: for obj in node_yaml:
if obj["kind"] == "StatefulSet" and obj["metadata"]["name"] == "guardian": if obj["kind"] == "StatefulSet" and obj["metadata"]["name"] == "guardian":
@ -103,7 +103,7 @@ k8s_resource(
) )
# spy # spy
k8s_yaml_with_ns("tilt-devnet/k8s/spy.yaml") k8s_yaml_with_ns("tilt_devnet/k8s/spy.yaml")
k8s_resource( k8s_resource(
"spy", "spy",
@ -121,7 +121,7 @@ k8s_resource(
docker_build( docker_build(
ref = "bridge-client", ref = "bridge-client",
context = ".", context = ".",
dockerfile = "tilt-devnet/docker-images/Dockerfile.client", dockerfile = "tilt_devnet/docker_images/Dockerfile.client",
) )
# solana smart contract # solana smart contract
@ -129,12 +129,12 @@ docker_build(
docker_build( docker_build(
ref = "solana-contract", ref = "solana-contract",
context = ".", context = ".",
dockerfile = "tilt-devnet/docker-images/Dockerfile.solana", dockerfile = "tilt_devnet/docker_images/Dockerfile.solana",
) )
# solana local devnet # solana local devnet
k8s_yaml_with_ns("tilt-devnet/k8s/solana-devnet.yaml") k8s_yaml_with_ns("tilt_devnet/k8s/solana-devnet.yaml")
k8s_resource( k8s_resource(
"solana-devnet", "solana-devnet",
@ -152,7 +152,7 @@ k8s_resource(
docker_build( docker_build(
ref = "eth-node", ref = "eth-node",
context = "./", context = "./",
dockerfile = "tilt-devnet/docker-images/Dockerfile.ethereum", dockerfile = "tilt_devnet/docker_images/Dockerfile.ethereum",
# sync external scripts for incremental development # sync external scripts for incremental development
# (everything else needs to be restarted from scratch for determinism) # (everything else needs to be restarted from scratch for determinism)
@ -170,7 +170,7 @@ docker_build(
context = ".", context = ".",
dockerfile = "third_party/pyth/Dockerfile.pyth", dockerfile = "third_party/pyth/Dockerfile.pyth",
) )
k8s_yaml_with_ns("./tilt-devnet/k8s/pyth.yaml") k8s_yaml_with_ns("./tilt_devnet/k8s/pyth.yaml")
k8s_resource( k8s_resource(
"pyth", "pyth",
@ -186,7 +186,7 @@ docker_build(
dockerfile = "./third_party/pyth/Dockerfile.p2w-attest", dockerfile = "./third_party/pyth/Dockerfile.p2w-attest",
) )
k8s_yaml_with_ns("tilt-devnet/k8s/p2w-attest.yaml") k8s_yaml_with_ns("tilt_devnet/k8s/p2w-attest.yaml")
k8s_resource( k8s_resource(
"p2w-attest", "p2w-attest",
resource_deps = ["solana-devnet", "pyth", "guardian"], resource_deps = ["solana-devnet", "pyth", "guardian"],
@ -203,7 +203,7 @@ docker_build(
dockerfile = "./third_party/pyth/Dockerfile.check-attestations", dockerfile = "./third_party/pyth/Dockerfile.check-attestations",
) )
k8s_yaml_with_ns("tilt-devnet/k8s/check-attestations.yaml") k8s_yaml_with_ns("tilt_devnet/k8s/check-attestations.yaml")
k8s_resource( k8s_resource(
"check-attestations", "check-attestations",
resource_deps = ["pyth-price-service", "pyth", "p2w-attest"], resource_deps = ["pyth-price-service", "pyth", "p2w-attest"],
@ -217,7 +217,7 @@ docker_build(
context = ".", context = ".",
dockerfile = "third_party/pyth/p2w-relay/Dockerfile.pyth_relay", dockerfile = "third_party/pyth/p2w-relay/Dockerfile.pyth_relay",
) )
k8s_yaml_with_ns("tilt-devnet/k8s/p2w-terra-relay.yaml") k8s_yaml_with_ns("tilt_devnet/k8s/p2w-terra-relay.yaml")
k8s_resource( k8s_resource(
"p2w-terra-relay", "p2w-terra-relay",
resource_deps = ["pyth", "p2w-attest", "spy", "terra-terrad", "wasm-gen"], resource_deps = ["pyth", "p2w-attest", "spy", "terra-terrad", "wasm-gen"],
@ -227,7 +227,7 @@ k8s_resource(
labels = ["pyth"] labels = ["pyth"]
) )
k8s_yaml_with_ns("tilt-devnet/k8s/p2w-evm-relay.yaml") k8s_yaml_with_ns("tilt_devnet/k8s/p2w-evm-relay.yaml")
k8s_resource( k8s_resource(
"p2w-evm-relay", "p2w-evm-relay",
resource_deps = ["pyth", "p2w-attest", "spy", "eth-devnet", "wasm-gen"], resource_deps = ["pyth", "p2w-attest", "spy", "eth-devnet", "wasm-gen"],
@ -241,9 +241,9 @@ k8s_resource(
docker_build( docker_build(
ref = "pyth-price-service", ref = "pyth-price-service",
context = ".", context = ".",
dockerfile = "price-service/Dockerfile.price_service", dockerfile = "price_service/Dockerfile.price_service",
) )
k8s_yaml_with_ns("tilt-devnet/k8s/pyth-price-service.yaml") k8s_yaml_with_ns("tilt_devnet/k8s/pyth-price-service.yaml")
k8s_resource( k8s_resource(
"pyth-price-service", "pyth-price-service",
resource_deps = ["pyth", "p2w-attest", "spy", "eth-devnet", "wasm-gen"], resource_deps = ["pyth", "p2w-attest", "spy", "eth-devnet", "wasm-gen"],
@ -253,7 +253,7 @@ k8s_resource(
labels = ["pyth"] labels = ["pyth"]
) )
k8s_yaml_with_ns("tilt-devnet/k8s/eth-devnet.yaml") k8s_yaml_with_ns("tilt_devnet/k8s/eth-devnet.yaml")
k8s_resource( k8s_resource(
"eth-devnet", "eth-devnet",
@ -278,17 +278,17 @@ k8s_resource(
docker_build( docker_build(
ref = "terra-image", ref = "terra-image",
context = "./target-chains/cosmwasm/devnet", context = "./target_chains/cosmwasm/devnet",
dockerfile = "./target-chains/cosmwasm/devnet/Dockerfile", dockerfile = "./target_chains/cosmwasm/devnet/Dockerfile",
) )
docker_build( docker_build(
ref = "cosmwasm-contracts", ref = "cosmwasm-contracts",
context = ".", context = ".",
dockerfile = "tilt-devnet/docker-images/Dockerfile.cosmwasm", dockerfile = "tilt_devnet/docker_images/Dockerfile.cosmwasm",
) )
k8s_yaml_with_ns("tilt-devnet/k8s/terra-devnet.yaml") k8s_yaml_with_ns("tilt_devnet/k8s/terra-devnet.yaml")
k8s_resource( k8s_resource(
"terra-terrad", "terra-terrad",
@ -317,10 +317,10 @@ k8s_resource(
docker_build( docker_build(
ref = "prometheus", ref = "prometheus",
context = ".", context = ".",
dockerfile = "tilt-devnet/docker-images/Dockerfile.prometheus", dockerfile = "tilt_devnet/docker_images/Dockerfile.prometheus",
) )
k8s_yaml_with_ns("tilt-devnet/k8s/prometheus.yaml") k8s_yaml_with_ns("tilt_devnet/k8s/prometheus.yaml")
k8s_resource( k8s_resource(
"prometheus", "prometheus",
@ -332,10 +332,10 @@ k8s_resource(
docker_build( docker_build(
ref = "multisig", ref = "multisig",
context = ".", context = ".",
dockerfile = "tilt-devnet/docker-images/Dockerfile.multisig", dockerfile = "tilt_devnet/docker_images/Dockerfile.multisig",
) )
k8s_yaml_with_ns("tilt-devnet/k8s/multisig.yaml") k8s_yaml_with_ns("tilt_devnet/k8s/multisig.yaml")
k8s_resource( k8s_resource(
"multisig", "multisig",

View File

@ -3,8 +3,8 @@ SPY_SERVICE_HOST=0.0.0.0:7072
# Filters (if provided) should be valid JSON like below: # Filters (if provided) should be valid JSON like below:
# These filters tell the spy to only retrieve messages sent from certain chains/contracts. # These filters tell the spy to only retrieve messages sent from certain chains/contracts.
# See the docker-compose.<network>.yaml files in the price-service directory for the appropriate # See the docker-compose.<network>.yaml files in the price_service directory for the appropriate
# configuration for a testnet/mainnet pyth price-service deployment. # configuration for a testnet/mainnet pyth price_service deployment.
SPY_SERVICE_FILTERS=[{"chain_id":1,"emitter_address":"71f8dcb863d176e2c420ad6610cf687359612b6fb392e0642b0ca6b1f186aa3b"}] SPY_SERVICE_FILTERS=[{"chain_id":1,"emitter_address":"71f8dcb863d176e2c420ad6610cf687359612b6fb392e0642b0ca6b1f186aa3b"}]
# Number of seconds to sync with spy to be sure to have latest messages # Number of seconds to sync with spy to be sure to have latest messages

View File

@ -10,7 +10,7 @@ WORKDIR ${BASE_PATH}/${P2W_SDK_REL_PATH}
COPY --chown=pyth:pyth ${P2W_SDK_REL_PATH} . COPY --chown=pyth:pyth ${P2W_SDK_REL_PATH} .
RUN npm ci && npm run build && npm cache clean --force RUN npm ci && npm run build && npm cache clean --force
ARG PRICE_SERVICE_REL_PATH=price-service ARG PRICE_SERVICE_REL_PATH=price_service
WORKDIR ${BASE_PATH}/${PRICE_SERVICE_REL_PATH} WORKDIR ${BASE_PATH}/${PRICE_SERVICE_REL_PATH}
COPY --chown=pyth:pyth ${PRICE_SERVICE_REL_PATH} . COPY --chown=pyth:pyth ${PRICE_SERVICE_REL_PATH} .
RUN npm ci && npm run build && npm cache clean --force RUN npm ci && npm run build && npm cache clean --force

View File

@ -57,7 +57,7 @@ Then, build the image from [the repo root](../../../) like below. It will create
local image named `pyth_price_service`. local image named `pyth_price_service`.
``` ```
$ docker buildx build -f price-service/Dockerfile.price_service -t pyth_price_service . $ docker buildx build -f price_service/Dockerfile.price_service -t pyth_price_service .
``` ```
If you wish to build price service without docker, please follow the instruction of the price service If you wish to build price service without docker, please follow the instruction of the price service

Some files were not shown because too many files have changed in this diff Show More