Commit Graph

95 Commits

Author SHA1 Message Date
Nishant Das
98042c613d
Update State to Include Current and Previous Justified Roots (#2186)
* update protos

* Revert "Use DB to Fetch Justified Block (#2172)"

This reverts commit 60c254d818.

* use justified root and previous justified root across the repo

* change attester server to use state justified root

* remove commented code

* fix build issues

* fix test

* fix all tests

* fix merge issues
2019-04-10 14:52:06 +08:00
Preston Van Loon
97b184e5c7
Historical pruning by flag only (#2210)
* add flag

* use flag

* fixes
2019-04-07 22:46:55 -04:00
Raul Jordan
60c254d818
Use DB to Fetch Justified Block (#2172)
* builds

* db tests in core

* spacing

* Gazelle

* fix lint

* iterative block root loop

* Update beacon-chain/core/blocks/block_operations_test.go

Co-Authored-By: rauljordan <raul@prysmaticlabs.com>

* imports
2019-04-05 14:48:49 -05:00
Nishant Das
40189cb659 Remove Outdated DB Method (#2091) 2019-03-27 07:24:34 -07:00
Preston Van Loon
ac7d5a7780
Update state metrics on save state (#2083)
* Update state metrics on save state

* fix tests
2019-03-26 18:29:45 -05:00
Preston Van Loon
ec41d37cf4
Revert grpc error in db package (#2076)
* Revert "status err code"

This reverts commit 27112ff2841ae7ccfb7d7eca665e06bbad81755d.

* imports
2019-03-26 16:11:21 -05:00
Raul Jordan
fcc18fac02
Treat Post & Pre-ChainStart Validators Equally in Assignments Fetching (#2074)
* treat post/prechainstart validators equally in assignment fetching

* Update validator/client/fake_validator_test.go

Co-Authored-By: rauljordan <raul@prysmaticlabs.com>

* status err code

* imports

* beyond activation epoch

* assigned to slot log

* gazelle
2019-03-26 09:03:05 -05:00
terence tsao
7f5b6eb3fc
Update FFG Check Points During Block Processing (#2006) 2019-03-19 10:16:17 -07:00
Nishant Das
f801bfedcf Fix State Generator (#2010) 2019-03-18 20:15:50 -06:00
Raul Jordan
c1a9937760
Post ChainStart Validator Activation (#1934)
* implemented all the merkle func signatures

* branch indices complete

* check for index out of range in generating merkle proof

* completed full tests for sparse merkle trie impl

* lint

* formatting

* gazelle

* commentary

* ivan comments

* fmt

* get rid of the deposit trie

* recalculate trie when eth1 data changes

* default data response recalculates tree

* update merkle trie to use raw bytes

* use the new verify merkle root func

* builds

* if default data response historical deposits are empty, return the deposit root at the contract at the time

* work on trie

* trying again with more logging

* keep track of merkle trie indices, use correct big int ops

* use uint for merkle idx

* add todo

* update ticker correctly

* fix config and remove unnecessary logs

* readd plus one fix

* clarify some details

* weird imports spacing

* gazelle, lint

* fix tests using the new deposit trie

* builds but tests still fail

* rpc tests

* lint

* tests pass

* bazel lint

* rem commented block

* revert att slot fix

* preston comments

* comments

* fix build

* address last comment

* use counter

* imports
2019-03-12 00:05:55 -04:00
Preston Van Loon
a19cb1864e Tracing additions (#1747) 2019-02-27 19:55:47 -08:00
Preston Van Loon
28e360665d
Complain if contract address changes (#1724)
* complain if wrong contract address

* add comment
2019-02-26 13:40:17 -05: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
terence tsao
b6cc79fa2a
Save Validator Public Key -> Index in DB (#1690) 2019-02-25 09:37:02 -08:00
Nishant Das
f5c88e1bcb
Test Syncing with Another Fully Synced Service (#1594)
* clean up test

* adding test setup

* add chainstart check to sync querier

* goimports

* goimports

* backend cleanup

* adding getters

* lint

* moving to db

* gazelle

* adding more services setup

* adding more changes

* adding different test setups

* other merge issues

* imports

* fixing keys

* get intial sync able to be set up

* new changes and gazelle

* use simulated p2p

* everything finally works

* unexport fields

* revert changes from merge

* remove mock server

* add documentation

* gazelle

* add another node

* review comments

* fix tests
2019-02-23 11:36:20 +05:30
Raul Jordan
b0f5324303
Implement BLS Based RANDAO (#1633)
* 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
2019-02-19 23:07:28 -06:00
Raul Jordan
ab511cb022
Move Deposit Encoding to Helpers Package (#1644)
* move deposits

* finish moving deposit helpers
2019-02-19 12:05:34 -06:00
terence tsao
9f64ee7ecf
Remove Processed Block Operations from DB (#1626) 2019-02-18 15:34:49 -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
Raul Jordan
e052e457df
Remove Old References to Block Vote Cache (#1585)
* rem references to vote cache

* fix build
2019-02-14 08:54:29 -06: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
Preston Van Loon
721a3bfb6a Pending deposits db (#1475)
* Update config for deposits processing

* Add pending deposits database methods

* oops forgot the files

* move the lock after the nil check

* test inclusion behavior

* Update db.go

* Add debug logs if processing nil data

* missing return statement

* /before/until/
2019-02-04 21:47:17 +08:00
Raul Jordan
088507af66
Initialize State from ChainStart Deposits in POWChainService (#1474)
* tests passing once again in db package

* fixed all tests

* revert some weird p2p changes made accidentally

* fix repeated code

* build fixed

* fix p2p

* fix all tests
2019-02-03 16:44:48 -06:00
Raul Jordan
cec6c8de83 Standardize Naming of Shared Packages, Remove Deprecated Packages (#1435)
* rem txpool

* standardize repo shared utils, remove deprecated items

* complete

* package lvl godoc
2019-01-31 10:53:58 +08:00
terence tsao
665f3f885c
New Operation Service Part 1 - Sync and DB connection (#1437) 2019-01-30 20:48:50 +01:00
Raul Jordan
98a4274b81
Refactor ChainService for Synchronous Tests and ChainStart (#1347)
* can now test blockchain service synchronously

* completed chainstart listener

* fix comment

* completed refactor

* fix

* fix build

* rem genesis fetch

* fix broken

* fixed concurrency bug

* comments
2019-01-28 19:59:37 +08:00
Raul Jordan
4d43f5128a Remove Simulator Service (#1392)
* remove all instances of simulator service

* fix flag decl

* fix lint
2019-01-27 12:51:44 -08:00
Preston Van Loon
592c5c3d92 Refactor hashing of beaconblock to shared (#1315)
* Add beacon block hash function

* Refactor/remove old hash method

* gazelle
2019-01-15 00:41:20 +08:00
Nishant Das
bb7b0a324b
Fix Bug On Startup Using Genesis.json (#1258)
* fix bug

* making requested changes

* new changes

* changing initialize state

* remove genesis.json and references

* remove log

* readme

* readme

* remove reference
2019-01-09 11:03:57 +08:00
terence tsao
1314077a4d
Code Clean Up Part 1 - Core Package (#1216) 2019-01-01 09:17:44 -08:00
Nishant Das
9db1002d87
Updating Genesis Block to Spec (#1172)
* Updating to spec

* addressing review comments
2018-12-25 14:47:07 +08:00
Raul Jordan
5d26efcfaa
Deprecate types.BeaconState with pb.BeaconState Generated Proto (#1164) 2018-12-23 16:51:04 -06:00
Preston Van Loon
10f45744d6
Use gogo protobuf as the protoc compiler (#1165)
* first commit, remote att types

* no more agg attestation proto

* regen mock

* only attestations

* proto

* att process

* fix att references

* more tests passing

* use att protos

* complete

* change visibility

* use gogoprotobu
2018-12-23 15:34:59 -05:00
Raul Jordan
1065617087 Replace Attestation Type Primitive With Proto Generated Type (#1149)
* first commit, remote att types

* no more agg attestation proto

* regen mock

* only attestations

* proto

* att process

* fix att references

* more tests passing

* use att protos

* complete

* Update dependency com_github_deckarep_golang_set to v1 (#1159)

* Update dependency com_github_edsrzf_mmap_go to v1 (#1160)

* Update dependency com_github_go_stack_stack to v1 (#1161)

* Update dependency com_github_rs_cors to v1 (#1162)

* Update dependency in_gopkg_urfave_cli_v1 to v1 (#1163)

* change visibility
2018-12-22 15:30:59 -05:00
Raul Jordan
e49a190754
Replace Types of Block Primitives With Proto Generated Types (#1137)
* refactor repo to use protos

* removed block successfully in types

* db package updated

* db, core passing

* chain service done

* no more block instances

* all pass

* deprecate all block protos

* tests pass
2018-12-20 17:00:38 -05:00
Raul Jordan
a99de08562
Merge Active/Cystallized State (#1019) 2018-12-01 16:09:12 -06:00
Jie Hou
aad64d113a Auto Clean Block Vote Cache (#972)
* WIP: Dummy db clean service

* [WIP. NOT READY FOR REVIEW] Add DB cleanup routine that cleans block vote cache

* Add missing bazel config

* Put DB clean behind a CLI flag

* Address review comments

* Fix error handling
2018-11-28 17:02:35 +08:00
Nishant Das
16b04699d0 Allow Initial Sync to Work with Simulator (#669)
* polling interval

* adding proto message

* changing proto messages

* changing naming

* adding slot functionality

* initial sync working

* new changes

* more sync fixes

* its working now

* finally working

* add tests

* fix tests

* tests

* adding tests

* lint

* log checks

* making changes to simulator

* update logs

* fix tests

* get sync to work with crystallized state

* fixing race

* making requested changes

* unexport

* documentation

* gazelle and fix merge conflicts

* adding repeated requests

* fix lint

* adding new clock , db methods, and util func

* revert change to test

* gazelle

* add in test

* gazelle

* finally working

* save slot

* fix lint and constant
2018-11-21 10:00:36 -08:00
Andrei Ivasko
85653335f1 Standartize params for BeaconChain and Validator projects (#796)
* Standardize params for BeaconChain and Validator projects

* gofmt

* various changes to bring up to standards

* lint

* linter 2, not sure why travis complains

* revert service_test.go
2018-11-19 00:39:35 +08:00
Jie Hou
0de655eaab Move BlockVoteCache out of ActiveState (#739) 2018-11-11 08:54:17 -08:00
terence tsao
4c6565d419 Integers to Bytes Helper Methods (#734)
* Change validator functions done

* implemented helper methods to convert int to bytes

* use them across prysm

* bazel gazelle

* forgot build.bazel
2018-11-08 11:52:51 -05:00
Raul Jordan
81ff9fd7e3
Implement GHOST Beacon Chain Fork Choice Rule (#643) 2018-10-17 23:23:18 -05:00
Yutaro Mori
c00a1d3132 Replace LevelDB with Bolt (#666) 2018-10-17 01:11:24 -05:00
Nishant Das
5117e6d195 Refactor Crystallized State (#641) 2018-10-15 06:17:07 -07:00
Yutaro Mori
ce99bd7605 Refactor to Create DB Package (#582) 2018-10-05 13:14:50 -04:00