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] Using scarb get_block to generate test blocks #52

Closed
wants to merge 8 commits into from

Conversation

TAdev0
Copy link
Collaborator

@TAdev0 TAdev0 commented Aug 10, 2024

Includes:

  • block containing pizza tx
  • all 4 halving blocks
  • segwit soft fork
  • taproot soft fork
  • Bitcoin Cash hard fork
  • Bitcoin Gold hard fork
  • Biggest block in Bitcoin history (Taproot Wizard)

Block 0 and Block of first p2p tx to Hal Finney were already added, now we have 13 blocks.

@maciejka if you have any idea of other blocks I could add

I removed the // TODO: implement in the block_filter.jq file so that it doesnt appear in all the TxIn of Transactions contained in generated blocks.

@TAdev0 TAdev0 requested review from m-kus and maciejka as code owners August 10, 2024 11:34
Copy link

vercel bot commented Aug 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
raito ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 10, 2024 0:23am

@TAdev0 TAdev0 changed the title [feat] Using scarb get_block generate test blocks [feat] Using scarb get_block to generate test blocks Aug 10, 2024
@TAdev0
Copy link
Collaborator Author

TAdev0 commented Aug 12, 2024

@maciejka I guess we should wait for a correct script before merging this, so that all blocks after segwit contain correct is_segwit flag + witness field (and pre segwit block should also generate a witness field, but empty, to match our Transaction struct

Copy link
Collaborator

@maciejka maciejka left a comment

Choose a reason for hiding this comment

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

Wow, these files are huge. How compiler behaves? I am not sure what will happen to tests execution time if we include all of them.

@@ -5,7 +5,7 @@ def txin_coinbase:
previous_output: OutPoint {
txid: 0_u256,
vout: 0xffffffff_u32,
txo_index: 0, // TODO: implement
Copy link
Collaborator

Choose a reason for hiding this comment

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

The point of the comment was to make it clear that it is not fully implemented.

tests/blocks/block_170.cairo Show resolved Hide resolved
@maciejka
Copy link
Collaborator

@maciejka I guess we should wait for a correct script before merging this, so that all blocks after segwit contain correct is_segwit flag + witness field (and pre segwit block should also generate a witness field, but empty, to match our Transaction struct

It is ok to merge work in progress. We will regenerate if necessary.

@TAdev0
Copy link
Collaborator Author

TAdev0 commented Aug 12, 2024

@maciejka dont know for the compile for now, repo was not correctly structured regarding Tests modules (no lib.cairo file in it) hence was not detected when building.

If thats ok for you i'll close this PR, and open a new one.

@TAdev0 TAdev0 closed this Aug 12, 2024
@TAdev0 TAdev0 deleted the test_blocks branch August 13, 2024 15:06
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