Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Commit

Permalink
Add tests for RLP (#470)
Browse files Browse the repository at this point in the history
Time spent on this PR: 3 days

## Pull request type

Please check the type of change your PR introduces:

- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):

## What is the current behavior?


Resolves #

## What is the new behavior?

<!-- Please describe the behavior or changes that are being added by
this PR. -->

-
-
-

## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Co-authored-by: Clément Walter <[email protected]>
  • Loading branch information
Flydexo and ClementWalter authored Jan 28, 2023
1 parent 9ca295d commit b56be88
Show file tree
Hide file tree
Showing 15 changed files with 2,144 additions and 1,918 deletions.
Binary file modified docs/callgraphs/account_registry.gv.pdf
Binary file not shown.
Binary file modified docs/callgraphs/blockhash_registry.gv.pdf
Binary file not shown.
Binary file modified docs/callgraphs/contract_account.gv.pdf
Binary file not shown.
184 changes: 95 additions & 89 deletions docs/callgraphs/externally_owned_account.gv
Original file line number Diff line number Diff line change
Expand Up @@ -71,38 +71,40 @@ digraph externally_owned_account {
2762 [label="starkware.cairo.common.cairo_secp.signature.verify_eth_signature_uint256" color="" fillcolor=lightcoral shape=oval style=filled]
2794 [label="utils.utils.Helpers.bytes32_to_uint256" color="" fillcolor=lightcoral shape=oval style=filled]
2917 [label="utils.utils.Helpers.fill_array" color="" fillcolor=lightcoral shape=oval style=filled]
2931 [label="utils.utils.Helpers.bytes_to_bytes8_little_endian" color="" fillcolor=lightcoral shape=oval style=filled]
3025 [label="utils.utils.Helpers.felt_to_bytes" color="" fillcolor=lightcoral shape=oval style=filled]
3054 [label="utils.utils.Helpers.bytes_to_felt" color="" fillcolor=lightcoral shape=oval style=filled]
3079 [label="utils.rlp.RLP.decode_rlp" color="" fillcolor=lightcoral shape=oval style=filled]
3286 [label="utils.rlp.RLP.encode_rlp_list" color="" fillcolor=lightcoral shape=oval style=filled]
3348 [label="kakarot.accounts.eoa.aa.library.ExternallyOwnedAccount.validate" color="" fillcolor=lightcoral shape=oval style=filled]
3385 [label="kakarot.accounts.eoa.aa.library.ExternallyOwnedAccount.is_valid_eth_tx" color="" fillcolor=lightcoral shape=oval style=filled]
3525 [label="kakarot.accounts.eoa.aa.library.ExternallyOwnedAccount.is_valid_eth_signature" color="" fillcolor=lightcoral shape=oval style=filled]
3556 [label="kakarot.accounts.eoa.aa.library.ExternallyOwnedAccount.is_valid_signature" color="" fillcolor=lightcoral shape=oval style=filled]
3573 [label="__main__.eth_address.addr" color="" fillcolor=white shape=oval style=solid]
3578 [label="__main__.eth_address.read" color="" fillcolor=white shape=oval style=solid]
3591 [label="__main__.eth_address.write" color="" fillcolor=white shape=oval style=solid]
3603 [label="__main__.kakarot_address.addr" color="" fillcolor=white shape=oval style=solid]
3608 [label="__main__.kakarot_address.write" color="" fillcolor=white shape=oval style=solid]
3620 [label="__main__.constructor\l['constructor']" color="" fillcolor=violet shape=oval style=filled]
3634 [label="__wrappers__.constructor\l['constructor']" color="" fillcolor=violet shape=doubleoctagon style=filled]
3655 [label="__main__.__validate__\l['external']" color="" fillcolor=lightgreen shape=oval style=filled]
3674 [label="__wrappers__.__validate__\l['external']" color="" fillcolor=lightgreen shape=doubleoctagon style=filled]
3716 [label="__main__.__validate_declare__\l['external']" color="" fillcolor=lightgreen shape=oval style=filled]
3725 [label="__wrappers__.__validate_declare__\l['external']" color="" fillcolor=lightgreen shape=doubleoctagon style=filled]
3746 [label="__main__.__execute__\l['external']" color="" fillcolor=lightgreen shape=oval style=filled]
3757 [label="__wrappers__.__execute___encode_return" color="" fillcolor=white shape=oval style=solid]
3776 [label="__wrappers__.__execute__\l['external']" color="" fillcolor=lightgreen shape=doubleoctagon style=filled]
3825 [label="__main__.get_eth_address\l['view']" color="" fillcolor=orange shape=oval style=filled]
3831 [label="__wrappers__.get_eth_address_encode_return" color="" fillcolor=white shape=oval style=solid]
3840 [label="__wrappers__.get_eth_address\l['view']" color="" fillcolor=orange shape=doubleoctagon style=filled]
3857 [label="__main__.supports_interface\l['view']" color="" fillcolor=orange shape=oval style=filled]
3873 [label="__wrappers__.supports_interface_encode_return" color="" fillcolor=white shape=oval style=solid]
3882 [label="__wrappers__.supports_interface\l['view']" color="" fillcolor=orange shape=doubleoctagon style=filled]
3902 [label="__main__.is_valid_signature\l['view']" color="" fillcolor=orange shape=oval style=filled]
3921 [label="__wrappers__.is_valid_signature_encode_return" color="" fillcolor=white shape=oval style=solid]
3930 [label="__wrappers__.is_valid_signature\l['view']" color="" fillcolor=orange shape=doubleoctagon style=filled]
2931 [label="utils.utils.Helpers.reverse" color="" fillcolor=lightcoral shape=oval style=filled]
2949 [label="utils.utils.Helpers.bytes_to_bytes8_little_endian" color="" fillcolor=lightcoral shape=oval style=filled]
3043 [label="utils.utils.Helpers.felt_to_bytes_little" color="" fillcolor=lightcoral shape=oval style=filled]
3072 [label="utils.utils.Helpers.felt_to_bytes" color="" fillcolor=lightcoral shape=oval style=filled]
3094 [label="utils.utils.Helpers.bytes_to_felt" color="" fillcolor=lightcoral shape=oval style=filled]
3117 [label="utils.rlp.RLP.decode" color="" fillcolor=lightcoral shape=oval style=filled]
3307 [label="utils.rlp.RLP.encode_list" color="" fillcolor=lightcoral shape=oval style=filled]
3370 [label="kakarot.accounts.eoa.aa.library.ExternallyOwnedAccount.validate" color="" fillcolor=lightcoral shape=oval style=filled]
3407 [label="kakarot.accounts.eoa.aa.library.ExternallyOwnedAccount.is_valid_eth_tx" color="" fillcolor=lightcoral shape=oval style=filled]
3547 [label="kakarot.accounts.eoa.aa.library.ExternallyOwnedAccount.is_valid_eth_signature" color="" fillcolor=lightcoral shape=oval style=filled]
3578 [label="kakarot.accounts.eoa.aa.library.ExternallyOwnedAccount.is_valid_signature" color="" fillcolor=lightcoral shape=oval style=filled]
3595 [label="__main__.eth_address.addr" color="" fillcolor=white shape=oval style=solid]
3600 [label="__main__.eth_address.read" color="" fillcolor=white shape=oval style=solid]
3613 [label="__main__.eth_address.write" color="" fillcolor=white shape=oval style=solid]
3625 [label="__main__.kakarot_address.addr" color="" fillcolor=white shape=oval style=solid]
3630 [label="__main__.kakarot_address.write" color="" fillcolor=white shape=oval style=solid]
3642 [label="__main__.constructor\l['constructor']" color="" fillcolor=violet shape=oval style=filled]
3656 [label="__wrappers__.constructor\l['constructor']" color="" fillcolor=violet shape=doubleoctagon style=filled]
3677 [label="__main__.__validate__\l['external']" color="" fillcolor=lightgreen shape=oval style=filled]
3696 [label="__wrappers__.__validate__\l['external']" color="" fillcolor=lightgreen shape=doubleoctagon style=filled]
3738 [label="__main__.__validate_declare__\l['external']" color="" fillcolor=lightgreen shape=oval style=filled]
3747 [label="__wrappers__.__validate_declare__\l['external']" color="" fillcolor=lightgreen shape=doubleoctagon style=filled]
3768 [label="__main__.__execute__\l['external']" color="" fillcolor=lightgreen shape=oval style=filled]
3779 [label="__wrappers__.__execute___encode_return" color="" fillcolor=white shape=oval style=solid]
3798 [label="__wrappers__.__execute__\l['external']" color="" fillcolor=lightgreen shape=doubleoctagon style=filled]
3847 [label="__main__.get_eth_address\l['view']" color="" fillcolor=orange shape=oval style=filled]
3853 [label="__wrappers__.get_eth_address_encode_return" color="" fillcolor=white shape=oval style=solid]
3862 [label="__wrappers__.get_eth_address\l['view']" color="" fillcolor=orange shape=doubleoctagon style=filled]
3879 [label="__main__.supports_interface\l['view']" color="" fillcolor=orange shape=oval style=filled]
3895 [label="__wrappers__.supports_interface_encode_return" color="" fillcolor=white shape=oval style=solid]
3904 [label="__wrappers__.supports_interface\l['view']" color="" fillcolor=orange shape=doubleoctagon style=filled]
3924 [label="__main__.is_valid_signature\l['view']" color="" fillcolor=orange shape=oval style=filled]
3943 [label="__wrappers__.is_valid_signature_encode_return" color="" fillcolor=white shape=oval style=solid]
3952 [label="__wrappers__.is_valid_signature\l['view']" color="" fillcolor=orange shape=doubleoctagon style=filled]
19 -> 18
33 -> 29
38 -> 29
Expand Down Expand Up @@ -216,61 +218,65 @@ digraph externally_owned_account {
2762 -> 1751 [label=3]
2762 -> 2721
2917 -> 2917
2931 -> 185 [label=4]
2931 -> 216
2931 -> 2931 [label=2]
3025 -> 103
3025 -> 185
3025 -> 3025
3054 -> 1134
3054 -> 3054
3079 -> 185 [label=5]
3079 -> 3079 [label=5]
3079 -> 3054 [label=2]
3286 -> 185
3286 -> 0
3286 -> 3025
3286 -> 2917 [label=3]
3348 -> 3385
3348 -> 3348
3385 -> 0 [label=5]
3385 -> 3079 [label=2]
3385 -> 3286
3385 -> 2931
3385 -> 1326
3385 -> 3054
3385 -> 2794 [label=2]
3385 -> 1581
3385 -> 3525
3525 -> 0
3525 -> 2762
3525 -> 1581
3556 -> 3525
3578 -> 3573
3578 -> 125
3591 -> 3573
3591 -> 133
3608 -> 3603
3608 -> 133
3620 -> 141
3620 -> 3591
3620 -> 3608
3634 -> 3620
3655 -> 3578
3655 -> 3348
3674 -> 3655
3725 -> 3716
3746 -> 0
3757 -> 3
3776 -> 3746
3776 -> 3757
3825 -> 3578
3840 -> 3825
3840 -> 3831
3882 -> 3857
3882 -> 3873
3902 -> 3578
3902 -> 3556
3930 -> 3902
3930 -> 3921
2931 -> 2931
2949 -> 185 [label=4]
2949 -> 216
2949 -> 2949 [label=2]
3043 -> 185
3043 -> 103
3043 -> 3043
3072 -> 0
3072 -> 3043
3072 -> 2931
3094 -> 1134
3094 -> 3094
3117 -> 185 [label=4]
3117 -> 3117 [label=5]
3117 -> 3094 [label=2]
3307 -> 185
3307 -> 0
3307 -> 3072
3307 -> 2917 [label=3]
3370 -> 3407
3370 -> 3370
3407 -> 0 [label=5]
3407 -> 3117 [label=2]
3407 -> 3307
3407 -> 2949
3407 -> 1326
3407 -> 3094
3407 -> 2794 [label=2]
3407 -> 1581
3407 -> 3547
3547 -> 0
3547 -> 2762
3547 -> 1581
3578 -> 3547
3600 -> 3595
3600 -> 125
3613 -> 3595
3613 -> 133
3630 -> 3625
3630 -> 133
3642 -> 141
3642 -> 3613
3642 -> 3630
3656 -> 3642
3677 -> 3600
3677 -> 3370
3696 -> 3677
3747 -> 3738
3768 -> 0
3779 -> 3
3798 -> 3768
3798 -> 3779
3847 -> 3600
3862 -> 3847
3862 -> 3853
3904 -> 3879
3904 -> 3895
3924 -> 3600
3924 -> 3578
3952 -> 3924
3952 -> 3943
}
Binary file modified docs/callgraphs/externally_owned_account.gv.pdf
Binary file not shown.
Loading

0 comments on commit b56be88

Please sign in to comment.