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 32 commits into
base: main
Choose a base branch
from
Open

Conversation

willemneal
Copy link
Member

What

replaces #1415

Why

[TODO: Why this change is being made. Include any context required to understand the why.]

Known limitations

[TODO or N/A]

@willemneal willemneal changed the title feat: initial ledger signer Feat: add stellar ledger as signer Sep 25, 2024
@willemneal
Copy link
Member Author

@leighmcculloch Moved here

@willemneal willemneal marked this pull request as ready for review November 14, 2024 18:41
@willemneal willemneal marked this pull request as draft November 14, 2024 18:42
@willemneal willemneal force-pushed the feat/add_stellar_ledger branch from 2b7c74a to 0aaf7c5 Compare November 18, 2024 18:18
@willemneal willemneal marked this pull request as ready for review November 19, 2024 20:51
@willemneal willemneal self-assigned this Nov 19, 2024
Copy link
Contributor

@elizabethengelman elizabethengelman left a comment

Choose a reason for hiding this comment

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

This is looking great! 🎉 🎉 A couple of questions, but mostly just for my own understanding.

@@ -0,0 +1,7 @@
pub mod http_transport;
Copy link
Contributor

Choose a reason for hiding this comment

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

should http_transport be under the emulator-tests feature flag too?

Copy link
Member Author

Choose a reason for hiding this comment

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

I meant to add a http-transport feature. above it because some unit tests still needed it.

}

#[derive(Debug, Clone, Eq, PartialEq)]
pub enum DeviceModel {
Copy link
Contributor

Choose a reason for hiding this comment

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

👏 love this refactor

@@ -394,23 +394,61 @@ impl Cmd {
.ok_or(Error::ArchiveUrlNotConfigured)
}

fn resolve_address(
#[allow(dead_code)]
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to include resolve_address here if it's not being used?


// Resolve an account address to an account id. The address can be a
// G-address or a key name (as in `stellar keys address NAME`).
#[allow(dead_code)]
Copy link
Contributor

Choose a reason for hiding this comment

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

same here - do we need to keep this in here if it's dead code??


use crate::integration::util::{deploy_contract, DeployKind, HELLO_WORLD};

// #[test_case("nanos"; "when the device is NanoS")]
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we can uncomment these other device model test cases

Copy link
Member Author

Choose a reason for hiding this comment

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

I was running into issues around the server locally. Since all the accounts share the same seed phrase it was acting as one account. I also tried updating the testcase to add an hd-path, but it was causes issues. So I just wanted one to work on CI and then was going to return to it.

cmd/crates/soroban-test/tests/it/integration/emulator.rs Outdated Show resolved Hide resolved
cmd/crates/soroban-test/tests/it/integration/emulator.rs Outdated Show resolved Hide resolved
}
}

impl std::str::FromStr for KeyName {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that it makes sense not to allow for key names to be "ledger*", but I'm wondering how we can add a ledger identity via the cli - is this possible? If not, i think we want to revise the doc comment in cmd/soroban-cli/src/commands/keys/mod.rs for Add.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Review
Development

Successfully merging this pull request may close these issues.

[Epic] Implement more robust signing, which includes ledger, and lab
2 participants