Skip to content

Commit 119a8f6

Browse files
authored
Merge pull request #342 from lu-bann/dev
bump version merge main
2 parents 59bcc47 + 2b9b9c5 commit 119a8f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1949
-1885
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: CI
22

33
on:
4+
workflow_call:
45
push:
56
branches:
67
- dev
@@ -25,6 +26,8 @@ jobs:
2526
tool: cargo-sort,cargo-machete
2627
- name: Install Protoc
2728
uses: arduino/setup-protoc@v3
29+
with:
30+
repo-token: ${{ secrets.GITHUB_TOKEN }}
2831
- name: Setup Rust cache
2932
uses: Swatinem/rust-cache@v2
3033
with:

.github/workflows/e2e-tests.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: e2e tests
22

33
on:
4+
workflow_call:
45
push:
56
branches:
67
- dev
@@ -20,6 +21,12 @@ jobs:
2021
with:
2122
cache-on-failure: true
2223
- uses: arduino/setup-protoc@v3
24+
with:
25+
repo-token: ${{ secrets.GITHUB_TOKEN }}
26+
- name: Install Foundry
27+
uses: foundry-rs/foundry-toolchain@v1
28+
with:
29+
version: nightly
2330
- name: Install kurtosis
2431
run: |
2532
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list

.github/workflows/release.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,18 @@ on:
55
tags:
66
- 'v*'
77

8+
permissions:
9+
contents: write
10+
811
env:
9-
FOUNDRY_PROFILE: ci
10-
API_KEY_INFURA: ${{ secrets.API_KEY_INFURA }}
1112
CARGO_TERM_COLOR: always
1213

1314
jobs:
1415
unit-tests:
15-
name: Run All Tests
16-
steps:
17-
- uses: actions/checkout@v4
18-
- uses: ./.github/workflows/ci.yml@main
16+
uses: lu-bann/taiyi/.github/workflows/ci.yml@dev
1917

2018
e2e-tests:
21-
name: Run E2E Tests
22-
steps:
23-
- uses: actions/checkout@v4
24-
- uses: ./.github/workflows/e2e-tests.yml@main
19+
uses: lu-bann/taiyi/.github/workflows/e2e-tests.yml@dev
2520

2621
docker:
2722
name: Build and Push Docker Image
@@ -56,7 +51,7 @@ jobs:
5651
release:
5752
name: Build and Release Binaries
5853
needs: [unit-tests, e2e-tests]
59-
runs-on: ubuntu-latest
54+
runs-on: ${{ matrix.os }}
6055
strategy:
6156
matrix:
6257
include:
@@ -66,16 +61,16 @@ jobs:
6661
os: macos-latest
6762
- target: aarch64-apple-darwin
6863
os: macos-latest
69-
- target: x86_64-pc-windows-msvc
70-
os: windows-latest
7164
steps:
7265
- uses: actions/checkout@v4
7366
- name: Setup Rust toolchain
74-
uses: dtolnay/rust-toolchain@nightly
67+
uses: dtolnay/rust-toolchain@1.83.0
7568
with:
7669
targets: ${{ matrix.target }}
7770
- name: Install Protoc
7871
uses: arduino/setup-protoc@v3
72+
with:
73+
repo-token: ${{ secrets.GITHUB_TOKEN }}
7974
- name: Build binary
8075
run: cargo build --release --target ${{ matrix.target }}
8176
- name: Prepare assets
@@ -94,7 +89,7 @@ jobs:
9489
- name: Upload artifacts
9590
uses: actions/upload-artifact@v3
9691
with:
97-
name: taiyi-${{ matrix.target }}
92+
name: taiyi-${{ github.sha }}
9893
path: release/*
9994

10095
github-release:
@@ -107,10 +102,11 @@ jobs:
107102
- name: Download all artifacts
108103
uses: actions/download-artifact@v3
109104
with:
105+
name: taiyi-${{ github.sha }}
110106
path: artifacts
111107
- name: Create Release
112108
uses: softprops/action-gh-release@v2
113109
with:
114110
files: artifacts/**/*
115111
generate_release_notes: true
116-
prerelease: ${{ contains(github.ref, 'alpha') }}
112+
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}

