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

Weekly release of dev into master #591

Merged
merged 81 commits into from
Feb 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
7f39f79
Use 2*63 for the genesis slot
JustinDrake Jan 31, 2019
5488e7b
SSZ list Merkle hashing change
vbuterin Jan 31, 2019
9271e6e
Update specs/simple-serialize.md
hwwhww Jan 31, 2019
acb432e
Update specs/simple-serialize.md
hwwhww Jan 31, 2019
8ffd9ad
Hash_tree_root -> hash_tree_root_internal
vbuterin Feb 1, 2019
dd197e4
Fix `zpad`
hwwhww Feb 1, 2019
e0867c0
Fix typo
hwwhww Feb 1, 2019
0b8ccf1
Update 0_beacon-chain.md (#547)
hwwhww Feb 1, 2019
378e1ba
Misc fixes of `get_next_epoch_crosslink_committees`
hwwhww Feb 1, 2019
d53d333
fix startup typo
GregTheGreek Feb 1, 2019
6a9c756
Merge pull request #551 from GregTheGreek/master
djrtwo Feb 1, 2019
7e7e5e2
Removes the source of the Vyper contract from the spec.
ralexstokes Feb 2, 2019
8d82ee8
do not mix in epoch to seed in get_shuffling. add epoch to generate_seed
djrtwo Feb 2, 2019
a781eb5
Update 0_beacon-chain.md
terencechain Feb 2, 2019
4d44b7c
Merge pull request #553 from terenc3t/patch-43
djrtwo Feb 2, 2019
f3d47e2
`shard` -> `attestation.data.shard`
Feb 2, 2019
04b37f2
Merge pull request #558 from decanus/patch-14
djrtwo Feb 2, 2019
650f4a2
clarify eth1 that there will be at most 1
djrtwo Feb 2, 2019
7298990
Merge pull request #561 from ethereum/eth1_data-clarification
djrtwo Feb 3, 2019
2a32e7f
convert int_to_bytes to little endian
djrtwo Feb 3, 2019
f80a345
Merge pull request #552 from ethereum/epoch-in-generate-seed
djrtwo Feb 3, 2019
3b9953a
Merge pull request #537 from ethereum/JustinDrake-patch-1
djrtwo Feb 3, 2019
e4c4c04
Update 0_beacon-chain.md
terencechain Feb 3, 2019
969896b
Update 0_beacon-chain.md
Feb 3, 2019
8e16d12
Update specs/core/0_beacon-chain.md
hwwhww Feb 3, 2019
5c56751
Update 0_beacon-chain.md
Feb 3, 2019
3a6da98
Added a note for underflow. Thanks Hsiao Wei! : )
hwwhww Feb 3, 2019
9bacf04
Merge pull request #543 from ethereum/vbuterin-patch-2
vbuterin Feb 3, 2019
197fa18
Zpad is already in #543
vbuterin Feb 3, 2019
2ac420c
Merge pull request #538 from ethereum/vbuterin-patch-1
vbuterin Feb 3, 2019
8c5868c
Extend `deposit` API with note about bounds on acceptable values
ralexstokes Feb 3, 2019
8755dc3
Add direct link to validator registration contract
ralexstokes Feb 3, 2019
3e2eb1c
Merge pull request #562 from ralexstokes/remove-vyper-code
djrtwo Feb 3, 2019
3aed1cf
Merge pull request #567 from decanus/patch-17
hwwhww Feb 4, 2019
4784411
Merge pull request #565 from terenc3t/patch-45
hwwhww Feb 4, 2019
147ee2f
Fix get_total_balance()
tarasbob Feb 4, 2019
ecad021
Merge pull request #569 from tarasbob/master
hwwhww Feb 4, 2019
867dea3
Fix `verify_bitfield`
hwwhww Feb 5, 2019
e5788f5
Fix typo: it's `bls_verify_multiple` in `verify_slashable_attestation…
hwwhww Feb 5, 2019
1d76ad6
Update 0_beacon-chain.md
JustinDrake Feb 5, 2019
180c8a0
Update 0_beacon-chain.md
JustinDrake Feb 5, 2019
ec1a082
Merge pull request #573 from ethereum/hwwhww/verify_bitfield
djrtwo Feb 6, 2019
c58410e
Introduce swap-or-not shuffle
vbuterin Feb 6, 2019
8f37c5c
Update fork choice rule (#571)
vbuterin Feb 6, 2019
37b41a2
Update specs/core/0_beacon-chain.md
hwwhww Feb 7, 2019
4ec721f
Update specs/core/0_beacon-chain.md
djrtwo Feb 7, 2019
6a5b754
Update specs/core/0_beacon-chain.md
hwwhww Feb 7, 2019
47b00f3
n -> len(values)
vbuterin Feb 7, 2019
b3db7b0
big to little in shuffle
djrtwo Feb 7, 2019
65255e5
shuffle -> get_permuted_index
vbuterin Feb 7, 2019
9251471
Update 0_beacon-chain.md
vbuterin Feb 7, 2019
70e482b
Add vbuterin's optimization and some formatting
hwwhww Feb 7, 2019
aa9f9fc
amend
hwwhww Feb 7, 2019
3f34720
change message to message_hash in bls spec
djrtwo Feb 7, 2019
d4901be
get_next_epoch_committee_assignments returns slot and is_proposer
djrtwo Feb 7, 2019
e4f5efa
Fix `first_committee_at_slot`
hwwhww Feb 7, 2019
d3ce995
Merge pull request #580 from ethereum/message_hash
hwwhww Feb 7, 2019
cc2df63
Merge pull request #549 from ethereum/registry_change
djrtwo Feb 7, 2019
e8ec977
Merge pull request #548 from ethereum/hwwhww/typo_hash_tree_root
djrtwo Feb 7, 2019
859bf62
Revert and refactor
hwwhww Feb 7, 2019
cf7ebe9
`message` to `message_hash` in the rest of the spec (followup https:/…
mratsim Feb 7, 2019
911e4f1
Add `bytes_to_int`
hwwhww Feb 7, 2019
89b9894
Fix type hinting
hwwhww Feb 7, 2019
fd3d4a5
Don't change TOC
mratsim Feb 7, 2019
ca098f8
Prevent changing another TOC
mratsim Feb 7, 2019
1582413
Merge pull request #583 from mratsim/continue-message_hash-bls-changes
hwwhww Feb 7, 2019
086df84
Attestation data contains latest crosslink, not just latest crosslink…
vbuterin Feb 8, 2019
f797826
Update specs/core/0_beacon-chain.md
djrtwo Feb 8, 2019
1c6ccac
SHUFFLE_ROUND_COUNT as global constant
vbuterin Feb 8, 2019
87dc8a6
Merge pull request #576 from ethereum/vbuterin-patch-5
djrtwo Feb 8, 2019
0ad2ffa
Merge branch 'dev' into big-to-little
djrtwo Feb 8, 2019
8a9146d
Merge pull request #564 from ethereum/big-to-little
djrtwo Feb 8, 2019
f0cbacb
add missing .
djrtwo Feb 8, 2019
08274fe
Merge branch 'dev' into vbuterin-patch-9
djrtwo Feb 8, 2019
6d95812
change latest_crosslink_root to latest_crosslink in validator guide
djrtwo Feb 8, 2019
cd0f98b
Merge pull request #585 from ethereum/vbuterin-patch-9
djrtwo Feb 8, 2019
9247104
remove wire protocol doc
djrtwo Feb 8, 2019
8127922
Merge pull request #590 from ethereum/remove-wire
hwwhww Feb 8, 2019
334d477
fix a couple of nitpicks before release
djrtwo Feb 8, 2019
663d38e
simplify get_next_epoch_committee_assignment by adding registry_chang…
djrtwo Feb 8, 2019
4a2416a
Merge pull request #592 from ethereum/release-nitpicks
djrtwo Feb 8, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions specs/bls_signature.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ We require:
G2_cofactor = 305502333931268344200999753193121504214466019254188142667664032982267604182971884026507427359259977847832272839041616661285803823378372096355777062779109
q = 4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787

def hash_to_G2(message: bytes32, domain: uint64) -> [uint384]:
def hash_to_G2(message_hash: Bytes32, domain: uint64) -> [uint384]:
# Initial candidate x coordinate
x_re = int.from_bytes(hash(message + bytes8(domain) + b'\x01'), 'big')
x_im = int.from_bytes(hash(message + bytes8(domain) + b'\x02'), 'big')
x_re = int.from_bytes(hash(message_hash + bytes8(domain) + b'\x01'), 'big')
x_im = int.from_bytes(hash(message_hash + bytes8(domain) + b'\x02'), 'big')
x_coordinate = Fq2([x_re, x_im]) # x = x_re + i * x_im

# Test candidate y coordinates until a one is found
Expand Down Expand Up @@ -128,17 +128,17 @@ g = Fq2([g_x, g_y])

### `bls_verify`

Let `bls_verify(pubkey: Bytes48, message: Bytes32, signature: Bytes96, domain: uint64) -> bool`:
Let `bls_verify(pubkey: Bytes48, message_hash: Bytes32, signature: Bytes96, domain: uint64) -> bool`:

* Verify that `pubkey` is a valid G1 point.
* Verify that `signature` is a valid G2 point.
* Verify that `e(pubkey, hash_to_G2(message, domain)) == e(g, signature)`.
* Verify that `e(pubkey, hash_to_G2(message_hash, domain)) == e(g, signature)`.

### `bls_verify_multiple`

Let `bls_verify_multiple(pubkeys: List[Bytes48], messages: List[Bytes32], signature: Bytes96, domain: uint64) -> bool`:
Let `bls_verify_multiple(pubkeys: List[Bytes48], message_hashes: List[Bytes32], signature: Bytes96, domain: uint64) -> bool`:

* Verify that each `pubkey` in `pubkeys` is a valid G1 point.
* Verify that `signature` is a valid G2 point.
* Verify that `len(pubkeys)` equals `len(messages)` and denote the length `L`.
* Verify that `e(pubkeys[0], hash_to_G2(messages[0], domain)) * ... * e(pubkeys[L-1], hash_to_G2(messages[L-1], domain)) == e(g, signature)`.
* Verify that `len(pubkeys)` equals `len(message_hashes)` and denote the length `L`.
* Verify that `e(pubkeys[0], hash_to_G2(message_hashes[0], domain)) * ... * e(pubkeys[L-1], hash_to_G2(message_hashes[L-1], domain)) == e(g, signature)`.
Loading