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

Feat: add stellar ledger as signer #1627

Open
wants to merge 118 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
2083a7a
feat: initial ledger signer
willemneal Sep 24, 2024
aee08f8
Merge remote-tracking branch 'origin/main' into feat/add_stellar_ledger
willemneal Oct 7, 2024
b02ffc2
Merge branch 'main' into feat/add_stellar_ledger
willemneal Oct 21, 2024
a67f587
fix: add arg
willemneal Oct 21, 2024
70e58b0
Merge remote-tracking branch 'origin/main' into feat/add_stellar_ledger
willemneal Nov 1, 2024
0369e05
feat: add ledger key name for lookup and reference as source account
willemneal Nov 1, 2024
91a5f2b
Merge remote-tracking branch 'origin/main' into feat/add_stellar_ledger
willemneal Nov 1, 2024
6a4986e
Merge remote-tracking branch 'origin/main' into feat/add_stellar_ledger
willemneal Nov 2, 2024
efd2948
Merge remote-tracking branch 'origin/main' into feat/add_stellar_ledger
willemneal Nov 5, 2024
518e591
Merge remote-tracking branch 'origin/main' into feat/add_stellar_ledger
willemneal Nov 5, 2024
1fa59d8
Merge branch 'main' into feat/add_stellar_ledger
willemneal Nov 11, 2024
a0055a9
Merge branch 'main' into feat/add_stellar_ledger
willemneal Nov 14, 2024
5755990
Merge branch 'main' into feat/add_stellar_ledger
willemneal Nov 16, 2024
0aaf7c5
Merge remote-tracking branch 'origin/main' into feat/add_stellar_ledger
willemneal Nov 18, 2024
8799cd0
Merge remote-tracking branch 'origin/main' into feat/add_stellar_ledger
willemneal Nov 18, 2024
98b0100
feat(stellar-ledger): make test utilties public
willemneal Nov 18, 2024
37f302d
fix: add first proper test using ledger and CLI
willemneal Nov 19, 2024
09eff2f
Merge remote-tracking branch 'origin/main' into feat/add_stellar_ledger
willemneal Nov 19, 2024
4680b96
fix: actually test in CI
willemneal Nov 19, 2024
d33a9fc
feat: Add new `Key` type; allowing public keys to be named keys
willemneal Nov 5, 2024
2aec046
fix: lookup first before parsing raw key
willemneal Nov 12, 2024
52bd5e8
fix: docs
willemneal Nov 14, 2024
8f96343
fix: clippy
willemneal Nov 14, 2024
0cc57fe
feat: update tx new commands to use Address type
willemneal Nov 26, 2024
31cde54
fix: rebase issue
willemneal Nov 29, 2024
e5f0e5d
Merge branch 'main' into feat/muxed_keys
willemneal Nov 30, 2024
a86a98f
Update cmd/soroban-cli/src/config/key.rs
willemneal Dec 2, 2024
a64aae5
Merge branch 'main' into feat/muxed_keys
willemneal Dec 2, 2024
b36db49
fix: PR review
willemneal Dec 2, 2024
8c06970
feat: initial work into system keychain
willemneal Nov 5, 2024
883cb8c
chore: clean up
willemneal Nov 5, 2024
eb70734
Add KeyName struct in address
elizabethengelman Dec 2, 2024
d4e2500
Add Secret::Keychain
elizabethengelman Nov 14, 2024
3ee20b8
keys generate: allow for generating keys that are stored in keychain
elizabethengelman Nov 18, 2024
1a24c00
keys generate: Namespace keychain entry to identity name
elizabethengelman Nov 18, 2024
4a0c900
keys generate: don't allow 'keychain:' as a key name
elizabethengelman Nov 20, 2024
755c318
keys address: use keychain entry in secret to get the pub key
elizabethengelman Nov 20, 2024
dd07bf7
tx sign: allow a keychain identity sign a tx
elizabethengelman Nov 21, 2024
f042d19
Cleanup
elizabethengelman Nov 21, 2024
9cf5916
Use keyring mock for generate tests
elizabethengelman Nov 22, 2024
cd515d3
Refactor keyring: add keyring entry as StellarEntry field
elizabethengelman Nov 25, 2024
276558d
Add tests for keyring
elizabethengelman Nov 25, 2024
20c651b
Update config/secret tests
elizabethengelman Nov 25, 2024
66d1bfc
Cleanup
elizabethengelman Nov 25, 2024
8b9763e
Rename keychain arg to secure_store in generate
elizabethengelman Nov 25, 2024
fdefa2a
Rename Secret::Keychain to Secret::SecureStore
elizabethengelman Nov 25, 2024
36559ea
Rename SignerKind::Keychain to SignerKind::SecureStore
elizabethengelman Nov 25, 2024
f98b709
Use print for new fns in generate
elizabethengelman Dec 2, 2024
0f3106b
Return error when trying to get Secure Store secret
elizabethengelman Dec 2, 2024
e120595
Cleanup tests
elizabethengelman Dec 2, 2024
c4d6f99
Merge branch 'main' into feat/os_keychain
elizabethengelman Dec 2, 2024
c7e2cbc
Merge branch 'main' into feat/os_keychain
elizabethengelman Dec 3, 2024
57ba3a4
Install libdbus for rpc-tests and bindings-ts workflows
elizabethengelman Dec 3, 2024
0814e4b
Update generated docs
elizabethengelman Dec 3, 2024
74fa05b
Install libdbus for binaries workflow when target aarch64-unknown-lin…
elizabethengelman Dec 3, 2024
7ff1f6a
Clippy
elizabethengelman Dec 3, 2024
f263d8d
Install libdbus for rust workflow
elizabethengelman Dec 3, 2024
e2b7342
Install libdbus-1-dev in binaries workflow for build step
elizabethengelman Dec 3, 2024
f952c10
Merge branch 'main' into feat/muxed_keys
willemneal Dec 3, 2024
dabbb27
Impl Display for KeyName
elizabethengelman Dec 3, 2024
567e2ab
fix: fix tests
willemneal Dec 3, 2024
dd1d079
Merge remote-tracking branch 'origin/main' into feat/add_stellar_ledger
willemneal Dec 3, 2024
d9131b4
Use resolve_muxed_account in resolve_secret
elizabethengelman Dec 3, 2024
3ad6b9b
Use resolve_muxed_account to get public key
elizabethengelman Dec 3, 2024
9d02b01
Clippy
elizabethengelman Dec 3, 2024
4bddd24
Merge branch 'main' into feat/os_keychain
elizabethengelman Dec 3, 2024
a72276d
fix: Sign tx hash instead of tx env with keychain
elizabethengelman Dec 4, 2024
ed81494
Merge branch 'main' into feat/muxed_keys
willemneal Dec 5, 2024
9226b1b
fix: fmt
willemneal Dec 5, 2024
3a25564
fix: update to work with `op add`
willemneal Dec 5, 2024
5f55e7c
fix: simplify op::add::args::Args
willemneal Dec 5, 2024
0e7f08f
fix: remove untagged and use rename to keep same serialized output
willemneal Dec 5, 2024
aa8bb16
fix: docs and clippy in tests
willemneal Dec 5, 2024
65284cc
Merge branch 'main' into feat/os_keychain
elizabethengelman Dec 5, 2024
efa4f3a
Merge remote-tracking branch 'origin/main' into feat/add_stellar_ledger
willemneal Dec 9, 2024
7537edb
fix: use different contracts for each test
willemneal Dec 9, 2024
2d22fb4
fix: use salt for sim test and separate CI tests
willemneal Dec 9, 2024
a1c654b
fix: clippy
willemneal Dec 9, 2024
a04ab20
fix: reuse container for ledger tests
willemneal Dec 9, 2024
4291ad1
Merge branch 'main' into feat/add_stellar_ledger
willemneal Dec 9, 2024
e9f86e7
Merge branch 'main' into feat/os_keychain
elizabethengelman Dec 9, 2024
4288630
Remove unused bin/secret
elizabethengelman Dec 9, 2024
6143b84
fix: clippy and run each test independently
willemneal Dec 10, 2024
9a13673
fix: run each ledger test by themselves
willemneal Dec 10, 2024
a210205
fix: separate into separate job
willemneal Dec 11, 2024
6661b42
Merge branch 'main' into feat/os_keychain
elizabethengelman Dec 12, 2024
b2120d2
Merge branch 'main' into feat/os_keychain
elizabethengelman Dec 13, 2024
64cd37b
Apply suggestions from code review
willemneal Dec 13, 2024
732e7f4
Merge branch 'main' into feat/muxed_keys
willemneal Dec 13, 2024
d4ba93d
Update cmd/soroban-cli/src/config/locator.rs
willemneal Dec 13, 2024
318f579
fix: refactor with renames from PR
willemneal Dec 13, 2024
cb3f499
fix: build local transaction to test valid signature instead of relyi…
willemneal Dec 13, 2024
75df1cb
Merge remote-tracking branch 'origin/main' into feat/add_stellar_ledger
willemneal Dec 13, 2024
c9456fe
Merge remote-tracking branch 'origin/main' into feat/add_stellar_ledger
willemneal Dec 16, 2024
f2d8fe7
fix: split tests to different hd_pahs
willemneal Dec 16, 2024
60c9d49
Merge branch 'main' into feat/muxed_keys
willemneal Dec 16, 2024
6212d31
fix: CI install needed deps
willemneal Dec 16, 2024
24e7b59
Merge branch 'main' into feat/os_keychain
elizabethengelman Dec 17, 2024
cfdb324
Merge branch 'main' into feat/os_keychain
elizabethengelman Dec 18, 2024
8e158a1
Merge branch 'main' into feat/os_keychain
willemneal Dec 19, 2024
d776f2d
Merge remote-tracking branch 'origin/main' into feat/muxed_keys
willemneal Dec 20, 2024
06932dc
Merge remote-tracking branch 'origin/main' into feat/muxed_keys
willemneal Dec 20, 2024
2241352
Merge remote-tracking branch 'origin/main' into feat/os_keychain
willemneal Dec 20, 2024
03b84e8
Merge remote-tracking branch 'origin/main' into feat/os_keychain
elizabethengelman Dec 20, 2024
24269ce
Fix after merging with main
elizabethengelman Dec 20, 2024
e95fa3a
Apply suggestion from code review
elizabethengelman Dec 20, 2024
95d8b32
Limit key name length
elizabethengelman Dec 23, 2024
01c8753
Update public_key to work with secure storage keys
elizabethengelman Dec 23, 2024
6404da6
Merge remote-tracking branch 'origin/main' into feat/os_keychain
willemneal Jan 6, 2025
085317f
fix(address): remove private key function & use unresolved Address
willemneal Jan 6, 2025
aecc5ac
feat: store seedphrase instead of private key
willemneal Jan 7, 2025
63f247e
fix: clean up
willemneal Jan 7, 2025
73eead7
Merge branch 'feat/os_keychain' into feat/muxed_keys
willemneal Jan 7, 2025
2a422b8
Merge branch 'feat/os_keychain' into feat/add_stellar_ledger
willemneal Jan 8, 2025
c305d9d
Merge branch 'main' into feat/muxed_keys
elizabethengelman Jan 9, 2025
ed797e0
fix: wait to lookup muxed account
willemneal Jan 9, 2025
70240b2
Merge branch 'main' into feat/muxed_keys
willemneal Jan 9, 2025
fb02c33
Merge branch 'feat/muxed_keys' into feat/add_stellar_ledger
willemneal Jan 10, 2025
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
7 changes: 7 additions & 0 deletions .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@ jobs:
- run: rustup target add ${{ matrix.sys.target }}