.gitmodules

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,19 @@
1010
[submodule "contracts/lib/axiom-v2-periphery"]
1111
path = contracts/lib/axiom-v2-periphery
1212
url = https://github.com/axiom-crypto/axiom-v2-periphery
13-
[submodule "contracts/lib/eigenlayer-contracts"]
14-
path = contracts/lib/eigenlayer-contracts
15-
url = https://github.com/Layr-Labs/eigenlayer-contracts
16-
[submodule "contracts/lib/eigenlayer-middleware"]
17-
path = contracts/lib/eigenlayer-middleware
18-
url = https://github.com/Layr-Labs/eigenlayer-middleware
1913
[submodule "contracts/lib/openzeppelin-contracts"]
2014
path = contracts/lib/openzeppelin-contracts
2115
url = https://github.com/OpenZeppelin/openzeppelin-contracts
2216
[submodule "contracts/lib/openzeppelin-contracts-upgradeable"]
2317
path = contracts/lib/openzeppelin-contracts-upgradeable
2418
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
19+
[submodule "contracts/lib/eigenlayer-contracts"]
20+
path = contracts/lib/eigenlayer-contracts
21+
url = https://github.com/Layr-Labs/eigenlayer-contracts
22+
[submodule "lib/eigenlayer-middleware"]
23+
path = lib/eigenlayer-middleware
24+
url = https://github.com/Layr-Labs/eigenlayer-middleware
25+
branch = mainnet
26+
[submodule "contracts/lib/eigenlayer-middleware"]
27+
path = contracts/lib/eigenlayer-middleware
28+
url = https://github.com/Layr-Labs/eigenlayer-middleware

Cargo.lock

Lines changed: 11 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace.package]
2-
version = "0.1.1"
2+
version = "0.1.2"
33
edition = "2021"
44
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
55

@@ -83,6 +83,7 @@ thiserror = { version = "2.0.7" }
8383
parking_lot = "0.12.3"
8484
futures = "0.3.31"
8585
tracing = "0.1.41"
86+
tracing-core = "0.1.33"
8687
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
8788
blst = "0.3.13"
8889
lru = "0.12.5"
@@ -116,3 +117,4 @@ ssz_types = "0.8"
116117
lighthouse-types = { package = "types", git = "https://github.com/sigp/lighthouse", tag = "v6.0.1" }
117118
http-body-util = "0.1.2"
118119
tower = "0.5.2"
120+
sha2 = "0.10.8"

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ e2e-setup:
1818
e2e-test:
1919
bash scripts/devnet/start-e2e-tests.sh
2020

21+
e2e-clean:
22+
bash scripts/devnet/clean.sh
23+
2124
make e2e:
2225
make e2e-network
2326
make e2e-setup

README.md

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Taiyi(太一) - an Ethereum L1 Preconfirmation Protocol
2+
23
<p align="center">
34
<img src="https://github.com/user-attachments/assets/a34f1523-517e-4bbe-90e8-4516f61cdab7" alt="image_resized">
45
</p>
@@ -7,13 +8,13 @@
78

89
### Requirements
910

