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

[Crypto] merge master to BLST feature branch #4264

Merged
merged 1,264 commits into from
May 3, 2023

Conversation

tarakby
Copy link
Contributor

@tarakby tarakby commented Apr 24, 2023

  • merge master into the feature branch
  • update go.mod to test Flow packages with the under-development crypto package
  • enable G2 membership check to pass tests
  • fix issue of E2 set to infinity and compare to infinity
  • add default cgo flags to not use ADX instructions by default in BLST (only this can make CI pass for now, since CI seems to use x86 machines without ADX support). In the future, Makefile should be updated to only disable ADX when the machine is x86 and ADX isn't supported.
  • add flow_crypto_cgo_init function to check if BLST should be compiled without ADX, and catch the SIGILL signal with an appropriate message.
  • fix a bug in DKG: zeroing a buffer using BLST's vec_zero (the function accepts the length of the buffer to zero in bytes, but only works for multiple-of-8 lengths!). This results in a bug in E2 scalar multiplications with a small exponent.

durkmurder and others added 30 commits April 5, 2023 14:24
Co-authored-by: Alexander Hentschel <alex.hentschel@axiomzen.co>
4149: [Consensus] Service events processing order r=durkmurder a=durkmurder

https://github.com/dapperlabs/flow-go/issues/6502

### Context

This PR changes how service events are processed. Previously service events were processed when observing QC for a block which seals service event. This was needed since follower couldn't determine payload validity even though participant could do it. In our current implementation follower accepts only certified blocks, meaning he has same safety guarantees as participant with respect to payload validity. We are changing service events to be processed directly in a block which seals them, not in next child. 

As part of this PR:
- changed implementation
- updated tests(badger, mutator, epochs)
- updated epoch builder to include less blocks, updated tests

P.S in many tests we had incorrectly built payload, for instance block contains a result and seal for same block, which is not supported. To be 100% honest, we still have many places where we don't enforce gap of 1 block between incorporated result and seal, but that can be refactored in separate PR(if needed). 

Please carefully check if I have correctly modified tests.

Co-authored-by: Yurii Oleksyshyn <yuraolex@gmail.com>
Co-authored-by: Jordan Schalm <jordan@dapperlabs.com>
4118: [Follower] Skipping proposals too far ahead of locally finalized view r=durkmurder a=durkmurder

### Context

This PR removes `compliance.Config` from `follower.Core` and moves it to `follower.Engine` which uses `SkipNewProposalsThreshold` to drop proposals that are too far ahead in future.

Co-authored-by: Yurii Oleksyshyn <yuraolex@gmail.com>
4156: Add logger to FollowerState r=janezpodhostnik a=janezpodhostnik

Extracting pieces from #3736 so its easier to digest and merge.

This one adds a currently unused log to follower state, to be used in the next PR.

Co-authored-by: Janez Podhostnik <janez.podhostnik@gmail.com>
4146: Ignore benchstat on forks r=janezpodhostnik a=janezpodhostnik

I will open an issue to fix this properly. This is just to unblock #4126


Issue to fix this properly: #4147

Co-authored-by: Janez Podhostnik <janez.podhostnik@gmail.com>
4126: Add an extra parameter for runtime config in `NewCustomReusableCadenceRuntimePool` constructor r=janezpodhostnik a=m-Peter

Prior to this change, an empty `runtime.Config{}` was used and there was no way to set a custom config.

A similar improvement was done in this PR #3768

Co-authored-by: Ardit Marku <markoupetr@gmail.com>
4093: Check reference at snapshot creation r=jordanschalm a=jordanschalm

This PR extends #4086, adding checks to snapshot creation to differentiate between exceptions and unknown blocks in BlockSignerDecoder. 
- Updates `protocol.Snapshot` to guarantee that `ErrUnknownSnapshotReference` is returned in all cases where a snapshot's reference is unknown
  - Add existence checking methods to `storage/common`, `storage.Cache`
- Updates BlockSignerDecoder to differentiate between errors from an unknown input block and exception
- Misc: marks all unexpected errors in `storage/common` as exceptions
- Misc: update `flow-emu` version to include onflow/flow-emulator#280 (avoid changes to `Headers` being breaking)

Co-authored-by: Jordan Schalm <jordan@dapperlabs.com>
4130: Clean up script query executor delta usage r=pattyshack a=pattyshack



Co-authored-by: Patrick Lee <patrick.lee@dapperlabs.com>
This test does not actually test the computer.  The account status was populate
into the view during account creation, before the block is executed.
4150: Remove delta view usage in fvm/ tests r=pattyshack a=pattyshack



4160: Remove bad test r=pattyshack a=pattyshack

This test does not actually test the computer.  The account status was populate into the view during account creation, before the block is executed.

Co-authored-by: Patrick Lee <patrick.lee@dapperlabs.com>
Co-authored-by: Jordan Schalm <jordan@dapperlabs.com>
Co-authored-by: Jordan Schalm <jordan@dapperlabs.com>
…uctor

• added unit tests for optional constructor arguments for PaceMaker
…o alex/use_qc_of_uncertified_block_optimization
@tarakby tarakby force-pushed the tarak/blst-merge-master branch from f7926d5 to 2a851b5 Compare April 28, 2023 20:46
@tarakby tarakby force-pushed the tarak/blst-merge-master branch from 1b8002a to 7cd7c41 Compare May 1, 2023 19:14
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.