Commit Graph

123 Commits

Author SHA1 Message Date
terence tsao
b23ccc608c
Update Validator Status and Process Ejections (#1186) 2018-12-29 09:24:11 -08:00
terence tsao
e03355f141
Helpers for Updating Validator Status (#1181) 2018-12-29 08:55:16 -08:00
Raul Jordan
f5abc780ab
Verify Block Proposer RANDAO (#1104) 2018-12-27 23:19:32 -06:00
Nishant Das
e95e3ed517
Update State Transitions to Process Block Roots (#1176)
* Adding block root updating functions

* Adding block root updating functions

* Commiting stuff

* Updating test

* permissions

* adding tests

* fixing tests and gazelle

* Revert randao changes

* Comment

* Addressing review

* indenting
2018-12-27 14:48:09 +08:00
terence tsao
c24e6806f3
Implement Validator Registry Delta Chain Tip Helper for Validator Rotation (#1179) 2018-12-26 21:47:05 -08:00
Nishant Das
5804dcfb67
Add Batch Syncing for Initial Sync (#1119)
* adding proto objects

* simulator changes

* adding stuff for initial sycn

* more changes

* finally fixed test

* fixing tests and sync

* test fix

* adding batched block response

* remove types references

* fix tests

* addressing review

* removing genesis block

* updating protos

* fix merge conflicts

* file permissions
2018-12-26 22:16:46 +08:00
terence tsao
5b967fc6ce
Implement Crosslink Processing (#1167) 2018-12-24 06:58:18 -08:00
terence tsao
c7a92b88c8
Epoch Processing: Receipt Root, Justification and Finalization (#1158) 2018-12-23 22:36:09 -08: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
terence tsao
6eb2d816b4
Implemented ValidatorBalance field in Proto with Some Helpers (#1139) 2018-12-19 16:49:22 -08:00
Nishant Das
e92032346f Partial Implementation of the Slot Processing Routine (#1083) 2018-12-19 00:18:42 -05:00
Raul Jordan
708daae04f
Implement Attestation Processing Block Operations (#1088) 2018-12-14 13:35:53 -06:00
terence tsao
122ad6ef3c
Implemented Get_block_root Helper Function (#1096) 2018-12-13 11:35:11 -08:00
Raul Jordan
5e85133e16
Implement Casper Slashing Block Operations (#1086) 2018-12-13 10:35:50 -06:00
Raul Jordan
94e4bc1f18
Implement Proposer Slashing Block Operations (#1076) 2018-12-12 10:18:50 -06:00
terence tsao
ecbf50c2fe Use Validator Status in Proto (#1082)
* use validator status code in proto

* typo & constant casing
2018-12-11 22:40:17 -06:00
Preston Van Loon
b4f8c0afaf
Add new ShardAndCommitteesAtSlot from spec (#1075)
* Add new ShardAndCommitteesAtSlot method

* remove debug print

* one more test condition for fun

* simplify
2018-12-11 21:01:27 -05:00
terence tsao
8402a1dd61
Part 1 of Cleaning Up State Proto (#1070) 2018-12-11 07:46:01 -08:00
terence tsao
3c7b5bb13a
Part 3 of Restructuring BeaconBlock Proto - Remove Special Record (#1067) 2018-12-10 09:00:34 -08:00
terence tsao
1393e808d4
add in block body to proto (#1066) 2018-12-09 17:13:53 -08:00
terence tsao
9a441fe7bf
Part 1 of Restructuring BeaconBlock Proto (#1065) 2018-12-09 11:45:47 -08:00
Preston Van Loon
7b6c646c9e
Add DepositParametersRecord to protobuf types (#1042)
* Add DepositParametersRecord

* _hash32
2018-12-05 08:59:36 -05:00
Preston Van Loon
f74a18d255
Add a Uint32List type in a common proto package (#1033) 2018-12-04 09:34:14 -05:00
Preston Van Loon
6b0ad4e470
Update AttestationRecord and CrosslinkRecord Proto (#1027)
* update beacon-state proto to new spec

* AttestationData

* use bazel's pb.go

* boundry -> boundary

* update beacon block proto msg

* Update attestation record proto

* and crosslink record too

* pendingAttestationRecord is not deprecated
2018-12-03 23:35:53 -05:00
terence tsao
b8a9e839e7
clean up BeaconBlock's validator fields (#1037) 2018-12-03 19:05:22 -08:00
terence tsao
121654ff12
Removed Deprecated BeaconBlock Fields (#1035) 2018-12-03 08:10:47 -08:00
Preston Van Loon
8620311bfc
Rename crosslinks to latest crosslinks (#1032) 2018-12-02 22:10:47 -05:00
Preston Van Loon
621d5fad72
Remove unused fields from BeaconState (#1031) 2018-12-02 21:55:34 -05:00
terence tsao
57038551d6
Update ValidatorRecord Proto (#1030) 2018-12-02 18:17:48 -08:00
Preston Van Loon
7cd6223755
Rename recent block hashes (#1029)
* update beacon-state proto to new spec

* AttestationData

* use bazel's pb.go

* boundry -> boundary

* Rename RecentBlockHashes to LatestBlockHashes
2018-12-02 15:25:55 -05:00
Preston Van Loon
e6d550a2c6
Refactor fork data (#1028)
* update beacon-state proto to new spec

* AttestationData

* use bazel's pb.go

* boundry -> boundary

* Refactor fork data

* comment
2018-12-02 15:19:49 -05:00
Preston Van Loon
bbf3c72987
Update beacon block proto to match spec (#1026)
* update beacon-state proto to new spec

* AttestationData

* use bazel's pb.go

* boundry -> boundary

* update beacon block proto msg

* comment and deprecate AggregatedAttestation
2018-12-02 15:12:28 -05:00
Preston Van Loon
892357b348
Update beacon-state proto to new spec (#1025)
* update beacon-state proto to new spec

* AttestationData

* use bazel's pb.go

* boundry -> boundary
2018-12-02 14:49:57 -05:00
Raul Jordan
a99de08562
Merge Active/Cystallized State (#1019) 2018-12-01 16:09:12 -06: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
Raul Jordan
891dc2e2de
Define BeaconState Core Type and Protobuf Definition (#863)
* define protos for beacon state

* tests pass

* address feedback
2018-11-20 11:43:07 -08:00
Nishant Das
f46ee335bd
Allow Sync Service to Query State Of Network (#787)
* adding proto messages

* adding fields

* adding new service

* new changes

* checking in file from syncFix

* fixing test

* add test

* adding to node

* goimports

* adding query service to sync services

* sync working

* finally works

* fix test

* lint

* fix build

* fix test
2018-11-19 09:59:11 +08:00
terence tsao
3c6952c510
Synchronize Beacon Node with Spec (#719) 2018-11-08 09:19:39 -08:00
Raul Jordan
81ff9fd7e3
Implement GHOST Beacon Chain Fork Choice Rule (#643) 2018-10-17 23:23:18 -05:00
terence tsao
dc8d40d10d Replace Dynasty with Validator Set Change (#655) 2018-10-13 21:12:06 -05:00
terence tsao
efeb6976d1
Align Block and State Field Names with Spec (#628) 2018-10-09 19:34:50 -07:00
terence tsao
1c7af71774
Add SpecialRecord Type and Updated Config (#624) 2018-10-06 08:30:15 -07:00
Raul Jordan
e10baf7c80
Validator Assignment RPC Beacon Node Stream (#563) 2018-09-26 21:34:35 -05:00
Preston Van Loon
5bc324d2f1 Change pubkey from uint64 to bytes (#561)
* Change pubkey from uint64 to bytes

* add the rebuilt proto pb.go
2018-09-24 22:01:26 -05:00
Raul Jordan
78ccea9865 Refactor ValidatorSlot RPC and Casper to Return ValidatorSlotAndResponsibility (#565)
* slot responsibility casper refactor

* fix
2018-09-24 23:18:27 +08:00
Raul Jordan
673c4f840f
Streaming Validator Assignment Service Definition (#554) 2018-09-22 13:19:34 -05:00
Nishant Das
53508d6bec Update Rewards to Align With New Spec (#504) 2018-09-21 14:56:39 -05:00
Raul Jordan
190a976d3d
Validator Clients Use an Internal Clock to Determine Slot Responsibility (#467) 2018-09-21 09:32:20 -05:00
terence tsao
ddfe1715c9 RPC methods for Validators to Get ShardID, Index and Slot (#526) 2018-09-17 22:36:09 -04:00
Nishant Das
cddae7a306
Implement RPC Messaging Between Validators (#475)
* Adding Proto files

* Move to shared package

* adding attestation sub

* gazelle

* attestation check

* proposal finished

* Add in attesters responsibilities

* fixing dependency issues

* adding topics

* refactoring tests

* Adding more tests

* adding more changes

* gazelle

* removing attester p2p

* remove mock

* changing to new proposer model

* changing tests

* making changes

* gazelle

* adding gomock

* adding rpc methods, reverting changes to other proto files

* gazelle and test changes

* adding tests

* adding mocks and tests

* gazelle

* fixing merge issues

* lint

* lint
2018-09-16 09:12:36 +08:00
terence tsao
ae84cfcfa2
Implement Proposer Attestation Check for Block Validity (#508) 2018-09-15 07:51:17 -07:00
terence tsao
9639161fcc
Aligning With Latest 2.1 Spec (#513) 2018-09-13 17:36:57 -07:00
terence tsao
a630abae59
Dynasty Transition During Block Processing (#498) 2018-09-11 20:17:20 -07:00
terence tsao
861b960ed9
Implement Attester Responsibilities for Demo (#487) 2018-09-11 10:08:31 -07:00
Ivan Martinez
d4e8de95d8 Change IndicesForSlots to ShardsAndCommitteesForSlots (#481)
* Change IndicesForSlots to ShardsAndCommitteesForSlots

* Capitalize function properly
2018-09-09 11:05:36 +08:00
terence tsao
b0f5ef0da0
Save Attestation and AttestationHashes to DB (#472) 2018-09-08 18:52:18 -07:00
terence tsao
d4209b7357 beacon: Process Crosslink During Cycle Transition (#482)
* Revert "Add Skip Coverage Condition in Coverage.sh (#416)"

This reverts commit 72a5dd1cf4.

* add coverage.sh back

* save attestations to db

* added tests

* use them in service.go

* process crosslink records

* revert

* revert

* revert

* test
2018-09-08 17:20:06 +02:00
Raul Jordan
ee91be2c4a
validator: Implementing Partial Implementation of Proposer Responsibility (#441)
* implementing basic proposer functionality

* checked in gomocks

* fix typo

* refactor using feeds

* use event feeds for assignment

* sending the latest beacon block over announcement chan

* 100 coverage, using feeds

* gazelle

* include parent hash from prev canonical block and slot number + 1

* including all other prop fields

* fix build

* proposer rpc method tests, implemented in beacon chain side

* godoc
2018-09-04 23:35:32 -04:00
Nishant Das
4891f68929
Persist Blocks and State in DB (#440)
* Persist Dag

* Add schema

* Add new message

* add mapping

* Adding check to save block

* Removing blocks mapping

* Make changes to block processing

* Change from mapping to a slice of hashes

* Adding tests to core

* adding more tests

* Fixing service test

* Add comments and fix bazel

* fix lint

* fix conflicts

* addressing review comments

* Removing references to active

* fixing tests with active state

* Protytype for #440: Persist blocks and latest state in DB

* simplify code

* removing block registry

* fix test

* adding block removal/iterator

* Addressing review comments

* Addressing comments

* removing extra line

* making vars private and adding canonical key

* fix lint

* splitting methods

* adding more changes

* lint

* improving coverage

* removing decodeslotnumber

* gazelle

* remove todos

* addressing preston's comments

* remove slotnumber

* lint
2018-09-03 00:44:03 +08:00
terence tsao
8ce739adfb Add LastJustifiedSlot in Crystallized State Field (#454)
* Revert "Add Skip Coverage Condition in Coverage.sh (#416)"

This reverts commit 72a5dd1cf4.

* add coverage.sh back

* new justifiedSlot field in crystallized state

* test coverage
2018-09-02 14:34:29 +08:00
Ivan Martinez
d30d81a608 Rename all mentions of height to slot (#456)
#442
2018-09-01 12:01:53 -04:00
Preston Van Loon
b02042dbe9 shared: Split P2P Topics And Introduce Middleware (Adapters) (#421) 2018-08-29 11:32:54 -05:00
terence tsao
6389877154
Part 4 of Aligning Beacon Chain with Latest 2.1 - Bootstrapping Genesis (#430) 2018-08-25 11:59:46 -07:00
Raul Jordan
d3b5a7c67b
beacon: Implement Beacon Node gRPC Server Streams (#400)
* remove client helper in internal

* tidying up the sharding client project

* update all docs

* implementing beacon rpc server methods

* address prs

* begin coverage

* regen proto

* include announcement chans

* tests pass, announcing as canonical only after block has passed all processing

* system functioning yay

* tests pass

* bootstrap validators

* default balance params

* fix lint

* fix all tests

* increasing cov

* 100% test cov rpc

* build file for internal

* typo

* graceful stop

* merge with Terence's PR

* address review comments

* fixed blockchain tests and lint

* added ethdb

* persists last simulated session

* cov

* ready

* fix lint

* fix cov tests

* fix lint

* config options for args

* fix lint

* lint fix
2018-08-17 21:34:56 -06:00
terence tsao
1f56c4304d
Part 1 of Aligning Core Blockchain Package with Latest 2.1 Spec (#371) 2018-08-13 17:58:37 -07:00
Raul Jordan
cd90598a90
client: Update Attester to Use Beacon Node RPC, Replacing SMC Completely (#365) 2018-08-09 17:54:59 -05:00
Nishant Das
2cf7fa0174
Check Last Finalized Epoch (#357)
* Adding proto topics

* Adding crystallized state request

* Reverting shanges to proto

* Adding db checks

* get crystallised state

* Finalize epoch for mapping

* more changes

* cleaning up main routine

* adding tests

* fix test

* Adding ability to save blocks

* Adding block fetcher

* Another test for setting finalized epoch

* adding final tests

* finished tests

* adding comments

* gazelle

* Making requested changes

* Fixing lint

* stop sync from exiting

* fixing lint

* lint

* Adding new request type to proto

* Making changes to block/state requests

* Change tests

* fixing error messages

* gazelle and lint

* adding back crystallised state

* fix tests

* Fixing merge conflicts

* Addressing review comments

* Changing back to one service

* removing  case
2018-08-07 20:12:10 +08:00
terence tsao
bfaa248b39
Refactor Proto Struct to Be More Semantic (#381) 2018-08-05 16:23:31 -07:00
terence tsao
0a5e091ad3
Fixed Deficiency in Apply Reward & Refactored Blockchain Functions (#367) 2018-08-02 10:47:49 -07:00
Raul Jordan
3a5b68ddc2
beacon: Beacon Chain RPC Service Proto Definitions (#360) 2018-08-01 00:35:08 -05:00
terence tsao
2c4bfeeef0
sync functions for active and crystallized states (#358) 2018-07-31 18:13:54 -07:00
Raul Jordan
13a011ce5f
proto: Structure Protos for Beacon and for Sharding (#359) 2018-07-31 13:54:45 -05:00