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

Zip32 support #99

Merged
merged 6 commits into from
Dec 23, 2024
Merged

Zip32 support #99

merged 6 commits into from
Dec 23, 2024

Conversation

chcmedeiros
Copy link
Collaborator

No description provided.

chcmedeiros and others added 6 commits October 29, 2024 14:50
* update deps

* add zip32 hdpath support

* add zip32 rust support

* support new zip32 key computation

* remove old tests

* improvements on hdpath

* update snapshots

* update rslib

* update js to temporary zip32 branch

* fix cpp_tests

* improve error propagation

* cleaning comments

* update snapshots
* fix overwrite issue

* update tests and snapshots

* add extra condition for signing

* reset indice context offset

* allow output dummy notes

* remove this check as it can happens in different sessions

* return payment address

* update rs lib

* update tests

* update deps

* update snapshots

* print self for change address

* update js

* update rs lib

* update snapshots

* size fixes

* improve cargo

* improve cargo for cpp_test feature

* small fixes
@emmanuelm41 emmanuelm41 merged commit cfa82bc into main Dec 23, 2024
44 checks passed
@emmanuelm41 emmanuelm41 deleted the dev branch December 23, 2024 13:55
) -> ParserError {
let skfr = Fr::from_bytes(ask);
if skfr.is_none().into() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

why the .is_none().into()?

is_none() returns true or false

sbar: &mut [u8; 32],
) -> ParserError {
let s_point = Fr::from_bytes(s);
if s_point.is_none().into() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here, the is_none().into()
maybe i am missing something and is_none() here does not return a boolean, because it is not a core::Option type?

#include <inttypes.h>
#include <stddef.h>

#if defined(TARGET_NANOS) || defined(TARGET_NANOX) || \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a flag called LEDGER_SPECIFIC?
that can be used instead?

Copy link
Collaborator

Choose a reason for hiding this comment

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

i see it is used in crypto.c ??

return fpuint64_to_str(out, outLen, value, decimals);
}

void check_canary() {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe it is better to put the CHECK_CANARY () macro call?
to avoid false negatives if this function is called from rust?

@@ -0,0 +1 @@
{"rustc_fingerprint":14087533095851965129,"outputs":{"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/carlosmedeiros/.rustup/toolchains/stable-aarch64-apple-darwin\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"aarch64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"aes\"\ntarget_feature=\"crc\"\ntarget_feature=\"dit\"\ntarget_feature=\"dotprod\"\ntarget_feature=\"dpb\"\ntarget_feature=\"dpb2\"\ntarget_feature=\"fcma\"\ntarget_feature=\"fhm\"\ntarget_feature=\"flagm\"\ntarget_feature=\"fp16\"\ntarget_feature=\"frintts\"\ntarget_feature=\"jsconv\"\ntarget_feature=\"lor\"\ntarget_feature=\"lse\"\ntarget_feature=\"neon\"\ntarget_feature=\"paca\"\ntarget_feature=\"pacg\"\ntarget_feature=\"pan\"\ntarget_feature=\"pmuv3\"\ntarget_feature=\"ras\"\ntarget_feature=\"rcpc\"\ntarget_feature=\"rcpc2\"\ntarget_feature=\"rdm\"\ntarget_feature=\"sb\"\ntarget_feature=\"sha2\"\ntarget_feature=\"sha3\"\ntarget_feature=\"ssbs\"\ntarget_feature=\"vh\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"apple\"\nunix\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.72.1 (d5c2e9c34 2023-09-13)\nbinary: rustc\ncommit-hash: d5c2e9c342b358556da91d61ed4133f6f50fc0c3\ncommit-date: 2023-09-13\nhost: aarch64-apple-darwin\nrelease: 1.72.1\nLLVM version: 16.0.5\n","stderr":""}},"successes":{}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we really need this file? well it seems important for macOS

@@ -0,0 +1,3 @@
Signature: 8a477f597d28d172789f06886806bc55
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe we do not need this?

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

Successfully merging this pull request may close these issues.

3 participants