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

chore: update hotshot to 0.1.60, most jf dep to 0.4.5 #1788

Merged
merged 434 commits into from
Jul 26, 2024
Merged

Conversation

alxiong
Copy link
Contributor

@alxiong alxiong commented Jul 26, 2024

To enable cross-testing with the latest jf-plonk in the work of #1739, we need to update the hotshot version, which I merge 699b0ed from main into this branch.

in this commit, we depend on hotshot: 0.1.60 which depends on jf-*: 0.4.5 (post major crate refactor on jellyfish).

I plan to squash merge into commonprefix-patch branch so that auditor can safely skip this without going through 30 commits.
(please voice out opposing view if this is a bad idea.)

jbearer and others added 30 commits May 28, 2024 16:12
The server might close an idle connection after 60s. This should not
be considered an error. Currently, though, it is causing errors, because
our caluclation of idle time is not correct. We are using time since last
read, but a read doesn't necessarily mean traffic over the connection. We
might be reading a message that was sent long ago and has been sitting in
our TCP buffer while the connection has been idle.

To more accurately gauge how long the connection has been idle, we use time
since the last _blocking_ read. Thus, we are less likely to produce an error,
and more likely to just chalk ConnectionReset errors up to a stale stream and
refresh the stream and continue.
### This PR:
* Removes env vars from the `public-env-vars.toml` file, which I forgot
to do when moving things to a genesis file
* Sorts this file alphabetically

### This PR does not:
<!-- Describe what is out of scope for this PR, if applicable. Leave
this section blank if it's not applicable -->
<!-- This section helps avoid the reviewer having to needlessly point
out missing parts -->
<!-- * Implement feature 3 because that feature is blocked by Issue 4
-->
<!-- * Implement xyz because that is tracked in issue #123. -->
<!-- * Address xzy for which I opened issue #456 -->

### Key places to review:
<!-- Describe key places for reviewers to pay close attention to -->
<!-- * file.rs, `add_integers` function -->
<!-- Or directly comment on those files/lines to make it easier for the
reviewers -->

<!-- ### How to test this PR:  -->
<!-- Optional, uncomment the above line if this is relevant to your PR
-->
<!-- If your PR is fully tested through CI there is no need to add this
section -->
<!-- * E.g. `just test` -->

<!-- ### Things tested -->
<!-- Anything that was manually tested (that is not tested in CI). -->
<!-- E.g. building/running of docker containers. Changes to docker demo,
... -->
<!-- Especially mention anything untested, with reasoning and link an
issue to resolve this. -->

<!-- Complete the following items before creating this PR -->
<!-- [ ] Issue linked or PR description mentions why this change is
necessary. -->
<!-- [ ] PR description is clear enough for reviewers. -->
<!-- [ ] Documentation for changes (additions) has been updated (added).
-->
<!-- [ ] If this is a draft it is marked as "draft".  -->

<!-- To make changes to this template edit
https://github.com/EspressoSystems/.github/blob/main/PULL_REQUEST_TEMPLATE.md
-->
This code is no longer used after #1443 (genesis file)
* Update architecture diagram
* add CDN annotations
* Add Fee Contract
* Add validated state
* Re-organize sequencer node and network
* Move DB into sequencer node
* Add Hotshot Events in Hotshot package
* Add sequence diagram, update README
* Add sequence diagram step to architecture diagram
* Address comments, add brief glossary
* Add optimistic rollup dispute to diagram
* Add optimistic rollup to architecture diagram

---------

Co-authored-by: Rob <[email protected]>
Co-authored-by: Jeb Bearer <[email protected]>
Co-authored-by: Philippe Camacho <[email protected]>
* Fix docker demo

- Set stake table capacity to 10 for mock contract.
- Log the stake table capacity on prover service startup.
- Set a lower prover interval for local demos.
- Query all logs in smoke test. By default it only queries the latest
  block.
- Add stake table capacity to public env vars
* Generate rust docs and publish

- Fix compilation by adding RUSTDOCFLAGS
- Add CI job to publish docs (modified from hotshot)
- Add a just recipe
- Update README

Close #1517

* Change doc CI job name

* Fix cross compilation dev shell

Put rust env vars into a nix attrset to avoid repeating them many times

* Set RUSTFLAGS in doc CI job
### This PR:
Adds a longer delay time when fetching the espresso balance because we
are consistently hitting the timeout in the docker demo.
* update hotshot query service to 0.1.26

