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/l1 headers test #3

Merged
merged 15 commits into from
Jun 3, 2024
Merged

Conversation

sqrlfirst
Copy link
Contributor

No description provided.

@ametel01
Copy link
Collaborator

ametel01 commented May 23, 2024

Pull the last changes i pushed and upgrade starknet-foundry to 0.24.0. for receive_from_l1_success_test you need to use start_cheat_caller_address snforge cheatcode to set the caller address to proxy contract.

Some tips:

  • if you are processing BLOCK_0 in the testdata::blocks who's number is 11456152 you need first to to store the block parent hash using receive_from_l1 for it's child, which is block 11456152 + 1, then you can call process_block for BLOCK_0
  • your get_rlp helper function is wrong, you should return Array<u64> instead of WordsSequence and use the python notebook and do
block = mocked_blocks[0]
block_header = build_block_header(block)
Data.from_bytes(block_header.raw_rlp()).to_ints()

to retrieve the correct rlp encoding and len of the decoded block

@ametel01
Copy link
Collaborator

@sqrlfirst i pushed an example of test for headers store, hope this will help you

@sqrlfirst sqrlfirst marked this pull request as ready for review May 29, 2024 12:10
@ametel01
Copy link
Collaborator

Starting to look good, resolve the merge confilcts, i've pushed some fixes to extract_data and from_words64 and now the beneficiary decoding should work (the beneficiary should be the same as 'miner' in the mock blocks)

@ametel01
Copy link
Collaborator

ametel01 commented Jun 3, 2024

Looks good Thanks!

@ametel01 ametel01 merged commit a908c4e into OilerNetwork:main Jun 3, 2024
2 checks passed
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.

2 participants