10-
* Compiled [commit-boost](https://github.com/Commit-Boost/commit-boost-client) for `signer_module` integration
11-
* Consensus layer (CL) client
12-
* Execution layer (EL) client
11+
- Compiled [commit-boost](https://github.com/Commit-Boost/commit-boost-client) for `signer_module` integration
12+
- Consensus layer (CL) client
13+
- Execution layer (EL) client
1314

14-
### Running Commit-Boost
15+
### Running Commit-Boost
1516

16-
*Note: Due to the frequent updates of Commit-Boost, we currently pin the Commit-Boost version to e6ad292ee43063c16e397e58a9a152482306d16f for compatibility reasons.*
17+
_Note: Due to the frequent updates of Commit-Boost, we currently pin the Commit-Boost version to e6ad292ee43063c16e397e58a9a152482306d16f for compatibility reasons._
1718

1819
```bash
1920
git clone https://github.com/Commit-Boost/commit-boost-client.git
@@ -33,16 +34,43 @@ SIGNER_SERVER=8000 \
3334
./target/debug/signer-module
3435
```
3536

36-
3737
## Usage
38-
Once you have your signer-module , cl and el ready, to start running the preconfer:
38+
39+
Once you have your signer-module , cl and el ready, to start running the preconfer:
40+
3941
```
4042
cargo run -- preconfer --rpc_url EL_RPC_URL \
4143
--beacon_rpc_url CL_RPC_URL \
4244
--taiyi_escrow_contract_addr 0xad4Ce1d2CdBdb84222D519a1FBc8cc181ba28e07 # helder contract \
43-
--taiyi_core_contract_addr 0xb01F002F3b21E1e0E81c3023C85aCd02035abCE8 # helder contract \
44-
--taiyi_proposer_registry_contract_addr 0x7B7f8371f8bC3e0f148BCeD3a54F89432a0Da5AE # helder contract \
45+
--taiyi_core_contract_addr 0xb01F002F3b21E1e0E81c3023C85aCd02035abCE8 # helder contract \
46+
--taiyi_proposer_registry_contract_addr 0x7B7f8371f8bC3e0f148BCeD3a54F89432a0Da5AE # helder contract \
4547
--commit-boost-url http://127.0.0.1:8000 \
4648
--commit-boost-id taiyi \
4749
--commit-boost-jwt 8d1b71df48ff1971e714156b2aafcac8fc5ea02c6770adc3954557d978ba3439
4850
```
51+
52+
```mermaid
53+
sequenceDiagram
54+
participant User as user
55+
participant Gateway as taiyi gateway
56+
participant PBS Relay as pbs relay
57+
58+
User->>Gateway: gateway/commitments/v0/epoch_info
59+
Note over User, Gateway: Fetch available slots in the next 2 epochs
60+
61+
User->>Gateway: gateway/commitments/v0/estimate_fee
62+
Note over User, Gateway: Quotes a fee to the user for a slot
63+
64+
User->>Gateway: gateway/commitments/v0/reserve_blockspace
65+
Note over User, Gateway: returns a UUID used to send a transaction later
66+
67+
alt User sends a transaction for the blockspace reserved which satisfies the limit
68+
User->>Gateway: gateway/commitments/vo/send_transaction
69+
Note over User, Gateway: gateway appends a tranaction which calls `get_tip()` on TaiyiCore
70+
else User doesn't sends a valid transaction for the blockspace reserved which satisfies the limit
71+
Note over User, Gateway: gateway appends a tranaction which calsl `exhaust()` on TaiyiCore
72+
end
73+
74+
Gateway->>PBS Relay: /submit_constraints
75+
76+
```

contracts/.gitmodules

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
path = lib/forge-std
33
url = https://github.com/foundry-rs/forge-std
44

5-
[submodule "lib/axiom-std"]
6-
path = lib/axiom-std
7-
url = https://github.com/axiom-crypto/axiom-std
8-
95
[submodule "lib/openzeppelin-contracts"]
106
path = lib/openzeppelin-contracts
117
url = https://github.com/OpenZeppelin/openzeppelin-contracts
@@ -14,10 +10,6 @@
1410
path = lib/eigenlayer-middleware
1511
url = https://github.com/Layr-Labs/eigenlayer-middleware
1612

17-
[submodule "lib/axiom-v2-periphery"]
18-
path = lib/axiom-v2-periphery
19-
url = https://github.com/axiom-crypto/axiom-v2-periphery
20-
2113
[submodule "lib/eigenlayer-contracts"]
2214
path = lib/eigenlayer-contracts
2315
url = https://github.com/Layr-Labs/eigenlayer-contracts

0 commit comments

Comments
 (0)