- if: matrix.sys.target == 'aarch64-unknown-linux-gnu'
<<<<<<< HEAD
run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev libssl-dev

- if: matrix.sys.target == 'x86_64-unknown-linux-gnu'
run: sudo apt-get update && sudo apt-get -y install libudev-dev libssl-dev
=======
run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev libdbus-1-dev
>>>>>>> feat/os_keychain

- name: Setup vars
run: |
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/bindings-ts.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: bindings typescript

on:
push:
branches: [main, release/**]
pull_request:
push:
branches: [main, release/**]
pull_request:

jobs:
test:
Expand Down Expand Up @@ -38,9 +38,16 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: rustup update
<<<<<<< HEAD
- name: install libudev-dev
run: |
sudo apt install -y libudev-dev
=======
- run: sudo apt install -y libdbus-1-dev
>>>>>>> feat/os_keychain
- run: cargo build
- run: rustup target add wasm32-unknown-unknown
- run: make build-test-wasms
- run: npm ci && npm run test
working-directory: cmd/crates/soroban-spec-typescript/ts-tests

41 changes: 22 additions & 19 deletions .github/workflows/ledger-emulator.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
name: Ledger Emulator Tests

on:
push:
branches: [main, release/**]
pull_request:
push:
branches: [main, release/**]
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_protected == 'true' && github.sha || github.ref }}
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref_protected == 'true' && github.sha || github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash
run:
shell: bash

jobs:
emulator-tests:
runs-on: ubuntu-latest
env:
CI_TESTS: true
steps:
- uses: actions/checkout@v4
- uses: stellar/actions/rust-cache@main
- name: install libudev-dev
run: |
sudo apt install -y libudev-dev
- run: |
cargo test --manifest-path cmd/crates/stellar-ledger/Cargo.toml --features "emulator-tests" -- --nocapture
emulator-tests:
runs-on: ubuntu-latest
env:
CI_TESTS: true
steps:
- uses: actions/checkout@v4
- uses: stellar/actions/rust-cache@main
- name: install libudev-dev
run: |
sudo apt install -y libudev-dev
- run: |
cargo test --manifest-path cmd/crates/stellar-ledger/Cargo.toml --features "emulator-tests" -- --nocapture
- run: cargo build --features emulator-tests
- run: |
cargo test --features emulator-tests --package soroban-test --test it -- emulator
59 changes: 46 additions & 13 deletions .github/workflows/rpc-tests.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,55 @@
name: RPC Tests
on:
push:
branches: [main, release/**]
pull_request:
push:
branches: [main, release/**]
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_protected == 'true' && github.sha || github.ref }}
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref_protected == 'true' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
test:
name: test RPC
runs-on: ubuntu-22.04
services:
rpc:
image: stellar/quickstart:testing
ports:
- 8000:8000
test:
name: test RPC
runs-on: ubuntu-22.04
env:
<<<<<<< HEAD
CI_TESTS: true
services:
rpc:
image: stellar/quickstart:testing
ports:
- 8000:8000
env:
ENABLE_LOGS: true
ENABLE_SOROBAN_DIAGNOSTIC_EVENTS: true
NETWORK: local
PROTOCOL_VERSION: 22
options: >-
--health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'"
--health-interval 10s
--health-timeout 5s
--health-retries 50
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: rustup update
- run: rustup target add wasm32-unknown-unknown
- run: make build-test-wasms
- name: install libudev-dev
run: |
sudo apt install -y libudev-dev
- run: cargo build
- run: SOROBAN_PORT=8000 cargo test --features it --package soroban-test --test it -- integration
=======
ENABLE_LOGS: true
ENABLE_SOROBAN_DIAGNOSTIC_EVENTS: true
NETWORK: local
Expand All @@ -44,3 +76,4 @@ jobs:
- run: rustup target add wasm32-unknown-unknown
- run: make build-test-wasms
- run: SOROBAN_PORT=8000 cargo test --features it --package soroban-test --test it -- integration
>>>>>>> feat/os_keychain
4 changes: 4 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ jobs:
- uses: actions/checkout@v4
- uses: stellar/actions/rust-cache@main
- run: rustup update
<<<<<<< HEAD
- run: sudo apt install -y libudev-dev
=======
- run: sudo apt install -y libdbus-1-dev
>>>>>>> feat/os_keychain
- run: make generate-full-help-doc
- run: git add -N . && git diff HEAD --exit-code

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ test_snapshots
.idea
local.sh
.stellar
.zed
21 changes: 11 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ version = "=22.0.4"
package = "stellar-rpc-client"
version = "=22.0.0"

[workspace.dependencies.stellar-ledger]
version = "=22.2.0"
path = "cmd/crates/stellar-ledger"

# Dependencies from elsewhere shared by crates:
[workspace.dependencies]
stellar-strkey = "0.0.11"
Expand Down Expand Up @@ -104,7 +108,9 @@ walkdir = "2.5.0"
toml_edit = "0.22.20"
toml = "0.8.19"
reqwest = "0.12.7"
# testing
predicates = "3.1.2"
testcontainers = { version = "0.20.1" }
httpmock = "0.7.0"

[profile.test-wasms]
Expand Down
Loading
Loading