* set env var to 25
jbearer and others added 17 commits July 2, 2024 11:58
Fixes timing of flawed unit test, revealed by
EspressoSystems/hotshot-builder-core#196

### This PR:
Changes a wait from 3 seconds to half a second, to avoid a timing
failure on a unit test

### This PR does not:
Do anything else of significance
* combined the prover proposal scripts

* update the instructions on the read me for creating prover proposals

* switched comparison operator from == to === so that the comparison occurs without type conversions - thus it checks equality for both type and value

* modify language in console statement

* better error handling

* declare local obj for safe transaction from sdk so that it can be forward compatible, update env variable name to clearly indicate that the proxy contract address is needed

* rearrange error handling

* readme update to reflect the the new env variable name required for the LC proxy address

* adjust invalid command check

* allow the return type to be the command const
update the CDN to `0.4.2`
Closes #<ISSUE_NUMBER>
<!-- These comments should help create a useful PR message, please
delete any remaining comments before opening the PR. -->
<!-- If there is no issue number make sure to describe clearly *why*
this PR is necessary. -->
<!-- Mention open questions, remaining TODOs, if any -->

### This PR:
<!-- Describe what this PR adds to this repo and why -->
<!-- E.g. -->
<!-- * Implements feature 1 -->
<!-- * Fixes bug 3 -->

### This PR does not:
<!-- Describe what is out of scope for this PR, if applicable. Leave
this section blank if it's not applicable -->
<!-- This section helps avoid the reviewer having to needlessly point
out missing parts -->
<!-- * Implement feature 3 because that feature is blocked by Issue 4
-->
<!-- * Implement xyz because that is tracked in issue #123. -->
<!-- * Address xzy for which I opened issue #456 -->

### Key places to review:
<!-- Describe key places for reviewers to pay close attention to -->
<!-- * file.rs, `add_integers` function -->
<!-- Or directly comment on those files/lines to make it easier for the
reviewers -->

<!-- ### How to test this PR:  -->
<!-- Optional, uncomment the above line if this is relevant to your PR
-->
<!-- If your PR is fully tested through CI there is no need to add this
section -->
<!-- * E.g. `just test` -->

<!-- ### Things tested -->
<!-- Anything that was manually tested (that is not tested in CI). -->
<!-- E.g. building/running of docker containers. Changes to docker demo,
... -->
<!-- Especially mention anything untested, with reasoning and link an
issue to resolve this. -->

<!-- Complete the following items before creating this PR -->
<!-- [ ] Issue linked or PR description mentions why this change is
necessary. -->
<!-- [ ] PR description is clear enough for reviewers. -->
<!-- [ ] Documentation for changes (additions) has been updated (added).
-->
<!-- [ ] If this is a draft it is marked as "draft".  -->

<!-- To make changes to this template edit
https://github.com/EspressoSystems/.github/blob/main/PULL_REQUEST_TEMPLATE.md
-->
Closes #<ISSUE_NUMBER>
<!-- These comments should help create a useful PR message, please
delete any remaining comments before opening the PR. -->
<!-- If there is no issue number make sure to describe clearly *why*
this PR is necessary. -->
<!-- Mention open questions, remaining TODOs, if any -->

### This PR:
<!-- Describe what this PR adds to this repo and why -->
<!-- E.g. -->
<!-- * Implements feature 1 -->
<!-- * Fixes bug 3 -->

### This PR does not:
<!-- Describe what is out of scope for this PR, if applicable. Leave
this section blank if it's not applicable -->
<!-- This section helps avoid the reviewer having to needlessly point
out missing parts -->
<!-- * Implement feature 3 because that feature is blocked by Issue 4
-->
<!-- * Implement xyz because that is tracked in issue #123. -->
<!-- * Address xzy for which I opened issue #456 -->

### Key places to review:
<!-- Describe key places for reviewers to pay close attention to -->
<!-- * file.rs, `add_integers` function -->
<!-- Or directly comment on those files/lines to make it easier for the
reviewers -->

<!-- ### How to test this PR:  -->
<!-- Optional, uncomment the above line if this is relevant to your PR
-->
<!-- If your PR is fully tested through CI there is no need to add this
section -->
<!-- * E.g. `just test` -->

<!-- ### Things tested -->
<!-- Anything that was manually tested (that is not tested in CI). -->
<!-- E.g. building/running of docker containers. Changes to docker demo,
... -->
<!-- Especially mention anything untested, with reasoning and link an
issue to resolve this. -->

