Skip to content

Commit

Permalink
Merge branch 'main' into noah/dr-eoa
Browse files Browse the repository at this point in the history
  • Loading branch information
nbayindirli committed May 10, 2024
2 parents 9c84695 + e37bd8a commit dd9306f
Show file tree
Hide file tree
Showing 81 changed files with 4,985 additions and 294 deletions.
5 changes: 5 additions & 0 deletions .changeset/green-ads-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/cli': minor
---

Default to home directory for local registry
5 changes: 5 additions & 0 deletions .changeset/lemon-horses-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/cli': patch
---

Improve defaults in chain config command
6 changes: 6 additions & 0 deletions .changeset/sour-bats-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@hyperlane-xyz/utils': minor
'@hyperlane-xyz/sdk': minor
---

Implement aggregation and multisig ISM metadata encoding
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
typescript/sdk/src/cw-types/*.types.ts linguist-generated=true
rust/chains/hyperlane-ethereum/abis/*.abi.json linguist-generated=true
solidity/contracts/interfaces/avs/*.sol linguist-vendored=true
solidity/contracts/avs/ECDSA*.sol linguist-vendored=true
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,6 @@ jobs:
- environment: testnet4
chain: sepolia
module: core
- environment: mainnet3
chain: inevm
module: warp

steps:
- uses: actions/checkout@v3
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "solidity/lib/forge-std"]
path = solidity/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "solidity/lib/fx-portal"]
path = solidity/lib/fx-portal
url = https://github.com/0xPolygon/fx-portal
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,25 @@ foundryup

Check out the [Foundry Book](https://book.getfoundry.sh/getting-started/installation) for more information.

### Node

This repository targets v20 of node. We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage your node version.

To install nvm

```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
```

To install version 20

```bash
nvm install 20
nvm use 20
```

You should change versions automatically with the `.nvmrc` file.

### Workspaces

This monorepo uses [Yarn Workspaces](https://yarnpkg.com/features/workspaces). Installing dependencies, building, testing, and running prettier for all packages can be done from the root directory of the repository.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"prettier": "yarn workspaces foreach --since --parallel run prettier",
"lint": "yarn workspaces foreach --all --parallel run lint",
"test": "yarn workspaces foreach --all --parallel run test",
"test:ci": "yarn workspaces foreach --all --parallel run test:ci",
"test:ci": "yarn workspaces foreach --all --topological run test:ci",
"coverage": "yarn workspaces foreach --all --parallel run coverage",
"version:prepare": "yarn changeset version && yarn workspaces foreach --all --parallel run version:update && yarn install --no-immutable",
"version:check": "yarn changeset status",
Expand Down
2 changes: 1 addition & 1 deletion rust/agents/relayer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ serde.workspace = true
serde_json.workspace = true
strum.workspace = true
thiserror.workspace = true
tokio = { workspace = true, features = ["rt", "macros", "parking_lot"] }
tokio = { workspace = true, features = ["rt", "macros", "parking_lot", "rt-multi-thread"] }
tracing-futures.workspace = true
tracing.workspace = true

Expand Down
2 changes: 1 addition & 1 deletion rust/agents/relayer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ mod relayer;
mod server;
mod settings;

#[tokio::main(flavor = "current_thread")]
#[tokio::main(flavor = "multi_thread", worker_threads = 20)]
async fn main() -> Result<()> {
agent_main::<Relayer>().await
}
6 changes: 3 additions & 3 deletions rust/agents/relayer/src/relayer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ impl Relayer {
.sync("dispatched_messages", cursor)
.await
})
.instrument(info_span!("ContractSync"))
.instrument(info_span!("MessageSync"))
}

async fn run_interchain_gas_payment_sync(
Expand All @@ -380,7 +380,7 @@ impl Relayer {
.clone();
let cursor = contract_sync.cursor(index_settings).await;
tokio::spawn(async move { contract_sync.clone().sync("gas_payments", cursor).await })
.instrument(info_span!("ContractSync"))
.instrument(info_span!("IgpSync"))
}

async fn run_merkle_tree_hook_syncs(
Expand All @@ -391,7 +391,7 @@ impl Relayer {
let contract_sync = self.merkle_tree_hook_syncs.get(origin).unwrap().clone();
let cursor = contract_sync.cursor(index_settings).await;
tokio::spawn(async move { contract_sync.clone().sync("merkle_tree_hook", cursor).await })
.instrument(info_span!("ContractSync"))
.instrument(info_span!("MerkleTreeHookSync"))
}

fn run_message_processor(
Expand Down
364 changes: 275 additions & 89 deletions solidity/.gas-snapshot

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions solidity/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ forge-cache
docs
flattened/
buildArtifact.json
fixtures/
20 changes: 18 additions & 2 deletions solidity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,30 @@ Hyperlane Core contains the contracts and typechain artifacts for the Hyperlane

```bash
# Install with NPM
npm install @hyperlane-xyz/utils
npm install @hyperlane-xyz/core

# Or with Yarn
yarn add @hyperlane-xyz/utils
yarn add @hyperlane-xyz/core
```

Note, this package uses [ESM Modules](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#pure-esm-package)

## Build

```bash
yarn build
```

## Test

```bash
yarn test
```

### Fixtures

Some forge tests may generate fixtures in the [fixtures](./fixtures/) directory. This allows [SDK](../typescript/sdk) tests to leverage forge fuzzing. These are git ignored and should not be committed.

## License

Apache 2.0
Loading

0 comments on commit dd9306f

Please sign in to comment.