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

Light client test merge #895

Merged
merged 135 commits into from
Dec 22, 2023
Merged

Light client test merge #895

merged 135 commits into from
Dec 22, 2023

Conversation

sveitser
Copy link
Collaborator

No description provided.

jbearer and others added 30 commits November 30, 2023 09:55
The new trait encapsulates
* Data source creation from command line options
* Looking up timestamp windows

It is currently implemented for FileSystemDataSource, but having
this trait will make it easy to incoporate the new SqlDataSource:
just implement the same trait.
api.rs has been very hard to work with, because almost all of the
logic, from initialization to endpoint handling, was in a single
massive, deeply nested function. Now there are smaller, less nested
modules separately handling initialization, endpoints, and state
updates. This should make it much easier to read, modify, and
extend the code.
* add from_bytes, rename build -> from_txs

* add test infra for bad blocks

* add tx table proofs

* check tx table proofs in basic_correctness test

* tidy

* support zero-length txs

* flag new TODOs with TODO(795)

* tweak comments

* address https://github.com/EspressoSystems/espresso-sequencer/pull/796/files#r1414786947

* cache tx table len proof (whew)

* add TxInclusionProof::verify() as per #796 (comment)

* TxInclusionProof::tx_table_range_proof should always be a SINGLE RangeProof

* as per #796 (comment) add tx_table_len, tx_table_range_[start|end] to TxInclusionProof, remove 4 args from TxInclusionProof::verify()

* tidy
…ons (#791)

---------

Co-authored-by: Alex Xiong <alex.xiong.tech@gmail.com>
Nothing is building yet but the basic structure of the header and
payload should be evident
philippecamacho and others added 13 commits December 21, 2023 12:45
…e up. (#883)

Ensure the anvil endpoints are up in `AnvilOptions::spawn`.
…that we can increase if we succeed

Signed-off-by: nomaxg <noahgolub2@gmail.com>
Signed-off-by: nomaxg <noahgolub2@gmail.com>
Reduce max_blocks in the commit task if we exceed the block gas limit
Add a tool to reset persistent storage
* add test for correctness of block.iter()

* add test for expected number of txs in a block

* refactor test

* tidy test

* add failing test case, more test tidying

* test pass but watch out for overflow

* add test with huge tx table len

* accommodate extremely small payloads

* test infra allow larger payload, not just truncated payload

* begin refactoring test code

* tidy test

* tidy tests

* add TODO(817) comments

* add test for malicious tx inclusion proof

* NamespaceTable stub

* WIP: add namespace table to payload, need to update tests

* fix test

* WIP rework basic_correctness test for multiple namespaces

* WIP fixing bugs

* WIP begin tidying tests

* tidy tests

* tidy

* be less stupid as per #891 (comment)
Contract tests are still failing

    Failing tests:
    Encountered 4 failing tests in contracts/test/BLSSig.t.sol:BLSSig_Test
    [FAIL. Reason: EvmError: Revert; counterexample: calldata=0xe1dc7d9400000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000 args=[0x]] testFuzz_BLS_hashes_computation(bytes) (runs: 0, μ: 0, ~: 0)
    [FAIL. Reason: EvmError: Revert] test_RevertWhen_SignatureIsInvalid() (gas: 6949)
    [FAIL. Reason: EvmError: Revert] test_RevertWhen_usingWrongVK() (gas: 6860)
    [FAIL. Reason: EvmError: Revert] test_SigVerification_Succeeds() (gas: 6795)

    Encountered 1 failing test in contracts/test/StakeTable.t.sol:StakeTable_Test
    [FAIL. Reason: setup failed: custom error a1ba07ee:] setUp() (gas:
    0)

On issue is that the LightClientState constructor does not allow zero
commitments anymore. The test setUp function calls the constructor with
zeroes.

Not sure why the BLS tests are failing.
Copy link
Contributor

@alxiong alxiong left a comment

Choose a reason for hiding this comment

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

Thank you so much @sveitser !
I'll fix the CI failure in my PR.

@philippecamacho
Copy link
Contributor

just sol-test fails on my machine.

@alxiong alxiong merged commit 353e998 into lc-test Dec 22, 2023
8 of 9 checks passed
@alxiong alxiong deleted the lc-test-merge branch December 22, 2023 14:17
@sveitser
Copy link
Collaborator Author

just sol-test fails on my machine.

Yes as written on the other PR and in the commit message there are some failures.

alxiong added a commit that referenced this pull request Dec 22, 2023
@sveitser sveitser restored the lc-test-merge branch December 22, 2023 14:25
@alxiong alxiong deleted the lc-test-merge branch December 22, 2023 14:28
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.

7 participants