<!-- Complete the following items before creating this PR -->
<!-- [ ] Issue linked or PR description mentions why this change is
necessary. -->
<!-- [ ] PR description is clear enough for reviewers. -->
<!-- [ ] Documentation for changes (additions) has been updated (added).
-->
<!-- [ ] If this is a draft it is marked as "draft".  -->

<!-- To make changes to this template edit
https://github.com/EspressoSystems/.github/blob/main/PULL_REQUEST_TEMPLATE.md
-->
@alxiong alxiong changed the title refactor!: use big endian and simplify transcript logic chore: update hotshot to 0.1.60, most jf dep to 0.4.5 Jul 26, 2024
@alxiong alxiong marked this pull request as ready for review July 26, 2024 12:10
Copy link
Contributor

@philippecamacho philippecamacho left a comment

Choose a reason for hiding this comment

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

LGTM

@alxiong alxiong merged commit ffc6122 into commonprefix-patch Jul 26, 2024
16 checks passed
@alxiong alxiong deleted the cp-i02 branch July 26, 2024 14:32
philippecamacho added a commit that referenced this pull request Sep 4, 2024
* fix: bug on lagrange coeff computation (#1639)

* Fix the edge case when zeta is one of the evaluation domain elements, and our lagrange coefficient (and also pi_poly_eval) is computed incorrectly.
Tests are also added for these rare edge cases.

* Update script to run gas benchmarks (#1769)

* Update script to run gas benchmarks. Store gas benchmarks for this commit.
* Update lint.yml as CI is complaining.

* Use addmod in function _computeLinPolyConstantTerm. (#1770)

* Point to branch 'commonprefix-patch of solidity-bn254 repository

* use forge snapshot for gas benchmark instead

* chore: update hotshot to 0.1.60, most jf dep to 0.4.5 (#1788)

* refactor!: use big endian and simplify transcript logic (#1801)

* fix transcript and tests

* fix computeChallenges in verifier

* update gas benchmark

* further improve and add comment to inline assembly

* Fix comment in `_linearizationScalarsAndBases` (#1812)

* Fix comment in _linearizationScalarsAndBases.

* Update contracts/src/libraries/PlonkVerifier.sol

Co-authored-by: Alex Xiong <[email protected]>

---------

Co-authored-by: Alex Xiong <[email protected]>

* refactor: add G2 point from SRS to verifying key and transcript (#1819)

* add G2 from SRS to VK and append to Transcript

* update with jf

* Remove redundant code (#1821)

* Remove unused function _batchVerifyOpeningProofs.

* Remove redundant variable sumEval.

* attempt: free disk space to avoid ci failure

---------

Co-authored-by: Alex Xiong <[email protected]>

* Gas optimization for evaluatePiPoly (#1822)

* Gas optimization for evaluatePiPoly

* add credit

---------

Co-authored-by: Alex Xiong <[email protected]>

* improve challenge generation  (#1829)

* use state-approach for squeeze domain-separation

* memory align word size

* update with merged jf

* feat: Efficient computeChallenges in pure assembly (#1831)

* rewrite computeChallenges in pure assembly

* add more comments

* refactor!: change publicInputs from dynamic to fixed array (#1835)

* change publicInputs from dynamic to fixed array

* Remove redundant fields in struct EvalDomain. (#1840)

* Remove redundant field EvalDomain.groupGenInv

* Remove redundant field EvalDomain.size.

* address comments

---------

Co-authored-by: Alex Xiong <[email protected]>

* Remove redundant transcript files. (#1836)

* Use of constants COSET_K1,...,COSET_K4.
* Put Transcript.sol and Transcript.t.sol files in some legacy folder.

* Precompute domain elements (#1860)

* Remove unused domain sizes.
* Hardcode domain elements.
* removed domain.groupGen and localDomainElements.

---------

Co-authored-by: Alex Xiong <[email protected]>

* feat!: fully assemblify preparePcsInfo() and verifyOpeningProof (#1844)

* perf: reuse free mem for each chal (#1943)

* perf: avoid carrying around commScalars and commBases (#1940)

* avoid carrying around commScalars and commBases

* address jakov comment on L01

* Fix justfile

* Small fixes.
Generate bindings.

* More fixes

---------

Co-authored-by: Alex Xiong <[email protected]>
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.