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

Compute hash on the fly when parsing Tx #47

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
41 changes: 25 additions & 16 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion bench.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/zsh

start=$(($(gdate +%s%0N)/1000000))
ledgercomm-send --hid file test/poseidon_single.apdu
ledgercomm-send --hid file "$1"
end=$(($(gdate +%s%0N)/1000000))
elapsed=$((end-start))
echo "Elapsed time: $elapsed ms"
35 changes: 35 additions & 0 deletions samples/apdu/tx_misc_multicalls.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
=> 5a0300001880000a55c741e9c9c47a6028800000008000000000000000
=> 5a030100e007e00d496e324876bbc8531f2d9a82bf154d1a04a50218ee74cdd372f75a551a000000000000000000000000000000000000000000000000000000000000000000004c315f47415300000000000000000000000000000000000000000000000000004c325f47415300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000534e5f4d41494e00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000
=> 5a03020000
=> 5a03030000
=> 5a03040020000000000000000000000000000000000000000000000000000000000000000c
=> 5a03050080049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc702f0b3c5710379609eb5495f1ecd348cb28167711b73609fe565a7273455035407e00d496e324876bbc8531f2d9a82bf154d1a04a50218ee74cdd372f75a551a00000000000000000000000000000000000000000000000000000000000003e8
=> 5a03050200
=> 5a030500e00783e6b26807e9906b084b07cc2fcbb74ab1aec1621b3c7bd7b985c201ff32e503ea6b1ca57f3bc93e68f42ca0d2524dcfa8e6bd2480bfbc7052cbf3461f73af04c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa0507e70531745013da7d69b4f4a6f805466edb120d2a75241b462b2a575b2e5c85049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc700000000000000000000000000000000000000000000000000018e2a9835344b
=> 5a0305014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
=> 5a03050200
=> 5a030500a0049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc70219209e083275171774dab1df80982e9df2096516f06319c5c6d71ae0a8480c01114c7103e12c2b2ecbd3a2472ba9c48ddcbf702b1c242dd570057e26212111000000000000000000000000000000000000000000000000002386f26fc100000000000000000000000000000000000000000000000000000000000000000000
=> 5a03050200
=> 5a030500e001114c7103e12c2b2ecbd3a2472ba9c48ddcbf702b1c242dd570057e26212111015543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b29071273c5c5780b4be42d9e6567b1b1a6934f43ab8abaf975c0c3da219fc4d0400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
=> 5a030501400000000000000000000000000000000000000000000330054e958d20f2d04e7b0000000000000000000000000000000000000000000000000000000000000000
=> 5a03050200
=> 5a03050080049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc702f0b3c5710379609eb5495f1ecd348cb28167711b73609fe565a7273455035407e00d496e324876bbc8531f2d9a82bf154d1a04a50218ee74cdd372f75a551a00000000000000000000000000000000000000000000000000000000000003e8
=> 5a03050200
=> 5a030500e00783e6b26807e9906b084b07cc2fcbb74ab1aec1621b3c7bd7b985c201ff32e503ea6b1ca57f3bc93e68f42ca0d2524dcfa8e6bd2480bfbc7052cbf3461f73af04c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa0507e70531745013da7d69b4f4a6f805466edb120d2a75241b462b2a575b2e5c85049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc700000000000000000000000000000000000000000000000000018e2a9835344b
=> 5a0305014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
=> 5a03050200
=> 5a03050080049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc702f0b3c5710379609eb5495f1ecd348cb28167711b73609fe565a7273455035407e00d496e324876bbc8531f2d9a82bf154d1a04a50218ee74cdd372f75a551a00000000000000000000000000000000000000000000000000000000000003e8
=> 5a03050200
=> 5a030500e00783e6b26807e9906b084b07cc2fcbb74ab1aec1621b3c7bd7b985c201ff32e503ea6b1ca57f3bc93e68f42ca0d2524dcfa8e6bd2480bfbc7052cbf3461f73af04c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa0507e70531745013da7d69b4f4a6f805466edb120d2a75241b462b2a575b2e5c85049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc700000000000000000000000000000000000000000000000000018e2a9835344b
=> 5a0305014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
=> 5a03050200
=> 5a030500a0049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc70219209e083275171774dab1df80982e9df2096516f06319c5c6d71ae0a8480c01114c7103e12c2b2ecbd3a2472ba9c48ddcbf702b1c242dd570057e26212111000000000000000000000000000000000000000000000000002386f26fc100000000000000000000000000000000000000000000000000000000000000000000
=> 5a03050200
=> 5a030500e001114c7103e12c2b2ecbd3a2472ba9c48ddcbf702b1c242dd570057e26212111015543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b29071273c5c5780b4be42d9e6567b1b1a6934f43ab8abaf975c0c3da219fc4d0400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
=> 5a030501400000000000000000000000000000000000000000000330054e958d20f2d04e7b0000000000000000000000000000000000000000000000000000000000000000
=> 5a03050200
=> 5a03050080049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc702f0b3c5710379609eb5495f1ecd348cb28167711b73609fe565a7273455035407e00d496e324876bbc8531f2d9a82bf154d1a04a50218ee74cdd372f75a551a00000000000000000000000000000000000000000000000000000000000003e8
=> 5a03050200
=> 5a030500e00783e6b26807e9906b084b07cc2fcbb74ab1aec1621b3c7bd7b985c201ff32e503ea6b1ca57f3bc93e68f42ca0d2524dcfa8e6bd2480bfbc7052cbf3461f73af04c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa0507e70531745013da7d69b4f4a6f805466edb120d2a75241b462b2a575b2e5c85049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc700000000000000000000000000000000000000000000000000018e2a9835344b
=> 5a0305014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
=> 5a03050200
Loading
Loading