Commit Graph

126 Commits

Author SHA1 Message Date
dapplion d9c83feb10 Remove unnecessary eslint-disable 2020-11-29 12:19:52 +00:00
dapplion 8055f73afb Use browser friendly hexToBytes, bytesToHex methods 2020-11-28 19:52:32 +00:00
dapplion 2c34db8b8e Remove unnecessary casting of Buffer to Unit8Array 2020-11-28 19:30:56 +00:00
dapplion b507ed28c0 Use randombytes instead of node's crypto 2020-11-28 19:27:59 +00:00
dapplion 9194769d62 Export constants consistently 2020-11-28 19:14:08 +00:00
dapplion bd17160713 Use 'message' arg name consistently 2020-11-28 19:11:21 +00:00
dapplion 406419cac7 Set default value for implementation 2020-11-25 17:58:03 +00:00
dapplion 4ca6532171 Use toBuffer to prevent allocation 2020-11-25 17:57:33 +00:00
dapplion e32ea6d7a5 Buffer is subclass of Uint8Array 2020-11-25 17:56:33 +00:00
dapplion ca5cac64b3 Fix lint warnings and errors 2020-11-25 16:23:53 +00:00
dapplion 49d509aca4 Clean interface 2020-11-25 16:09:47 +00:00
dapplion 021e741d17 Move bls-eth-wasm to the root dir 2020-11-25 15:35:53 +00:00
dapplion 847ec46ac9 Remove crypto from common helpers 2020-11-25 15:06:05 +00:00
dapplion 530e86d98f Export strategies 2020-11-25 15:03:15 +00:00
dapplion cd5b7cba47 Update bls-eth-wasm types 2020-11-25 14:00:18 +00:00
dapplion 6b1fdb0971 Fix lint issues 2020-11-25 11:50:47 +00:00
dapplion ec859a1c32 Fix backing dependencies 2020-11-25 11:39:49 +00:00
dapplion c59cf98695 Merge 'dev' into 'blst' 2020-11-25 11:10:06 +00:00
dapplion 84c95ba069 Remove Keypair class 2020-11-25 10:45:19 +00:00
dapplion 4da10180d9 Remove code duplication in the functional interface 2020-11-25 10:41:52 +00:00
Marin Petrunić b7b5082861
Merge remote-tracking branch 'origin/dev' into mpetrunic/assert 2020-11-24 21:04:07 +01:00
Marin Petrunić 51f0cb7c1b
fix lint 2020-11-24 20:59:33 +01:00
Marin Petrunić ea01f26967
remove assert dep 2020-11-23 12:34:19 +01:00
Marin Petrunić 426316ddc2
remove @chainsafe/eth2-bls-wasm dep 2020-11-23 12:06:20 +01:00
dapplion 990258dbd9 Fix type errors in benchmark runner
Lint issues
2020-11-20 19:37:20 +00:00
dapplion 4424bed87d Define common implementation 2020-11-20 19:03:17 +00:00
dapplion c354386dab Fix lint errors 2020-11-20 12:27:35 +00:00
dapplion 1e9f778846 Use isEqualBytes helper 2020-11-20 09:37:44 +00:00
dapplion 523d547171 Add Keypair test 2020-11-19 14:50:18 +00:00
dapplion f8cd6e7afa Update tests to run both implementations 2020-11-19 14:41:45 +00:00
dapplion 57694c2e54 Co-exist implementations 2020-11-19 13:22:41 +00:00
dapplion 5b06e4f61e Replace herumi src with BLST 2020-11-19 00:23:34 +00:00
Cayman 49d6d9f62c
Run prettier 2020-11-05 14:55:25 -06:00
dapplion 9f6b89fd12 Merge 'master' into prettier 2020-11-04 18:12:32 +00:00
Cayman c22069335f
Run prettier 2020-11-04 11:40:36 -06:00
dapplion df9166ed9c Cache a promise for Bls instead of Bls 2020-11-04 13:45:05 +00:00
Marin Petrunić 4a74e1ff44
allow passing decompressed keys 2020-08-29 16:18:33 +02:00
Marin Petrunić 20121c330b
update tests 2020-05-21 12:52:11 +02:00
Marin Petrunić dcf6551372
update bls methods and wasm usage 2020-02-24 16:32:14 -06:00
Marin Petrunić c1a6c41dd4
remove domain param from every method in bls 2020-02-24 16:26:48 -06:00
Cayman eca3c70833 Address PR comments 2020-02-19 13:15:57 -06:00
Cayman 9a52ed5672 Simplify bls functional interface 2020-02-12 09:39:40 -06:00
Cayman fa1f393e79 Make bls types more strict 2020-02-10 22:25:23 -06:00
Cayman c5cecec09b Fix w new vector types 2020-02-04 16:30:10 -06:00
Cayman 825726b5cc Update bls 2020-01-21 10:46:21 -06:00
Gerald Nash 042e2f3098 Merge branch 'master' into bls-keygen-private-keys 2020-01-16 15:05:39 -05:00
Gerald Nash 4966e0beab Use bls-keygen to generate random private keys 2020-01-15 15:55:26 -05:00
Cayman f8b1cb3cc7 Merge branch 'master' into 0.9.x 2020-01-10 14:07:22 -06:00
pushcodeveryday 645f88ffec fixing typos 2020-01-09 12:25:26 +05:30
ayush.kaul 529b36d4d4 [BLS] function arguments 2020-01-08 12:19:51 +05:30
Tuyen 1cf1c27b94 Refactor Hash to Root/bytes32 2020-01-07 06:27:18 +07:00
Marin Petrunić 50f5ac45c8 bugfixes 2019-12-11 10:58:24 +01:00
Marin Petrunić 72f95898a8 address Pr comments 2019-12-02 13:44:45 +01:00
Marin Petrunić 8c10a06d79 fix tests 2019-11-28 12:13:20 +01:00
Marin Petrunić 34c61bc762 fix bls lint 2019-11-27 22:06:17 +01:00
Marin Petrunić 2d0725a5cc rewritten bls to use wasm 2019-11-27 21:58:41 +01:00
Marin Petrunić d5d8284be5 bls wasm context and private key converted to wasm implementation 2019-11-27 19:21:37 +01:00
Marin Petrunić 4b488a097b fix tests 2019-09-17 22:03:24 +02:00
Marin Petrunić fe31dbc974 fix bls lint 2019-09-17 21:05:13 +02:00
Marin Petrunić b8c262791a fix ts errors 2019-09-17 21:02:32 +02:00
Marin Petrunić 6143104204 Merge remote-tracking branch 'origin/master' into cayman/style-guide
# Conflicts:
#	.eslintrc
#	package.json
#	packages/bls/src/@types/keccak256/index.d.ts
#	packages/bls/src/helpers/g1point.ts
#	packages/bls/src/helpers/g2point.ts
#	packages/bls/src/index.ts
#	packages/bls/src/privateKey.ts
#	packages/bls/test/spec/spec-tests
#	packages/eth2.0-types/src/validator.ts
#	packages/eth2.0-types/src/wire.ts
#	packages/lodestar/package.json
#	packages/lodestar/src/api/rpc/api/beacon/beacon.ts
#	packages/lodestar/src/api/rpc/api/beacon/interface.ts
#	packages/lodestar/src/api/rpc/api/validator/interface.ts
#	packages/lodestar/src/api/rpc/transport/http.ts
#	packages/lodestar/src/api/rpc/transport/ws.ts
#	packages/lodestar/src/chain/chain.ts
#	packages/lodestar/src/chain/factory/attestation/index.ts
#	packages/lodestar/src/chain/factory/block/eth1Data.ts
#	packages/lodestar/src/chain/factory/duties/index.ts
#	packages/lodestar/src/chain/forkChoice/interface.ts
#	packages/lodestar/src/chain/forkChoice/statefulDag/lmdGhost.ts
#	packages/lodestar/src/chain/stateTransition/block/randao.ts
#	packages/lodestar/src/chain/stateTransition/util/attestation.ts
#	packages/lodestar/src/chain/stateTransition/util/domain.ts
#	packages/lodestar/src/cli/commands/beacon.ts
#	packages/lodestar/src/cli/commands/create-config.ts
#	packages/lodestar/src/cli/commands/deposit.ts
#	packages/lodestar/src/cli/commands/eth1-private-network.ts
#	packages/lodestar/src/cli/commands/validator.ts
#	packages/lodestar/src/cli/commands/wallet.ts
#	packages/lodestar/src/db/api/beacon/interface.ts
#	packages/lodestar/src/db/api/validator/interface.ts
#	packages/lodestar/src/db/api/validator/validator.ts
#	packages/lodestar/src/db/controller/impl/level.ts
#	packages/lodestar/src/eth1/dev/network.ts
#	packages/lodestar/src/eth1/impl/ethers.ts
#	packages/lodestar/src/logger/abstract.ts
#	packages/lodestar/src/logger/winston.ts
#	packages/lodestar/src/network/codec.ts
#	packages/lodestar/src/network/gossip.ts
#	packages/lodestar/src/network/interface.ts
#	packages/lodestar/src/network/libp2p/peer.ts
#	packages/lodestar/src/network/libp2p/rpc.ts
#	packages/lodestar/src/network/libp2p/syncRpc.ts
#	packages/lodestar/src/network/libp2p/util.ts
#	packages/lodestar/src/node/nodejs.ts
#	packages/lodestar/src/rpc/api/interface.ts
#	packages/lodestar/src/rpc/api/validator/validator.ts
#	packages/lodestar/src/rpc/options.ts
#	packages/lodestar/src/rpc/protocol/jsonRpc.ts
#	packages/lodestar/src/sync/index.ts
#	packages/lodestar/src/sync/initial.ts
#	packages/lodestar/src/sync/regular.ts
#	packages/lodestar/src/sync/rpc/interface.ts
#	packages/lodestar/src/util/bytes.ts
#	packages/lodestar/src/util/io.ts
#	packages/lodestar/src/util/merkleTree/merkleTree.ts
#	packages/lodestar/src/validator/options.ts
#	packages/lodestar/src/validator/rpc/abstract.ts
#	packages/lodestar/src/validator/services/attestation.ts
#	packages/lodestar/src/validator/services/block.ts
#	packages/lodestar/src/validator/validator.ts
#	packages/lodestar/test/e2e/sync/reqResp.test.ts
#	packages/lodestar/test/unit/sync/index.test.ts
#	packages/lodestar/test/unit/sync/rpc.test.ts
#	packages/ssz/src/hashTreeRoot.ts
#	packages/ssz/test/unit/hashTreeRoot.test.ts
#	yarn.lock
2019-09-17 12:52:06 +02:00
Austin Abell 359cc185e4 Merge branch 'master' into austin/typesusage 2019-09-03 18:46:29 -04:00
Marin Petrunić 71fdceb247 Merge remote-tracking branch 'origin/master' into mpetrunic/rest-api
# Conflicts:
#	packages/lodestar/package.json
#	packages/lodestar/src/cli/commands/beacon.ts
#	packages/lodestar/src/node/nodejs.ts
2019-09-03 23:44:28 +02:00
Cayman 89e68ff31d Merge pull request #406 from ChainSafe/mpetrunic/bls-benchmark
Bls benchmarking and optimisation
2019-09-03 14:14:20 -05:00
austinabell 6f17cc349e replace byte32 type on hashes to Hash 2019-09-03 14:17:55 -04:00
Marin Petrunić 528a5ca611 addess PR issues 2019-08-29 14:14:46 +02:00
Marin Petrunić 57428df8ec fix bls lint errors 2019-08-28 17:18:51 +02:00
Marin Petrunić 84bf46cb58 add faster signature verification 2019-08-28 15:57:26 +02:00
Marin Petrunić 76be9d2507 Merge remote-tracking branch 'origin/master' into mpetrunic/new-spec-test-format
# Conflicts:
#	packages/bls/src/helpers/g2point.ts
2019-08-17 16:02:39 +02:00
Marin Petrunić 80d07d780f fix lint 2019-08-16 13:49:51 +02:00
Marin Petrunić 2b38c87501 add proper bls exports 2019-08-16 11:55:13 +02:00
Marin Petrunić 4fa5b9cddd fix codeclimate issues 2019-08-16 11:18:29 +02:00
Marin Petrunić f92b1593d7 Merge remote-tracking branch 'origin/master' into mpetrunic/rest-api
# Conflicts:
#	packages/bls/src/helpers/g2point.ts
#	packages/lodestar/package.json
#	packages/lodestar/src/validator/options.ts
#	packages/lodestar/test/e2e/chain/factory/block/assebleBlock.test.ts
#	yarn.lock
2019-08-16 10:57:34 +02:00
Marin Petrunić 7c7cfc332a api configuration 2019-08-16 10:54:16 +02:00
Marin Petrunić 0c0bfd5324 add proper bls exports 2019-08-12 09:51:18 +02:00
Cayman b651b83acc Move to packages/bls 2019-08-05 10:48:26 -05:00