Skip to content

chore: regenerate test vectors against leanSpec main and fix fork-choice harness - #120

Open
SoarinSkySagar wants to merge 4 commits into
grandinetech:devnet-5from
SoarinSkySagar:test-vectors-update
Open

chore: regenerate test vectors against leanSpec main and fix fork-choice harness#120
SoarinSkySagar wants to merge 4 commits into
grandinetech:devnet-5from
SoarinSkySagar:test-vectors-update

Conversation

@SoarinSkySagar

Copy link
Copy Markdown

used make generate-test-vectors LEAN_SPEC_COMMIT=0f5b8e58e58c0e155ae8b95eabbbde0b9ad8840a to download the latest leanSpec tests and fixed the harness for fork_choice, the previous test suite had fc in the directory but new suite has fork_choice, so had to to change it.

@ArtiomTr ArtiomTr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Everything looks good, only minor nitpicks need to be fixed

Comment thread lean_client/spec_test_fixtures/src/common.rs Outdated
Comment thread lean_client/Makefile Outdated
Comment thread lean_client/spec_test_fixtures/src/fork_choice.rs Outdated
Comment thread lean_client/fork_choice/tests/fork_choice_test_vectors.rs Outdated
@SoarinSkySagar

Copy link
Copy Markdown
Author

@ArtiomTr all required changes done!

@SoarinSkySagar
SoarinSkySagar requested a review from ArtiomTr July 29, 2026 14:20

@ArtiomTr ArtiomTr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nice 👍

@ArtiomTr

Copy link
Copy Markdown
Collaborator

looks like client build fails? something with http_api test driver:

error[E0609]: no field `proof_data` on type `GossipProofJSON`
   --> http_api/src/test_driver.rs:463:32
    |
463 |     let proof_hex = step.proof.proof_data.data.trim_start_matches("0x");
    |                                ^^^^^^^^^^ unknown field
    |

@SoarinSkySagar

SoarinSkySagar commented Jul 29, 2026

Copy link
Copy Markdown
Author

looks like client build fails? something with http_api test driver:

error[E0609]: no field `proof_data` on type `GossipProofJSON`
   --> http_api/src/test_driver.rs:463:32
    |
463 |     let proof_hex = step.proof.proof_data.data.trim_start_matches("0x");
    |                                ^^^^^^^^^^ unknown field
    |

yeah sorry about that, I forgot to check build before committing. should be fine now.

@SoarinSkySagar
SoarinSkySagar requested a review from ArtiomTr July 29, 2026 20:24
@Sahilgill24

Copy link
Copy Markdown

hey @ArtiomTr @SoarinSkySagar , I was just in general looking through this and is there a reason why you guys are directly adding the JSON fixtures to the repository.
I think using the leanspec fixtures release in the Makefile and then downloading it on the local for testing would be better than adding the fixtures directly to the repo and then changing them again and again based on the fixture changes.
I have written a small review for the make file that would perform this task.

@Sahilgill24 Sahilgill24 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

something like this and now the fixtures are in the local and test's can be run on it, I believe all the other lean clients follow this only.

LEAN_SPEC_FIXTURES_URL ?= https://github.com/leanEthereum/leanSpec/releases/latest/download/fixtures-prod-scheme.tar.gz

fixtures-temp:
	tmpdir=$$(mktemp -d); \
	echo "Extracting fixtures to $$tmpdir"; \
	curl -L -f "$(LEAN_SPEC_FIXTURES_URL)" | tar -xz -C "$$tmpdir"; \
	echo "Fixtures available at: $$tmpdir"

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.

3 participants