-
Notifications
You must be signed in to change notification settings - Fork 6
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
Subintent hash at device side #75
base: develop
Are you sure you want to change the base?
Conversation
…es correctly, but final hash is still incorrect; only one test vector)
…f process on all devices)
# Conflicts: # doc/api.md # src/command.rs # src/handler.rs # src/handler/dispatcher.rs # src/handler/sign_preauth_hash_ed25519.rs # src/sign/instruction_processor.rs # src/sign/sign_mode.rs # src/sign/signing_flow_state.rs # src/sign/tx_state.rs # src/xui/introductory_screen.rs
…hash-at-device-side # Conflicts: # doc/api.md # src/command.rs
…t-hash-at-device-side # Conflicts: # Cargo.lock # Cargo.toml # sbor/src/digest/hash_calculator.rs # src/command.rs # src/handler/dispatcher.rs
Update README with section about sideloading
…feature/subintent-hash-at-device-side # Conflicts: # sbor/src/digest/hash_calculator.rs # src/command.rs # src/handler/dispatcher.rs # src/sign/instruction_processor.rs # src/utilities.rs
…-side' into feature/subintent-hash-at-device-side
# Conflicts: # Cargo.lock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many docs are still broken
sbor/src/math/precise_decimal.rs
Outdated
@@ -6,6 +6,7 @@ use crate::static_vec::StaticVec; | |||
#[derive(Copy, Clone)] | |||
pub struct PreciseDecimal(BigInt<256>); | |||
|
|||
/// Ledger app-specific counterpart of the Scrypto PreciseDecimal type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
incorrectly place doc, should go on top of derive on top of PreciseDecimal
sbor/src/math/decimal.rs
Outdated
@@ -6,6 +6,7 @@ use crate::static_vec::StaticVec; | |||
#[derive(Copy, Clone, Debug)] | |||
pub struct Decimal(BigInt<192>); | |||
|
|||
/// Ledger app-specific counterpart of the Scrypto Decimal type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
incorrectly place doc, should go on top of derive on top of Decimal
sbor/src/instruction_extractor.rs
Outdated
@@ -1,5 +1,7 @@ | |||
// Process events received from decoder and extract data related to instructions | |||
|
|||
/// Process events received from SBOR decoder and extract data related to each instruction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
incorrect doc, if this doc is for this file, then you should use //!
, or put docs on top of types.
@@ -1,4 +1,4 @@ | |||
// Instructions recognized by instruction extractor | |||
/// Instructions recognized by instruction extractor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
incorrect doc, there is an empty space between this doc and the type enum Instruction
, the doc must go on top of #[repr()u8]
, without newline between. And every line in the doc must be ///
sbor/src/print/state.rs
Outdated
@@ -57,11 +60,11 @@ pub const TITLE_SIZE: usize = 32; | |||
pub struct ParameterPrinterState<T: Copy> { | |||
pub display: StaticVec<u8, { DISPLAY_SIZE }>, | |||
pub data: StaticVec<u8, { PARAMETER_AREA_SIZE }>, | |||
pub title: StaticVec<u8, { TITLE_SIZE }>, | |||
pub title: StaticVec<u8, { TITLE_SIZE }>, // Intermediate buffer for formatting instruction titles (instruction number) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs must go op top of field, or are you "waiting" with that until last minute? just dont forget :)
/// information about fees. | ||
/// Implementation consists of two independent state machines - one for detecting the intent type and | ||
/// other to collect fee information. Both of them use information about decoded instructions | ||
/// received from `InstructionExtractor`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
incorrect doc, either use //!
for documenting the whole file, or attach the doc to some specific type.
pub dst_address: Address, | ||
pub res_address: Address, | ||
pub amount: Decimal, | ||
pub src_address: Address, // From ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't forget to fix doc for fields...
sbor/src/sbor_decoder.rs
Outdated
@@ -1,22 +1,21 @@ | |||
// SBOR decoder | |||
/// Streaming decoder for SBOR format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//!
simple-bigint/src/bcd.rs
Outdated
// https://en.wikipedia.org/wiki/Double_dabble | ||
/// Implementation of the simple BCD convertor/accumulator | ||
/// Algorithm is a quite straightforward implementation of the double-dabble algorithm. | ||
/// https://en.wikipedia.org/wiki/Double_dabble | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove newline in doc, must be ///
otherwise doc is broken.
…p application version
…ring blind signing if it is disabled
Update Readme with missing setup commands
Implement calculation of the subintent pre-auth hash calculation on device.