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

Update hash function for BLS to SHA256 #813

Conversation

benjaminion
Copy link
Contributor

PR Description

At some point the BLS hash function (used in hashToG2) changed from Keccak256 to SHA256. This PR implements that (and fixes a typo).

Note that this change is required to pass the v0.8 BLS reference tests.

Copy link
Contributor

@dangerousfood dangerousfood left a comment

Choose a reason for hiding this comment

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

LGTM

@benjaminion benjaminion merged commit fc1052c into Consensys:v0.8.0-integration Aug 6, 2019
@benjaminion benjaminion deleted the update-bls-hash-function-to-sha256 branch August 6, 2019 15:40
dangerousfood pushed a commit to dangerousfood/artemis that referenced this pull request Aug 6, 2019
dangerousfood added a commit that referenced this pull request Aug 6, 2019
* Implemented ssz_minimal_zero and MapObjectUtil object marshalling from YAML

* spotlessApply

* fix multitest

* Update BLS reference tests for new format (#812)

* Update hash function for BLS to SHA256 (#813)
dangerousfood added a commit to dangerousfood/artemis that referenced this pull request Aug 6, 2019
* Implemented ssz_minimal_zero and MapObjectUtil object marshalling from YAML

* spotlessApply

* fix multitest

* Update BLS reference tests for new format (Consensys#812)

* Update hash function for BLS to SHA256 (Consensys#813)

* adjust BLS test form factor
dangerousfood added a commit that referenced this pull request Aug 6, 2019
* Implemented ssz_minimal_zero and MapObjectUtil object marshalling from YAML

* spotlessApply

* fix multitest

* Update BLS reference tests for new format (#812)

* Update hash function for BLS to SHA256 (#813)

* adjust BLS test form factor

* spotlessApply
dangerousfood pushed a commit to dangerousfood/artemis that referenced this pull request Aug 14, 2019
dangerousfood added a commit that referenced this pull request Aug 14, 2019
* Hello Mods (#776)

* updating to tuweni 0.9.0

* converting hello message types to be compatible with new format

* Hobbits binary format (#780)

* changed RPCMethod identifiers to match spec

* converted all message values to the binary format indicated in the spec

* Hobbits binary fix (#786)

* changed RPCMethod identifiers to match spec

* converted all message values to the binary format indicated in the spec

* mainly a fix to gossip

* now all packets are the correct size and no hex strings are sent over the wire

* last thing to do is fix attestation and block format

* added custom serialization to attestations and beaconblocks

* Update constants (v0.8.0) (#774)

* Update constants (v0.8.0)

* Resolve issues in comments

* Update data structures (v0.8.0) (#775)

* Update data structures (v0.8.0)

* Implement SOS for 'Misc Dependencies' Data Structures

* Implement SOS for 'Beacon Operations' Data Structures

* Update helper functions (v0.8.0) (#777)

* Update state transition functions (v0.8.0) (#778)

* Update epoch processing functions

* Update block processing functions

* Update links to functions in spec

* Intermediate changes to v0.8.0 (#779)

* Fix get_indexed_attestation bug

* Refactor get_attesting_indices

* Fix is_valid_indexed_attestation

* Implement new Fork Choice methods (v0.8.0) (#781)

* Implement new Fork Choice methods

* Replace StateProcessor with Fork Choice methods

* Refactor ChainStorageClient

* Update domain type for BLS from long to Bytes (#784)

* v0.8.0 integration Deposit Contract Updates (#782)

* updates minus eth2genesis

* Clean up

* comparsion using wrong operator

* Revert back to the new onEth2Genesis (#3)

* Revert back to the new onEth2Genesis

* Change explicit type

* Update validator coordinator (v0.8.0) (#785)

* Make 0.8 compile (#788)

* Make 0.8 compile

* Fix timer and NPE

* Make 0.8 run

* Make it run an epoch

* Make 0.8 justify

* Fix not setting bits variable

* Make tests compile

* Fix wrong vector initialization (#789)

* Update tests for BLS domain as Bytes (#787)

* Test method to generate validator JSON (#791)

* remove deprecated DepositSimulation (#792)

* spotlessApply hallowed be thy name (#793)

* Merklize - SSZ v0.8.1 (#794)

* Rename TUPLE to VECTOR.
* Define bitfield_bytes method as an alias for pack. Reasoning TBD pending talks with EF.
* Implement merkleize(value,limit) per v0.8.1 spec.
* Merkleize SSZ BitVector
* Merkleize List of SSZ Basic types per v0.8.1.
* Merkleize SSZ BitList
* Utilize bitfield_bytes instead of pack method for merkleizing bitlist and bitvector for spec compliance.
* Merkleize List of SSZ Composite types per v0.8.1.
* Add stashed BeaconBlock SSZ/SOS changes.

* Minimal v0.8.1 SSZ Reference Testing and Fixes (#795)

* Add minimal SSZ reference testing for v0.8.1 - Eth1Data

* Add minimal SSZ reference testing for v0.8.1 - DepositData

* Add minimal SSZ reference testing for v0.8.1 - Deposit

* Add minimal SSZ reference testing for v0.8.1 - BeaconBlockHeader

* Resolve Spotless and Build Issues

* Add minimal SSZ reference testing for v0.8.1 - ProposerSlashing

* Add minimal SSZ reference testing for v0.8.1 - Checkpoint

* Add minimal SSZ reference testing for v0.8.1 - Crosslink

* Add minimal SSZ reference testing for v0.8.1 - AttestationData

* Add minimal SSZ reference testing for v0.8.1 - IndexedAttestation

* Add minimal SSZ reference testing for v0.8.1 - AttesterSlashing

* Add minimal SSZ reference testing for v0.8.1 - VoluntaryExit

* Add minimal SSZ reference testing for v0.8.1 - Transfer

* Add minimal SSZ reference testing for v0.8.1 - Attestation

* mods to allow to import genesis from prysm

* Initialize validators from yaml (#797)

* Initialize validator coordinator from yaml

* Use index from yaml

* Ssz max size long (#799)

* mods to allow ssz methods to accept max-size long

* adding padding for pk until prysm fixes their pk length

* Update remaining hash_tree_root of SSZ List to carry List max size information.

* Test Format for YAML ingestion (#800)

* Read test case objects (#4)

* Read test_case objects directly to java objects

* first example

* clean up

* spotlessApply and cleanup

* merge fixes

* Implemented ssz_minimal_zero and MapObjectUtil object marshalling from YAML

* spotlessApply

* Update BLS reference tests for new format (#812)

* Update hash function for BLS to SHA256 (#813)

* fix multitest

* adjust BLS test form factor

* spotlessApply

* updated to v0.8.2-reorg test format
jrhea pushed a commit to jrhea/artemis that referenced this pull request Sep 2, 2019
jrhea pushed a commit to jrhea/artemis that referenced this pull request Sep 2, 2019
* Implemented ssz_minimal_zero and MapObjectUtil object marshalling from YAML

* spotlessApply

* fix multitest

* Update BLS reference tests for new format (Consensys#812)

* Update hash function for BLS to SHA256 (Consensys#813)
jrhea pushed a commit to jrhea/artemis that referenced this pull request Sep 2, 2019
* Implemented ssz_minimal_zero and MapObjectUtil object marshalling from YAML

* spotlessApply

* fix multitest

* Update BLS reference tests for new format (Consensys#812)

* Update hash function for BLS to SHA256 (Consensys#813)

* adjust BLS test form factor

* spotlessApply
jrhea pushed a commit to jrhea/artemis that referenced this pull request Sep 2, 2019
* Hello Mods (Consensys#776)

* updating to tuweni 0.9.0

* converting hello message types to be compatible with new format

* Hobbits binary format (Consensys#780)

* changed RPCMethod identifiers to match spec

* converted all message values to the binary format indicated in the spec

* Hobbits binary fix (Consensys#786)

* changed RPCMethod identifiers to match spec

* converted all message values to the binary format indicated in the spec

* mainly a fix to gossip

* now all packets are the correct size and no hex strings are sent over the wire

* last thing to do is fix attestation and block format

* added custom serialization to attestations and beaconblocks

* Update constants (v0.8.0) (Consensys#774)

* Update constants (v0.8.0)

* Resolve issues in comments

* Update data structures (v0.8.0) (Consensys#775)

* Update data structures (v0.8.0)

* Implement SOS for 'Misc Dependencies' Data Structures

* Implement SOS for 'Beacon Operations' Data Structures

* Update helper functions (v0.8.0) (Consensys#777)

* Update state transition functions (v0.8.0) (Consensys#778)

* Update epoch processing functions

* Update block processing functions

* Update links to functions in spec

* Intermediate changes to v0.8.0 (Consensys#779)

* Fix get_indexed_attestation bug

* Refactor get_attesting_indices

* Fix is_valid_indexed_attestation

* Implement new Fork Choice methods (v0.8.0) (Consensys#781)

* Implement new Fork Choice methods

* Replace StateProcessor with Fork Choice methods

* Refactor ChainStorageClient

* Update domain type for BLS from long to Bytes (Consensys#784)

* v0.8.0 integration Deposit Contract Updates (Consensys#782)

* updates minus eth2genesis

* Clean up

* comparsion using wrong operator

* Revert back to the new onEth2Genesis (Consensys#3)

* Revert back to the new onEth2Genesis

* Change explicit type

* Update validator coordinator (v0.8.0) (Consensys#785)

* Make 0.8 compile (Consensys#788)

* Make 0.8 compile

* Fix timer and NPE

* Make 0.8 run

* Make it run an epoch

* Make 0.8 justify

* Fix not setting bits variable

* Make tests compile

* Fix wrong vector initialization (Consensys#789)

* Update tests for BLS domain as Bytes (Consensys#787)

* Test method to generate validator JSON (Consensys#791)

* remove deprecated DepositSimulation (Consensys#792)

* spotlessApply hallowed be thy name (Consensys#793)

* Merklize - SSZ v0.8.1 (Consensys#794)

* Rename TUPLE to VECTOR.
* Define bitfield_bytes method as an alias for pack. Reasoning TBD pending talks with EF.
* Implement merkleize(value,limit) per v0.8.1 spec.
* Merkleize SSZ BitVector
* Merkleize List of SSZ Basic types per v0.8.1.
* Merkleize SSZ BitList
* Utilize bitfield_bytes instead of pack method for merkleizing bitlist and bitvector for spec compliance.
* Merkleize List of SSZ Composite types per v0.8.1.
* Add stashed BeaconBlock SSZ/SOS changes.

* Minimal v0.8.1 SSZ Reference Testing and Fixes (Consensys#795)

* Add minimal SSZ reference testing for v0.8.1 - Eth1Data

* Add minimal SSZ reference testing for v0.8.1 - DepositData

* Add minimal SSZ reference testing for v0.8.1 - Deposit

* Add minimal SSZ reference testing for v0.8.1 - BeaconBlockHeader

* Resolve Spotless and Build Issues

* Add minimal SSZ reference testing for v0.8.1 - ProposerSlashing

* Add minimal SSZ reference testing for v0.8.1 - Checkpoint

* Add minimal SSZ reference testing for v0.8.1 - Crosslink

* Add minimal SSZ reference testing for v0.8.1 - AttestationData

* Add minimal SSZ reference testing for v0.8.1 - IndexedAttestation

* Add minimal SSZ reference testing for v0.8.1 - AttesterSlashing

* Add minimal SSZ reference testing for v0.8.1 - VoluntaryExit

* Add minimal SSZ reference testing for v0.8.1 - Transfer

* Add minimal SSZ reference testing for v0.8.1 - Attestation

* mods to allow to import genesis from prysm

* Initialize validators from yaml (Consensys#797)

* Initialize validator coordinator from yaml

* Use index from yaml

* Ssz max size long (Consensys#799)

* mods to allow ssz methods to accept max-size long

* adding padding for pk until prysm fixes their pk length

* Update remaining hash_tree_root of SSZ List to carry List max size information.

* Test Format for YAML ingestion (Consensys#800)

* Read test case objects (Consensys#4)

* Read test_case objects directly to java objects

* first example

* clean up

* spotlessApply and cleanup

* merge fixes

* Implemented ssz_minimal_zero and MapObjectUtil object marshalling from YAML

* spotlessApply

* Update BLS reference tests for new format (Consensys#812)

* Update hash function for BLS to SHA256 (Consensys#813)

* fix multitest

* adjust BLS test form factor

* spotlessApply

* updated to v0.8.2-reorg test format
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