Commit Graph

162 Commits

Author SHA1 Message Date
Raul Jordan
233171d17c
[Service Config Revamp] - Sync Service With Functional Options (#9859)
* sync config refactor

* rem

* rem

* testing

* gaz

* next

* fuzz

* build

* fuzz

* rev

* log

* cfg
2021-11-05 19:08:58 +00:00
Raul Jordan
7974fe01cd
[Service Revamp] - Powchain Service With Functional Options (#9856)
* begin powchain service refactor

* begin refactor

* powchain passes

* options pkg

* gaz

* rev

* rev

* comments

* move to right place

* bazel powchain

* fix test

* log

* contract addr

* happy path and comments

* gaz

* new service
2021-11-04 14:19:44 -04:00
Radosław Kapka
5b3375638a
Improve description of datadir flag (#9809)
* Improve description of `datadir` flag

* improve doc
2021-10-22 12:53:13 +00:00
Raul Jordan
a797a7aaac
Refactor Web Authentication to Use Auth Token (#9740)
* builds

* initialize auth token from scratch

* change auth

* add improvements

* moar auth fixes

* web auth changes running

* url encode

* tests

* gaz

* navigate auth

* separate line

* auth token

* 304

* persistent auth tokens and jwts

* fixed up test

* auth token path test and integration test

* auth token test

* auth token command

* gaz

* gaz

* Radek feedback

* fix up

* test

* Update validator/rpc/auth_token.go

Co-authored-by: Radosław Kapka <rkapka@wp.pl>

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2021-10-20 16:37:05 +00:00
Raul Jordan
975f0ea1af
[Service Config Revamp] - Blockchain Initialization (#9783)
* viz

* unexport config

* builds

* viz

* viz

* register cfg

* fuzz

* blockchain opts

* deepsource

* rename flag opts
2021-10-18 17:48:05 +00:00
terence tsao
ea9ceeff03
Various clean up before v2 (#9672)
* Update package names

* Various clean up

* Gazelle

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-24 17:42:16 +00:00
Radosław Kapka
12480e12b2
Add flags for disabling selected API (#9606)
* Add flags for disabling selected API

* tests

* build file

* Use comma-separated modules

* test fix

* fix gateway tests

* fix import in flag tests
2021-09-24 09:25:42 +00:00
Raul Jordan
a9a4bb9163
Move Shared/Testutil into Testing (#9659)
* move testutil

* util pkg

* build

* gaz

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-23 18:53:46 +00:00
Nishant Das
b9ad81db50
bump it up (#9657) 2021-09-23 09:20:19 -05:00
Raul Jordan
f3d6dbcc1e
Move Shared/Params Into Config/Params (#9642)
* config params into pkg

* gaz

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-21 19:59:25 +00:00
Radosław Kapka
26893bcb8c
Production version of Altair Eth APIs (#9640)
* internal prefix in proto services

* half-baked inmplementation

* rename v1 to eth

* use router and remove old flag

* uncomment cors

* update v2 methods in proto services

* move adding path prefix after param processing

* remove unneeded code

* remove flag

* fix e2e

* uncomment sync committee e2e

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-09-21 19:20:57 +00:00
Raul Jordan
eebcd52ee6
Miscellaneous Packages from Shared Into Proper Folders (#9638)
* slashutil

* builds

* interop

* viz

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-21 18:11:16 +00:00
Nishant Das
b943f7bce5
Add Flag To Parameterize Number of Peers in A Subnet (#9631)
* add flag

* use old value

* gaz

* raul's review
2021-09-21 07:55:52 +00:00
Raul Jordan
7dadc780b8
Move Shared Packages into Math/ and IO/ (#9622)
* amend

* building

* build

* userprompt

* imports

* build val

* gaz

* io file

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-17 21:55:24 +00:00
Raul Jordan
8f0008c45a
Move Related Packages Into API/ Pkg (#9619)
* begin on api pkg

* build

* build

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-16 19:55:51 +00:00
Raul Jordan
3daa2d8a18
Remove Deprecated Slasher (#9608)
* delete slasher

* rem slasher

* fix build

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-16 18:26:58 +00:00
Raul Jordan
495e92ce9f
Create Runtime Package for Moving Several Packages in Shared/ (#9588)
* add maxprocs

* add prereqs

* add tos and version pkg

* add in all runtime packages

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-16 09:46:29 +00:00
Raul Jordan
5230af0e0c
Move EndtoEnd Tests to Testing/ Folder (#9586)
* endtoend to testing/

* gaz

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-15 14:42:05 +00:00
terence tsao
31a78ab22a
Create config package for Shared/featureconfig (#9593)
* add config/features

* Gazelle

* Gazelle

* Fix build

* Go mod tidy

* active cache

Co-authored-by: rauljordan <raul@prysmaticlabs.com>
2021-09-15 01:18:39 +00:00
Raul Jordan
9935ca3733
Move Shared/ Subpackages Into Monitoring/ Folder (#9591)
* add tracing

* monitoring pkg

* move prom

* Add client stats

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-14 20:59:51 +00:00
Raul Jordan
7d5f30b01e
Delete Deprecated Flags and Old Slashing Protection for V2 (#9453)
* delete deprecated flags and old slashing protection schema

* remove toledo mentions

* build

* do not remove migration
2021-08-26 13:48:25 -05:00
Raul Jordan
eac542a8ac
Change Eth2 Repository Names (#9425)
* eth2 repo name changes

* rem sha

* use consensus spec terminology and pin sha
2021-08-19 13:00:57 -05:00
Raul Jordan
136b157d00
Better Slashing Protection Import/Export User Experience (#9355)
* failure mode if command goes wrong

* improve export

* fix struct orderw

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-08-11 17:24:24 +00:00
Preston Van Loon
938a038c42
Fix //... for darwin (#9273)
* Fixes

* More manual tags

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-07-23 18:26:49 +00:00
Preston Van Loon
d6bd619429
Bazel: minimal test build transitions (#9122)
* Add build transitions for minimal config based tests

* respect existing gotags

* clean up import

* Add some commentary

* gaz

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: rauljordan <raul@prysmaticlabs.com>
2021-06-30 19:22:09 +00:00
Preston Van Loon
24d17a536c
Return an error on unrecognized arguments when running default commands in Prysm (#9129)
* Return an error on unrecognized arguments when running default commands in Prysm

* fix cases for subcommands

* Deepsource suggestion
2021-06-30 16:24:04 +00:00
Radosław Kapka
940ce0c292
Make Eth APIs flag name implementation agnostic (#9112)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-06-28 15:12:39 +00:00
Raul Jordan
a860648960
Reduce Usage of Eth2 Terminology in Prysm (#9104)
* remove all mentions

* more changes

* folder by folder

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-06-26 19:00:33 +00:00
Radosław Kapka
43655e6c04
Remove verbatim strings with flag names on startup (#9093)
* Remove verbatim strings with flag names on startup

* gzl

* fix visibility

* gaz

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-06-24 17:20:47 +00:00
Radosław Kapka
12403d249f
[Feature] - API Middleware (#8926)
* HTTP proxy server for Eth2 APIs (#8904)

* Implement API HTTP proxy server

* cleanup + more comments

* gateway will no longer be dependent on beaconv1

* handle error during ErrorJson type assertion

* simplify handling of endpoint data

* fix mux v1 route

* use URL encoding for all requests

* comment fieldProcessor

* fix failing test

* change proxy port to not interfere with e2e

* gzl

* simplify conditional expression

* Move appending custom error header to grpcutils package

* add api-middleware-port flag

* fix documentation for processField

* modify e2e port

* change field processing error message

* better error message for field processing

* simplify base64ToHexProcessor

* fix json structs

* Run several new endpoints through API middleware (#8922)

* Implement API HTTP proxy server

* cleanup + more comments

* gateway will no longer be dependent on beaconv1

* handle error during ErrorJson type assertion

* simplify handling of endpoint data

* fix mux v1 route

* use URL encoding for all requests

* comment fieldProcessor

* fix failing test

* change proxy port to not interfere with e2e

* gzl

* simplify conditional expression

* Move appending custom error header to grpcutils package

* add api-middleware-port flag

* fix documentation for processField

* modify e2e port

* change field processing error message

* better error message for field processing

* simplify base64ToHexProcessor

* fix json structs

* /eth/v1/beacon/states/{state_id}/validators

* /eth/v1/beacon/states/{state_id}/validators/{validator_id}

* /eth/v1/beacon/states/{state_id}/validator_balances

* /eth/v1/beacon/states/{state_id}/committees

* allow skipping base64-encoding for query params

* /eth/v1/beacon/pool/attestations

* replace break with continue

* Remove unused functions (#8924)

Co-authored-by: terence tsao <terence@prysmaticlabs.com>

* Process SSZ-serialized beacon state through API middleware (#8925)

* update field names

* Process SSZ-serialized beacon state through API middleware

* revert changes to go.mod and go.sum

* Revert "Merge branch '__develop' into feature/api-middleware"

This reverts commit 7c739a8fd71e2c1e3a14be85abd29a59b57ae9b5, reversing
changes made to 2d0f8e012ecb006888ed8e826b45625a3edc2eeb.

* update ethereumapis

* update validator field name

* update deps.bzl

* update json tags (#8942)

* Run `/node/syncing` through API Middleware (#8944)

* add IsSyncing field to grpc response

* run /node/syncing through the middleware

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* Return HTTP status codes other than 200 and 500 from node and debug endpoints (#8937)

* error codes for node endpoints

* error codes for debug endpoints

* better comment about headers

* gzl

* review comments

* comment on return value

* update fakeChecker used for fuzz tests

* fix failing tests

* Allow to pass URL params literally, without encoding to base64 (#8938)

* Allow to pass URL params literally, without encoding to base64

* fix compile error

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* Process SSZ-serialized beacon state through API middleware (#8925)

* update field names

* Process SSZ-serialized beacon state through API middleware

* revert changes to go.mod and go.sum

* Revert "Merge branch '__develop' into feature/api-middleware"

This reverts commit 7c739a8fd71e2c1e3a14be85abd29a59b57ae9b5, reversing
changes made to 2d0f8e012ecb006888ed8e826b45625a3edc2eeb.

* update ethereumapis

* update validator field name

* update deps.bzl

* update json tags (#8942)

* Run `/node/syncing` through API Middleware (#8944)

* add IsSyncing field to grpc response

* run /node/syncing through the middleware

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* Return HTTP status codes other than 200 and 500 from node and debug endpoints (#8937)

* error codes for node endpoints

* error codes for debug endpoints

* better comment about headers

* gzl

* review comments

* comment on return value

* update fakeChecker used for fuzz tests

* fix failing tests

* Allow to pass URL params literally, without encoding to base64 (#8938)

* Allow to pass URL params literally, without encoding to base64

* fix compile error

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* unused import

* Return correct status codes from beacon endpoints (#8960)

* Various API Middleware fixes (#8963)

* Return correct status codes from `/states` endpoints

* better error messages in debug and node

* better error messages in state

* returning correct error codes from validator endpoints

* correct error codes for getting a block header

* gzl

* fix err variable name

* fix nil block comparison

* test fixes

* make status enum test better

* fix ineffectual assignment

* make PR unstuck

* return proper status codes

* return uppercase keys from /config/spec

* return lowercase validator status

* convert requested enum values to uppercase

* validator fixes

* Implement `/beacon/headers` endpoint (#8966)

* Refactor API Middleware into more manageable code  (#8984)

* move endpoint registration out of shared package

* divide main function into smaller components

* return early on error

* implement hooks

* implement custom handlers and add documentation

* fix test compile error

* restrict package visibility

* remove redundant error checking

* rename file

* API Middleware unit tests (#8998)

* move endpoint registration out of shared package

* divide main function into smaller components

* return early on error

* implement hooks

* implement custom handlers and add documentation

* fix test compile error

* restrict package visibility

* remove redundant error checking

* rename file

* api_middleware_processing

* endpoints

* gzl

* remove gazelle:ignore

* merge

* Implement SSZ version of `/blocks/{block_id}` (#8970)

* Implement SSZ version of `/blocks/{block_id}`

* add dependencies back

* fix indentation in deps.bzl

* parameterize ssz functions

* get block ssz

* update ethereumapis dependency

* gzl

* Do not reuse `Endpoint` structs between API calls (#9007)

* code refactor

* implement endpoint factory

* fix test

* fmt

* include pbs

* gaz

* test naming fixes

* remove unused code

* radek comments

* revert endpoint test

* bring back bytes test case

* move `signedBeaconBlock` to `migration` package

* change `fmt.Errorf` to `errors.Wrap`

* capitalize SSZ

* capitalize URL

* more review feedback

* rename `handleGetBlockSSZ` to `handleGetBeaconBlockSSZ`

* rename `IndexOutOfRangeError` to `ValidatorIndexOutOfRangeError`

* simplify parameter names

* test header

* more corrections

* properly allocate array capacity

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
2021-06-15 10:28:49 -05:00
kasey
2b6c7e7b37
use urfave defaulting method for correct help text (#8972)
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2021-06-02 19:47:47 +00:00
terence tsao
bc27a73600
Various code cleanups (#8889) 2021-05-13 08:29:14 +02:00
ahadda5
8dd2915d3c
Unify gRPC Gateways into Single, Shared lib (#8799)
* moved validator/rpc/gateway under shared,  validator/rpc/web is not visiable to the new shared gateway

* decided to have one lib with two methods if needed, status and stop are the same, however New and Start are not

* moved beacon's gateway to shared and moved the main func to its own /server folder

* goftm

* gofmt

* removed the extra loggin

* reduce visibility

* tighter visibilty of the shared lib for beacon and validator only for now

* fix patterns , ctx needs to be first param

* fix comments

* gofmt

* added enum for the caller id

* added unit test for gateway

* deprecated .WithDialer to .WithContextDialer

* changed the string callerId to uint8, and rearranged the Gateway struct based on the compiler

* fix 1 based on comment

* iota type

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-05-04 17:20:58 +02:00
kasey
dace0f9b10
cli to push metrics to aggregator service (#8835)
* new prometheus metrics for client-stats metrics

* adds client-stats types beacause they are
  used by some of the prometheus collection code.
* new prometheus collector for db disk size
* new prometheus collector for web3 client
  connection status

* adds client-stats api push cli in cmd/client-stats

* adds api metadata to client-stats collector posts

* appease deepsource

* mop up copypasta

* use prysm assert package for testing
2021-05-03 09:57:26 -05:00
Victor Farazdagi
386b69f473
Fix comments (#8802)
* fix incorrect exported name in comments

* add comments to exported methods
2021-04-23 12:06:05 +00:00
Shay Zluf
d77c298ec6
Support authorised access to web 3 providers (#8075)
* jwt access token impl

* use secret or jwt

* rename

* separate method for splitting auth

* usage update

* Update beacon-chain/flags/base.go

Co-authored-by: Radosław Kapka <rkapka@wp.pl>

* Update beacon-chain/node/node.go

Co-authored-by: Radosław Kapka <rkapka@wp.pl>

* make things work

* removed unused code

* better, more flexible authorization

* move types and function to proper packages

* fix checking if endpoint is not set

* fix existing tests

* rename Endpoint field to Url

* Tests for HttpEndpoint

* better bearer auth

* tests for endpoint utils

* fix endpoint registration

* fix test build

* move endpoint parsing to powchain

* Revert "fix existing tests"

This reverts commit ceab192e6a78c106cf4e16a1bdf5399752a39890.

* fix field name in tests

* gzl

* add httputils dependency

* remove httputils dependency

* fix compilation issue in blockchain service test

* correct endpoint fallback function and tests

* gzl

* remove pointer from currHttpEndpoint

* allow whitespace in auth string

* endpoint equality

* correct one auth data Equals test case

* remove pointer receiver

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-04-15 11:02:02 +00:00
Victor Farazdagi
74d0134ee3
Weak subjectivity minor refactoring (#8715)
* Add IsWithinWeakSubjectivityPeriod helper method

* Add LatestWeakSubjectivityEpoch method

* ParseWeakSubjectivityInputString helper

* switch to Checkpoint

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-04-06 14:32:49 +00:00
Preston Van Loon
e477fdfd6d
Embedded mainnet genesis state + load genesis.ssz from file (#8614)
* Update rules_go and fix proto conflicts

* gaz

* Update generated code

* First pass inclusion of using baked states

* more emptypb fixes

* remove testnet genesis files, only embed mainnet

* Refactoring for SaveGenesisData, fix tests that use mainnet config but do not support mainnet genesis values

* a bit more refactoring, load genesis from a file. Needs tests still

* Add method to ensure an embedded genesis file also has the appropriate genesis block

* gofmt

* more clear error

* Check genesis fork version to ensure testnet config matches genesis file

* viz

* test for SaveGenesisData

* More genesis db method tests

* Merge

* Minor tweaks, lint, fmt, etc

* Add more test to genesis db methods

* Revert beacon-chain/state/stateV0/BUILD.bazel

* Update beacon-chain/db/iface/errors.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* PR feedback

* Update beacon-chain/db/kv/genesis.go

Co-authored-by: terence tsao <terence@prysmaticlabs.com>

* fmt.Errorf works better for nil errors

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-03-18 21:00:00 +00:00
Preston Van Loon
034a28710e
Add Prater config (#8613)
* Add Prater config

* Register flag everywhere

* gofmt

* Apply suggestions from code review

Co-authored-by: terence tsao <terence@prysmaticlabs.com>

* Update shared/params/testnet_prater_config.go

Co-authored-by: terence tsao <terence@prysmaticlabs.com>

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-03-17 14:14:07 +00:00
terence tsao
72be10f9a5
Ran go imports (#8582) 2021-03-09 19:56:05 +00:00
Raul Jordan
d215607e55
Add Goland Standard "cmd" Pattern for Slasher Binaries (#8542)
* vis

* gaz

* imports

* slasher img

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2021-03-03 18:37:57 +00:00
Raul Jordan
ff329df808
Add All Other Prysm CLI Entrypoints to "cmd" Folder (#8545)
* other cmd

* comments

* gaz

* gaz ignored file

* build

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-03 17:05:37 +00:00
Raul Jordan
090fbbf18c
Add Goland Standard "cmd" Pattern for Beacon-Chain Binaries (#8540)
* beacon chain cmd pattern

* imports spacing

* more import fix

* edit build file

* e2e viz

* amend e2e
2021-03-02 13:36:03 -06:00
Raul Jordan
cdea2debc9
Add Goland Standard "cmd" Pattern for Validator Binaries (#8541)
* validator cmd

* imports

* more imports

* e2e viz

* alias

* use native alias

* add actual

* fix macro

* work on fix e2e

* add viz

* gaz

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2021-03-02 12:58:40 -06:00
Raul Jordan
2624cd2b3c sharding: Completely Remove Geth, Create a Single Sharding Entry Point That Builds (#238)
Former-commit-id: b853fd1c3ea2284d30d7f3032cf83287c7198c10 [formerly c012daacceec9cb3497f1d066ee3ca2d20aa5b14]
Former-commit-id: 0a5a60c296f878c7057b25fc759dec2487363d30
2018-07-08 21:40:34 -05:00
Preston Van Loon
68eba02cc2 Remove most of the remaining geth code and set up bazel (#235)
* Remove most of the remaining geth code and set up bazel for this

* chmod +x

* Add flake check

* better flake detection


Former-commit-id: 5c332ecbf2923943f646f1fe40befa95be883329 [formerly 99590fc354514584700e5ce8d7d30a8a7d541f29]
Former-commit-id: e5f919b553fe698e98090965d34eb721990b5693
2018-07-07 13:23:19 -04:00
Raul Jordan
6918dc483b Eliminate More Unnecessary Dependencies: Whisper, Etc. (#229)
sharding: eliminate unnecessary dependencies

Former-commit-id: 0b6c06f979f1daa72557b79251f83a40356d6936 [formerly 22a70de8740e5a82a1db94070bbe7d8903f0a987]
Former-commit-id: a5ea8ad58f2e3302f773a308b7584ef3f4e79e02
2018-07-02 17:39:56 -05:00
Raul Jordan
324be9e556 sharding: eliminate contracts, swarm (#228)
Former-commit-id: 376a40f1e44b357287e186d75c23597239b71b7d [formerly 26860cf26e491ebd89ac3704f26256c4e94339ce]
Former-commit-id: c52a291c2f8a26274061a3897361a04eda740468
2018-07-02 15:22:55 -05:00
Raul Jordan
dafcfb2e18 Upstream Merge (#227)
sharding: merge upstream
Former-commit-id: 5129a4d5bc4395cd7c115b7f8db23541a512df3f [formerly e4f2b25a4277464c51b4c45384114a305464d3c4]
Former-commit-id: 2b4f0e356d3823889466d0f6ff22d5632f827f48
2018-07-02 14:25:06 -05:00
Preston Van Loon
60a5fc7f9b sharding: add debug flags to sharding (#218)
Former-commit-id: d5ae247e0cf4228f227b325812966ff3c0435a6f [formerly 288cbd8546d5d3715f5a948fc0d4a85851d8152b]
Former-commit-id: 27bb304720de6dc4a69603a5fae2917828a06ffc
2018-06-26 11:04:27 -05:00
Preston Van Loon
912b3b65bd FIx start/stop of ShardEthereum (#185)
* sharding: Fix mainchain.Client starting RPC connections during ShardEthereum.New. Fix graceful stop

* sharding: Just pass the cli.Context rather than keeping it on the shardEthereum

* sharding: add doc

* sharding: add doc

* Sharding: remove exgtra newline

* sharding:fix lint


Former-commit-id: fdaf8160245d9233b693f685ba6078e4b15fa279 [formerly f7fa71912b7d8340ede6cd08b357056fafbab014]
Former-commit-id: 0e8bfbbc579451178f76263364fdbcd00a91d651
2018-06-16 22:26:03 -04:00
Terence Tsao
1bd464aade updated shardConfig to config
Former-commit-id: ec3595f6111b15e2ea6a3ecd35e6a3934314a662 [formerly df7289f224ce6bc35ef9dd2ec6e129662aad3489]
Former-commit-id: ae8e1f1b95b113767cb3fa0e0835e59043ceca32
2018-06-13 10:37:23 -07:00
Terence Tsao
b41b8c823a sharding: use pointer for default config
Former-commit-id: 47354dddbeb7c5db47c79c5b929524d221f35814 [formerly 570a02de295c3d30c1b03327615dcb3d47c8c363]
Former-commit-id: 329af4b67168e0a58b7bae38c16cae4354fbf808
2018-06-12 20:11:07 -07:00
Terence Tsao
75015adc8a sharding: use shardConfig across shard codebase
Former-commit-id: a1a8597ff0d5249056feed2f1f888d46b35eccda [formerly 4da30c5de1366f140374410ff700043a778e9f97]
Former-commit-id: 9125d61ab20e9a6cedc3f63f69b6bdd152687190
2018-06-12 16:03:20 -07:00
Terence Tsao
7858e9abfc sharding/node: get shardID from cli, pass it to actor services
Former-commit-id: 0220101381cf92180c1003997e514260290548d5 [formerly 5ca29b99f069db4169d98508aeb10b9ea88b679b]
Former-commit-id: 23ce869125865eb86eea1ef20587b475f39f2ed5
2018-06-11 11:00:31 -07:00
Terence Tsao
c654446290 sharding/node: starting to parse shardID from cli
Former-commit-id: df0167b1675268a36b2293c8951ea282ee383c78 [formerly 6410dee77b426976e5d685f854f11e6837985c3c]
Former-commit-id: b29cc11669b443fb90dc27f99f7f8e1680e1debb
2018-06-11 08:41:59 -07:00
Raul Jordan
5e73a0705f sharding: comments
Former-commit-id: 96f657456147bf7d982d45af46dfd49d2ce47444 [formerly 7c21efd8264d66e80b6b3749d271c0ce57229a76]
Former-commit-id: a11ac85e2123a173dfb38ef7ae46cde9ec990fab
2018-06-06 14:46:26 -04:00
Raul Jordan
e17900ac18 sharding: graceful shutdown of all services
Former-commit-id: 47da16d4915e10d9755d641c5c4102eb8c90beed [formerly 0b3e95b7037fb7c3e00b0460e615cff64ac1844f]
Former-commit-id: da75e9d2766922d6fe375f8770795f2d6dde113c
2018-06-06 13:22:21 -04:00
Raul Jordan
5c68bfa381 sharding: nicer error messages on service start, stop problems
Former-commit-id: 0a8cf796dae889b4ee1a49d71d22a668905e109b [formerly e3e4a8844b1a0544b927d0ebfeff1b735e9ec957]
Former-commit-id: 89f0dcc554cac78900b43f64924f3fcea967f541
2018-06-06 11:04:20 -04:00
Raul Jordan
dd384d3a22 sharding: refactor based on new design doc
Former-commit-id: b2defb3e277217d0d5bef86f1d4078668791d251 [formerly 6a6bd5c309442805ccac942325e0feef69dd17ab]
Former-commit-id: 2a26568478ed072db7c8e299eb40644b1c7c10d2
2018-06-02 18:29:35 -04:00
Preston Van Loon
689800d065 Quick fixes (#141)
Sharding:

* Sharding: add actor flag to sharding group for app help

* Sharding: ensure rpcClient is not nil before calling Close()

* Sharding: revert shardingcmd.go comments

* Sharding: more address Str() fixes

Former-commit-id: 0b3d8b73ac1b20eb5c018a71be1d935a1fb860ef [formerly 6cd1df472713e95f6b9f8a0a7b6bbd88a5dd2ca2]
Former-commit-id: 90c7e1a70d46c1f889576a7f2f253a02414c3654
2018-05-28 20:32:10 -04:00
Raul Jordan
f2770fb5ff sharding: address comments, elim string references
Former-commit-id: 5d9f88908d94b4742424faa3a30862235ef4b073 [formerly 69a4d0eede29578ad645039d167f215b17224e32]
Former-commit-id: a1663091ce3d12e82c8fbd3d1ca5ffcffcad1c49
2018-05-22 18:35:03 -06:00
Raul Jordan
a363175bbc sharding: addressed comments, linters pass
Former-commit-id: af2dcc65c4c3891a67d4dcf06946537a94901a0a [formerly fe1c017c119100b522a5edcf674f11a8edab9eca]
Former-commit-id: e4dbbeb226d9ead45c244717f56deae2edd29bf1
2018-05-22 16:12:02 -06:00
Raul Jordan
404a1ddad0 sharding: address review comments, add observer package
Former-commit-id: 05b8804e0ba81e1fe22f7d930dc16f9e84e1c44c [formerly 52dd670a71f1abdfeb5dfd42c25b9f3ba9e64224]
Former-commit-id: 78bd95882d71a1cd28f442dac17fe8c1bbc34ccb
2018-05-22 12:42:49 -04:00
Raul Jordan
128f661ba5 sharding: update documentation to reflect new entry points
Former-commit-id: 44863031370aaa67d3d9b546be33a67fc277f153 [formerly 55b0b3525b42778b71010859abc391f28fafc00f]
Former-commit-id: cf0ee0753c7e9f1a8d53510fc091c685cac7e0e1
2018-05-22 11:33:46 -04:00
Raul Jordan
3f1aaa1648 sharding: travis passes, all entrypoints work, notary protocol working
Former-commit-id: 4c78ea56ad3950c97f53281ef49383f3f79b29b2 [formerly ea7931d5620d8d98f466731aed362ea1401f8d67]
Former-commit-id: 9ffb8a85f7a54b1f48d4f297468214ae37bc995d
2018-05-22 08:11:16 -05:00
Raul Jordan
49dc0dc4a5 sharding: fixed main entry point, linter errors
Former-commit-id: 705e95b849818683ab610b80f101278e6241b4d6 [formerly 925da4e8a6ef6d8e9d82ba9073666c2a26cd6c77]
Former-commit-id: a43a26be717cb63a0a8c03165e865d875ca11ed4
2018-05-22 07:47:35 -05:00
Raul Jordan
bb95a087d4 sharding: rename client package to node
Former-commit-id: 8c311050eb7fe3935642fd94eb08e0f1622ff811 [formerly e5fdf2de13229bdbd174cff41bba9cdc64c4424f]
Former-commit-id: bb4cf8b1c2b8858ea9ddb96242473486b165adfc
2018-05-22 06:16:57 -05:00
Raul Jordan
33cee9216c sharding: revamp sharding client config to single entrypoint
Former-commit-id: c9a959ba300f50f1c652189377859c2bcae04323 [formerly 5e0e9b9abed8a7d06b01d36266348e5ff31d0f07]
Former-commit-id: ecd44985ed6cdb7b16390904c65d66fee68ce7b2
2018-05-20 17:47:47 -05:00
Raul Jordan
b9cb8a8194 sharding: fetch from upstream but keep travis the same
Former-commit-id: 75db983a69c7061e250b2756e5917ac5dd1ff7d2 [formerly 6e8e11322b931a70b5f2db8b5413c945834143fe]
Former-commit-id: 8de7b4c58f421e45bff2f0af167e2f2a27ddac49
2018-05-16 16:44:56 -04:00
Preston Van Loon
69841d4df5 Sharding: dynamically load deposit amount from config.go
Former-commit-id: 14b48ff7efe688e4ea126db301a6d23a358060ed [formerly 77862c2e72e4f725a0ba7115ab16cd5f0b9dd774]
Former-commit-id: 359cd27670f304baa484b9dbeccff29b66accce4
2018-05-13 11:59:24 -04:00
Preston Van Loon
90440e97b1 Add sharding flags option to usage.
Former-commit-id: 53d8391434e77b68e29134d9f4cfaffa1ddd0c72 [formerly 32440329f168545310f7ee26c24081cb052673f4]
Former-commit-id: 300ea5da5ed7922287a27b56306def13594e41e3
2018-05-13 11:03:59 -04:00
Eli
3d03dc07a8 signer: fix golint errors (#16653)
* signer/*: golint fixes

Specifically naming and comment formatting for documentation

* signer/*: fixed naming error crashing build

* signer/*: corrected error

* signer/core: fix tiny error whitespace

* signer/rules: fix test refactor


Former-commit-id: e5aa4376db0bb59d577d0fc62b0d5e5766ce445e [formerly 8161f1ac395ffd49126597cb640ca9fff5e3a8df]
Former-commit-id: 4b759f413a22175b9bd0b6d47a9878a3e5440b17
2018-05-04 11:04:17 +03:00
Eli
1cf6747d06 whisper: Golint fixes in whisper packages (#16637)
Former-commit-id: 6a2a7c34e451465eae5d78f76e310e36a412d848 [formerly 6294fcfb3a206061cc8f9309f945f9b0c5a332a2]
Former-commit-id: e2d352442cc4b45620454ac6ece0f8d3d564ed11
2018-05-02 08:17:17 +02:00
Terence Tsao
66de62a85e sharding: fixed sharding cmds
Former-commit-id: 84365d981a292b44d38468c37367f8c0ed44705d [formerly c0b601ccd621170fce6f2c43ef2a285fd712d272]
Former-commit-id: f49352c4985317271d073edec7d0d520c4a56684
2018-04-27 18:10:37 -07:00
Terence Tsao
791576b204 sharding: \collator\notary\ on all files
Former-commit-id: 859723690bc327d7df9ffdd8f7ae247c05e1e1bf [formerly e2603e530217645b3f1fa180613ba27dca74e2f3]
Former-commit-id: c812bd611996a0a8a344064199163aa709ee3f24
2018-04-26 11:10:31 -07:00
Preston Van Loon
6618c12ef7 Merge branch 'master' of github.com:ethereum/go-ethereum
Former-commit-id: 64a62da53a5878450d6115fbc7fec6eeb70c7c2c [formerly 2a2a46b57a6a62b13689578cfcd33c8b8bf0529f]
Former-commit-id: 58cdafb64755ab12a765d2156a8eab468989f3a4
2018-04-06 20:06:43 -04:00
Preston Van Loon
ae1dfbbaf9 Refactor proposer
Former-commit-id: 2c934014a8624f84a33850a748dc41227f6a64e8 [formerly eebbc1a6350e0895f770c89efee80204cfd63fba]
Former-commit-id: 74dca03e825ee2a5af2f8e4bce21c8ae0cae70ee
2018-03-31 17:04:22 -04:00
Preston Van Loon
13789b6e63 Cleanup refactoring for sharding client interface and collator.
Former-commit-id: 9d452ada62e9afe7295d07b2e7650736e640b39a [formerly ef6fcf4365cff18f14e9bfbd43d6b9d362abfbe4]
Former-commit-id: ede05e77ef22b10fd7d12ac635d2879165416904
2018-03-31 14:25:39 -04:00
nisdas
394adb4750 Refactor Code
Former-commit-id: ad6a4793064556b556a92dbed3f8a555972c07a1 [formerly 13e903a723eee255b4eb6e2bcc7be06ba73b6fa7]
Former-commit-id: b2ecf21d02170030dfc56e9d9303aeb7bee45fab
2018-03-31 12:07:42 +08:00
Fynn
eb70fc73cd Merge branch 'master' of https://github.com/ethereum/go-ethereum into geth-sharding
Former-commit-id: 25dc367490dd16ef4fa1d462118aa438df1b319a [formerly 6fab78aeb8b9f54fddbad1406f97392b753a830a]
Former-commit-id: 0de0bb3ef9af1735ac8ecd1aefe2d57c0f76c62d
2018-03-23 19:10:53 +01:00
Terence Tsao
616e5f55e3 updated cli entry pts with the latest terms
Former-commit-id: e54d9c64425c9337618628b567a539c9cdf8b739 [formerly 079b4d5a8f02c32b20bb8964443b9bf154dfdd28]
Former-commit-id: 43251f050a4b9acbf01af1c1cf8639b3d7099953
2018-03-08 11:18:20 -08:00
Terence Tsao
1538aee4b8 removing collate flag
Former-commit-id: 2242fdca1d18d17547ddc0e55e2d2a11d5f839f6 [formerly 0b257a237d00488b571d5b60ce7dc16dc3b685ce]
Former-commit-id: 5f77c8f6274916016b052b365dfc3183b3d2d23a
2018-03-06 08:28:23 -08:00
Terence Tsao
9a56a56e62 add cli entrypoint for sharding-collator
Former-commit-id: fbe2f866e25778d1123f7bc494b18c67c7f6db89 [formerly b4197c2938959c5c623e425a81783f33869d0666]
Former-commit-id: a3eb74969066891766a3cbea3499c7a143dd009f
2018-03-05 21:57:42 -08:00
Raul Jordan
dad1cc4b83 proposing cli name change as sharding-validator
Former-commit-id: 4569ef4d3b333fab68851b546661d553d4fed298 [formerly 1c79a70562b6180496da5953e20e94763fd8a24e]
Former-commit-id: 3e91b7bbb3e4d3c4e6272bc687169d1c7cfbf0cd
2018-03-05 22:17:55 -06:00
Terence Tsao
7dcef60a37 removed unnecessary fmt.Sprintf, renamed flag to JoinValidatorSetFlag, and elaborated on its usage
Former-commit-id: 7e98ed54ff716b2da878f085ae1ff40472ce1966 [formerly fc5b4ec6ab005aedf8d0aa3206f27209aab65d71]
Former-commit-id: 4b17e2e49cf3df95a90be3fc7fb2bb66a96bbeed
2018-02-26 18:07:09 -08:00
nisdas
e028d5d8f0 Add Flag to main.go , and use flag in vmc.go
Former-commit-id: 53b5ad5831de51e345854a38b1f7928e31ffae16 [formerly 4ee90d9a47c09f436f50f079ea4a8be2e9b86036]
Former-commit-id: ba696db5822ec0293597d68e6945062f477e8f12
2018-02-26 10:20:42 +08:00
nisdas
420b76a9cd Remove Subcommand
Former-commit-id: 1b5a00dfc5ada45e3136137f4cfc5fb9c7164055 [formerly 1e099a9438bdb3dd9da0e0178581317f3c9b76ff]
Former-commit-id: d9e3da56fcc91af9e3cafc3d1ea55a92106a71af
2018-02-25 18:22:22 +08:00
nisdas
3259e3616a Add Join Validator Flag
Former-commit-id: 1c881038a2a42bc677ed9a8b04f206952d385d62 [formerly c0e94478b985e3df5bb2a714695101bddc2d9388]
Former-commit-id: 05244e6d66e996a6d46ca3272ef6d52d4fee3b78
2018-02-25 18:04:38 +08:00
Terence Tsao
232bdefa12 withdrawl/withdrawn
Former-commit-id: 08bd67263deebcdec3ce3a3cb42d50780a5f8883 [formerly 8add04fcc45d0bdfb36052e3e91015ad26ca980b]
Former-commit-id: dba141ed8ac1d5f9dcb285f009793979fa7595a0
2018-02-24 12:48:34 -08:00
Terence Tsao
c96a1845b4 cli entry point for joining validator set
Former-commit-id: 6d6852983c30ab74287f34374243d18047899e4c [formerly 26ced5a3e73e9f07b73dd5d60548cbdd5d282162]
Former-commit-id: c09a2c28ec94700eabeeba1e3511988d442eff53
2018-02-24 09:58:10 -08:00
Preston Van Loon
0cc6a006c1 merge upstream
Former-commit-id: b1699eddfbe71837d0703c6c998624bdcffeee55 [formerly 324fd14865ea1bddc19d776718d1d8e1cf3ee210]
Former-commit-id: 2523cca14cf81b44d7fe05a121524e38f9ecc77d
2018-02-18 21:03:41 -05:00
Fynn
5b5cae693f accounts/abi: use unpackTuple to unpack event arguments
Events with just 1 argument fail before this change


Former-commit-id: 69cbb51c56054208417e464dc6e46a94ccb3bbeb [formerly fbb03244929beb0ce8f9c607ce33d107e8319b89]
Former-commit-id: 984154c1ba79f1fe8bf0106a604b2765ea312079
2018-02-16 11:46:25 +01:00
Preston Van Loon
276f6c739b gofmt shardingcmd.go
Former-commit-id: ae3114325198530646bd0b377cce4fd68c33ec13 [formerly 1c646da464b0dbb3fcdeb49cea6d7c6678135ae6]
Former-commit-id: a1a98cd93b882f10dd212885b0f327cf5a44935c
2018-02-09 20:09:08 -05:00
Preston Van Loon
411d749b19 Merge pull request #19 from nisdas/IPCPath
Add IPC Path Flag to sharding client

Former-commit-id: 44474d0f4633caadcc9287aaad4aca98881d2854 [formerly be2ad87d6f8cf2d9f0011d9c397f3541c7897183]
Former-commit-id: b5093c0c63326d847f0df32177a1ef8f7fee5466
2018-02-08 10:59:28 -05:00
Preston Van Loon
84ff4c5b14 Merge pull request #23 from ethereum/master
Upstream changes from ethereum/go-ethereum

Former-commit-id: b40212f60d4e0a11e783a362886c7db8fb9c54f9 [formerly a2112a830d4047afa18c31243c2a506f80d4de12]
Former-commit-id: 4c9a4d5662038dd26bda5d3343f231795c702b02
2018-02-07 10:27:01 -05:00
nisdas
573a22986e Add IPC Path Flag to sharding client
Former-commit-id: 7d596e8ef95e71f7381dc27b25e1a4a2c0fa9a47 [formerly 76650eb37ce1755839ed23d8b1fe36d2dbdadffd]
Former-commit-id: b518e5a1de2615dbf5d16a819b057920df65dc60
2018-02-07 15:52:42 +08:00
Raul Jordan
279ca11940 wait func
Former-commit-id: f5c1e413d1ab851d7875830c91755556b1a38467 [formerly b687a2462ba18e2e1d3d6db7297ae9f48e904d27]
Former-commit-id: e595ef78375e736609a554101066896929f04521
2018-02-06 14:08:28 -06:00
Preston Van Loon
dbbd510e87 Merge branch 'master' of github.com:ethereum/go-ethereum into sharding
Former-commit-id: 67bbf74c5d56eb00019897556e98cb601f9bfa15 [formerly 499490a5fc98e3a41b409067c5f24d1ccc740976]
Former-commit-id: 725e6eecda7e624b7f0341582a26a6492fa6cc0f
2018-01-22 07:25:11 -05:00
Preston Van Loon
ad2384c6f6 Add a basic command description
Former-commit-id: 6576abbb33b8c01be58ebc1da7242328dd1d94a1 [formerly e5cfd3298f1fc8ba706e5a8575c69e7b17fcb6e2]
Former-commit-id: 9effda921bce995454aa815698b131a1de2c8c3d
2018-01-20 19:07:41 -05:00