Commit Graph

199 Commits

Author SHA1 Message Date
Raul Jordan
88765b6d3c
Fix Attestation Info at Slot to Match Justified Epoch Expectations (#1768)
* fix crosslinkt committees

* fix lint

* fix in epoch

* imports

* add gx tags

* epoch shuffling tests

* regress test

* preston comments

* service change

* advance to handle skip slots

* ready

* imports

* rem unnecessary log

* revert config

* last comment

* imports
2019-03-01 18:33:55 -06:00
Preston Van Loon
a19cb1864e Tracing additions (#1747) 2019-02-27 19:55:47 -08:00
Ivan Martinez
136950e0c5 Update some of client to v0.3 spec (#1733)
* Update validator to v0.3 spec

* Fix typos with rename
2019-02-27 12:21:15 -08:00
Preston Van Loon
a21aa28ff8
remove preemptive chainstart variable set (#1719) 2019-02-26 11:41:22 -05:00
Nishant Das
ef137beea4 reduce test time (#1716) 2019-02-26 06:45:59 -05:00
Nishant Das
a27c52e3a3
Update Initial Sync (#1694)
* adding check for chainHead

* add batch block limit

* adding state root

* removing genesisHash

* removing setBlockForInitialSync

* fixing tests

* remove obsolete check

* changing to check for state initialization

* changing var name

* fix test

* add in tests

* fix all tests

* lint

* reduce test time

* merge fixes

* gazelle
2019-02-26 13:37:28 +08:00
Raul Jordan
20803b4c9d
Revert Usage of ssz.TreeHash Across Repo (#1711)
* revert using ssz.TreeHash

* gazelle
2019-02-25 21:42:31 -06:00
Raul Jordan
e19920aec1
Miscellaneous Runtime Fixes & Improvements - Raul (#1674)
* fatal if impossible to receive chainstart

* fix tests

* fix

* custom delay

* completed custom delay

* errors

* better logs, nothing at genesis

* use demo in val

* add gazelle

* log

* starting to log stuff

* pass in ops

* avoid printing the large #s for debug, still working on tests..

* all around better logging

* fixed build error in epoch process

* fixed state transiton tests

* fixed block tests

* lint

* verify sigs in randao

* ready for inclusion falg

* only print waiting when slot is not valid

* fix build

* mod config

* fixed last justified slot issue

* fix inclusion

* fixed attestation issue

* using zero hash from params instead

* fix tests

* update balance

* removed swp

* more `- genesis_slot` for logs

* rem unused log

* fix broken tests

* account for skip slots in state root computation

* fixes done

* validator guide bug fixes - 671

* epoch boundary at the last slot of the epoch

* fix epoch issue

* more balance cal logs for debugging

* greater balance

* attestaton fixes

* fixes

* addressed testrun

* fixed ejection balance

* fix tests with far future epoch

* revert sync change

* revert initial sync change

* fix changes

* off by one att fix

* revert the att fix

* address comments

* format

* fix build

* rem file
2019-02-24 20:09:45 -06:00
Preston Van Loon
273993a7e0 DepositInput: Proof of possession, withdrawal credentials (#1675)
* move deposit input to keystore pkg, add proof of possession and withdrawal addr

* Add spec details for deposit input

* Use ssz

* actually use withdrawal key
2019-02-22 14:24:31 -06:00
Preston Van Loon
5adbaa2e23
Add example encoding for godoc ssz (#1687)
* Add example encoding for godoc ssz

* A bit more comments

* Add comment about fatal error
2019-02-22 12:50:28 -05:00
Ivan Martinez
0d29b2cd91 Makes test naming consistent across codebase (#1636) 2019-02-22 07:11:26 -08:00
Preston Van Loon
9f533fb7ae fix zero being power of two (#1684) 2019-02-22 06:45:25 -08:00
Raul Jordan
0a3b8fae9b
Deprecate Old Configuration Flags (#1676)
* replace password flag with path to password

* changed to simple string flag

* fix build
2019-02-21 14:34:44 -06:00
Raul Jordan
19abe81472
Implement Randao Reveal Signing in Proposer Client (#1650)
* finish the BLS API wrapper

* all tests passing

* unexported comment

* gofmt tests for bls

* block processing test into own package to avoid cycle

* randao tests pass

* blocks test passing

* use common deposit generator

* helper

* resolved import cycle

* setup initial

* builds

* almost done with blockchain tests

* fix blockchain tests

* getting through with chaintests

* revert client change

* lint

* sync master conflict gazelle

* randao test fixes

* randao proposer impl

* tests pass
2019-02-20 12:58:34 -06:00
Cayman
e3ba3e181c Remove leaf hashing in MerkleRoot function (#1653)
* Remove leaf hashing in MerkleRoot function

See https://github.com/ethereum/eth2.0-specs/pull/646 for clarification.

* Add comment clarifying leaf hashing removal
2019-02-20 23:51:35 +05:30
Preston Van Loon
4ee57f1c45 shorten name (#1649) 2019-02-19 13:38:29 -08:00
Raul Jordan
2425bef5c7
Update Configuration, Naming, and GenesisStart to Accommodate Randao (#1647)
* signature on startup configuration

* remove ref to hash32s for randao

* completed changes
2019-02-19 14:24:00 -06:00
Raul Jordan
c5c7d40398
Create Wrapper Around Pure Go BLS Project in Prysm (#1625)
* finish the BLS API wrapper

* all tests passing

* unexported comment

* gofmt tests for bls

* slice

* len

* cap err string

* tests

* imports

* gazelle
2019-02-19 09:09:50 -06:00
Preston Van Loon
c30913266c
Remove paths to go-ethereum crypto in validator (#1635)
* remove a few references that tie the validator binary to the go-ethereum crypto library

* fixes

* remove unused vars

* gazelle

* nosec on this crypto library
2019-02-19 01:17:27 -05:00
terence tsao
8b661c9540
CheckBit to work with small endian (#1628) 2019-02-18 12:45:20 -08:00
terence tsao
8c04ced1a6 Name Changes to Align with V0.3 (#1621)
* fixed epoch_processing

* penalize->slash

* exit -> voluntary_exit

*  SEED_LOOKAHEAD -> MIN_SEED_LOOKAHED

* ENTRY_EXIT_DELAY -> ACTIVATION_EXIT_DELAY

* `INCLUDER_REWARD_QUOTIENT` -> `ATTESTATION_INCLUSION_REWARD_QUOTIEN`

* LatestIndexRoots -> LatestActiveIndexRoots

* `MIN_VALIDATOR_WITHDRAWAL_EPOCHS` -> `MIN_VALIDATOR_WITHDRAWAL_DELAY`

* MAX_WITHDRAWALS_PER_EPOCH -> MAX_EXIT_DEQUEUES_PER_EPOCH

* ETH1_DATA_VOTING_PERIOD -> EPOCHS_PER_ETH1_VOTING_PERIOD

* SLOT_DURATION -> SECONDS_PER_SLOT

* EPOCH_LENGTH -> SLOTS_PER_EPOCH

* SLOT_DURATION -> SECONDS_PER_SLOT take 2

* rest of the misc fixes for config name changes

* remove tools/bootnode/.!74296!bootnode.go

* `current_epoch_start_shard` -> `current_shuffling_start_shard`, `current_shuffling_epoch`, `current_shuffling_see`

* go fmt

* fixed comment

* updated pseudocode comments

* merged master
2019-02-18 10:52:16 -06:00
Nishant Das
25e0d6fe34 Adding batched logs (#1605)
* adding batched logs

* remove arg

* set requestBlkNum

* changing to debug

* adding log delay
2019-02-16 15:00:52 -06:00
Preston Van Loon
c07b9bb456
remove old keystore flag (#1610) 2019-02-15 17:50:25 -05:00
Preston Van Loon
a57912dd5a
restore testutil usage removed in #1607 (#1608) 2019-02-15 14:04:51 -05:00
Preston Van Loon
8d67337564
Revert go-bls (#1607)
* revert bc2afa04c6

* Fix workspace

* remove serialize reference

* Remove static
2019-02-15 13:31:07 -05:00
Raul Jordan
1d72cee59c Revive Our Demo Config for Local Testing (#1602) 2019-02-14 15:01:07 -08:00
Raul Jordan
ae13bb5c83
Use Tree Hashing Algorithm Everywhere for Block Roots and State Root (#1577)
* begin using tree hash instead of hash for state and blocks

* replace with ssz

* rem references to vote cache

* replace all instances of state/block hash with root

* goimports

* almost every test in the world fails

* goimports

* all tests pass, tree hash across repo
2019-02-14 14:04:47 -06:00
Jie Hou
d620361233 Support typed nil pointer in tree hash (#1590) 2019-02-14 09:22:12 -06:00
Nishant Das
bddceda33b Implement Verify Bitfield (#1562) 2019-02-14 01:17:54 +00:00
Raul Jordan
281e5d1cfd
Provide Real Keystore to Validator Service for Public/Private Key Access at Runtime (#1570)
* provide validator with real keystore public key

* fmt

* build errors buildkite

* readd imports removed by goimport

* gazelle

* address broken tests

* make reference to filename a param

* fmt

* imports

* gazelle

* os remove all

* Use better Temp storage for tests

* testmain approach to avoid repeating expensive operation for each test

* travis lint

* fix test

* nokeystore in status test

* passing

* fix goimports
2019-02-13 17:49:06 -06:00
terence tsao
59e5e59300
Update Fork Choice to Use Balance (#1564) 2019-02-13 23:13:00 +00:00
Raul Jordan
f707f14cb2
Change BLS Public Key Length Check in Beacon RPC Server (#1571) 2019-02-13 12:08:25 -06:00
Nishant Das
77b1cc1c81
Simplify Config (#1579)
* clean up config

* lint
2019-02-13 20:04:58 +05:30
Raul Jordan
bb3ee07a3d
Standardize Slot Ticker with params.BeaconConfig().GenesisSlot (#1569)
* tests passing after standardizing to genesis slot

* goimports

* no more magic numbers in current slot

* fmt
2019-02-12 14:58:35 -06:00
Raul Jordan
cd415b0eda
Track Previously Seen Merkle Index to Prevent Duplicate Log Spam (#1566)
* using little endian and tests for encoding dep inputs

* use decode value and timestamp method in state

* updated comments to match serialization format

* latest compiled contract, abi, bytecode, and bindings

* to little endian everywhere

* fix all tests except for contract tests

* include contract changes

* address broken build

* compile with vyper v8

* update readme

* fix pkg name

* add skip chainstart delay

* skip chainstart delay tests pass

* to little endian timestamp

* using genesis timestamp instead of bool

* update with gofmt

* make more fields public

* duplicate log spam inconsistent root fixed by tracking last seen index

* sync with master

* readd weird removal of import

* readd libp2p import

* gazelle

* readd eth

* comments
2019-02-12 13:50:39 -06:00
Raul Jordan
5dc5f1d1c8 Update Contract to Use Little Endian And Encoding Across Entire Repo (#1536)
* using little endian and tests for encoding dep inputs

* use decode value and timestamp method in state

* updated comments to match serialization format

* latest compiled contract, abi, bytecode, and bindings

* to little endian everywhere

* fix all tests except for contract tests

* include contract changes

* address broken build

* compile with vyper v8

* update readme

* fix pkg name

* add skip chainstart delay

* skip chainstart delay tests pass

* to little endian timestamp
2019-02-12 09:27:00 +05:30
Jie Hou
52a21b6314 Support Encode/Decode of Nil Pointer (#1553)
* Support encoding/decoding against nil pointer

* Fix comments

* Small fix
2019-02-12 09:17:56 +05:30
Nishant Das
bc2afa04c6 Utilize Go-BLS in Prysm (#1367)
* removing redundant bls package

* gazelle

* battling bazel deps

* workspace

* go-bls works in prysm now

* add func and test

* add test

* fix tests

* edit workspace

* more verbose logs

* lint

* all tests passing

* handle error in keystore
2019-02-11 13:45:06 -05:00
terence tsao
4cadd534db
Update Genesis Slot and Epoch (#1537) 2019-02-10 23:09:35 +01:00
terence tsao
c46a583acb
Update MaxDeposit Config Names (#1539) 2019-02-09 14:09:09 +01:00
Nishant Das
b07a3c3bb8 Update Deposit Contract (#1494)
* Update deposit Contarct

* updating deposit trie

* add verifyMerkleBranch

* fix test

* fixed all tests

* fix other tests

* fixing a test

* All tests are fixed

* lint

* fix lint
2019-02-08 11:01:15 -06:00
Raul Jordan
61026103c6
Validator Attester Rewrite (#1487)
* initial validator attesthead rewrite based on proposer rewrite

* proceed with fetching committees and tree hashing the canonical head at assigned attester slot

* complete filling the properties of attestation data and all associated root hashes

* add when to attest todo

* finish entire attester client logic

* tests with mocks checked in

* tests passing in client

* stubbed out server implementation

* fixed build due to old property

* regen mocks with new mockgen version

* fixed broken tests

* complete bazel build fix

* address some review comments

* deep proto test

* tests passing after checking for empty committee and crosslink root

* address nishant comments
2019-02-06 10:20:38 -06:00
Nishant Das
c48f9c96e0
Allow Simulated Backend to Advance Chain (#1445)
* initialize beacon state separately

* extracting out testcase into another func

* creating function for simulated objects

* creating simulated object struct

* final clean up

* documentation

* lint

* adding chain advancer

* review comments

* replacing lib

* adding initialization for chain and new vars in struct

* added func

* fixing tests and all other bugs

* fixing tests

* docs

* adding a new nil block function

* adding test

* remove check for nil blocks

* godoc

* fixing merge conflicts, tests

* fix test
2019-02-06 10:18:55 +08:00
Preston Van Loon
4b27b8408b
Fix travis (#1493)
* fix travis

* test 2

* goimports

* Remove unused p2p config

* remove unused var
2019-02-05 10:46:32 -05:00
Preston Van Loon
4add403335
Validator Proposer Rewrite (#1462)
* WIP - with TODOs

* interface w/ test

* basic test for broadcast

* Add computeStateRoot funciton

* remove custody challenge

* resolve TODO lint issues

* more TODOs

* revert new line in types.proto

* broadcaster comment

* one of several failure condition tests

* Add test cases

* handle compute state error test case

* fix config in validator helpers

* fix tests too

* fix conflict

* partial PR feedback

* remove p2p

* gazelle

* package comment

* Better godoc
2019-02-05 08:47:25 -05:00
terence tsao
21ac564631
Aligning ETH2.0 spec - Make Epoch First Citizen (Package: Validators) (#1460) 2019-02-04 21:34:33 +01:00
terence tsao
176aa2688e
Implement Attestation Pool for Fork Choice (#1402) 2019-02-04 00:05:34 +01:00
Preston Van Loon
30080656bc Update config for deposits processing (#1473) 2019-02-03 20:21:18 +01:00
Ivan Martinez
5b209a2b18 Update DepositRoot to Eth1Data (#1403)
* update proto fileds

* Start writing ProcessETH1Data function

* More progress on tests

* Continue more work on tests

* Fix almost all the tests

* Fix all tests

* Fix everything

* Fix after rebase

* Fix for suggestions and fix per-epoch operation

* Remove method usage

* Fix build

* Fix suggestions

* Fix merge issues and suggestions

* Fix rebase issues

* Remove the error from ProcessETH1Data

* WIP write test

* Update test to reach crosslinks

* Revert "Update test to reach crosslinks"

This reverts commit 5ff9177f96c12c98c54eafffcfb385bd966b0888.

* Revert "WIP write test"

This reverts commit f7e7ed715c4af6b7e3c95643f7ebf85830caf638.
2019-02-02 16:24:42 -05:00
terence tsao
3acffd878c
Aligning ETH2.0 spec - RANDAO helpers (#1454) 2019-02-01 22:22:52 +01:00