Граф коммитов

3190 Коммитов

Автор SHA1 Сообщение Дата
Julien Maffre 868044c3b9
CCF + PBFT execution first integration (f = 0) (#263) 2019-07-19 13:56:29 +01:00
Eddy Ashton 22506b0094
Use private pool of non-SGX VSTS agents (#262)
* Use our agent pool, not public hosted agents

* Retain docker options

* Script not CMAKE

* Make/use working directory

* Add SYS_PTRACE capability in docker creation
2019-07-18 16:42:49 +01:00
Roy Schuster 37c370edb4
Argument names are clearer (#260) 2019-07-18 09:42:58 +01:00
Eddy Ashton 1c56672439
Add SAN and coverage builds in Azure Pipelines (#253)
* Test: Add a coverage build to VSTS, on Microsoft-hosted pool

* Remove .circleci

* Restore main CI yml

* Split publish/download build into separate templates

* Add a no-sgx VSTS CI config

* Fix yml typo

* Remove CircleCI badge

* Early venv creation is part of publish_build

* Add debugging steps to Coverage build

* Roll static_checks into Coverage build

* Do our debugging ON FAILURE

* Restore missing label

* Add docker options, dedicated SigIll hunting test

* Explicitly report missing RDSEED support

* Remove the same typo, again

* Add CMake option for software entropy, enable by default

* yaml fixes

* Re-enable SAN build

* Duh

* Print sanity check of entropy implementation

* cat /etc/hosts

* Print CMake config

* Old school

* Publish all ports

* Run all coverage and SAN tests

* Remove prints

* Use gdb to print backtrace on SIG ILL

* Stop building Debug

* Quit when gdb is finished

* SOFTWARE_ENTROPY off by default

* cpuinfo on the SIG ILL agent

* Just run keyexchange directly

* TEMP: Disable other jobs

* Re-enable main jobs, cpuinfo in build

* Push coverage

* Remove SOFTWARE_ENTROPY option

* Push from correct workingDirectory

* Revert "Remove CircleCI badge"

This reverts commit 5202fe7c95.

* Revert "Remove .circleci"

This reverts commit 413883d9e7.

* Add comment for --publish-all option

* Print CMake config after building

* Use yaml anchor to avoid duplicating exclude paths

* Remove anchors - unsupported by VSTS

* Move comment to first use of --publish-all

* get_data() is used as MbedtlsEntropy, so return an MbedtlsEntropy

* Revert "get_data() is used as MbedtlsEntropy, so return an MbedtlsEntropy"

This reverts commit 03bc3d0750.

* Print actual error messages

* Update entropy.h

* inline

* Remove debug hack
2019-07-17 17:57:57 +01:00
Roy Schuster 7f2178036c
Adding propose and vote api to testing framework (#251)
* Added API for proposal and voting
* Network class supports retiring a node
* Changed proposal display to be consistent with the rest of the RPC output on the member client
2019-07-17 16:32:26 +01:00
Eddy Ashton 31d5a0f71d
Query network for current leader before sending joinNetwork (#259)
* Everybody uses live network info to join, not joinNetwork.json

* Read networkcert.pem once

* Tweak comment

* Store network cert in recovery network
2019-07-17 15:45:24 +01:00
Roy Schuster 86161bed99
Update entropy.h (#258)
Fix #255
2019-07-17 13:37:22 +01:00
olgavrou 2d4df58a35
fixing combined ci (#257) 2019-07-17 09:28:04 +01:00
Eddy Ashton 5aa6340684
Serialise base members and nlohmann::json with msgpack-c (#249)
* Print destination of RPCs

* Clear message when there are no pending proposals

* Add msgpack conversion for OpenProposal and nlohmann::json

* Update construction of OpenProposal

* Add test of proposal read - doesn't test the failing case yet

* Extend test to read final proposal state

* Equality for scripts

* Add initial standalone serialization test

* Correct equality, test json conversion

* Serialization for MemberAck

* Add test of Signature, reorder definition for consistency

* Extract msgpack adaptor for nlohman::json

* Remove special case path for json

* Fail tests if pip fails

* Don't echo, just quit early

* Add comment on non-copy solution
2019-07-16 19:44:05 +01:00
Eddy Ashton fb9c04b6bf
Use correct curve CMake variable for perf build (#254)
* s/CURVE_CHOICE/SERVICE_IDENTITY_CURVE_CHOICE

* Add a cmake step to regenerate test metadata

* Use CMake task, to auto-create build directory

* Remove old build directory

* Add debug step printing test metadata

* Don't create the venv in build

* Do no try to compress what does not exist

* Remove debug printing
2019-07-16 17:29:19 +01:00
Amaury Chamayou 6ec402e755
Port to API v2 (#248) 2019-07-16 08:59:04 +01:00
Roy Schuster b6d30494b9
Entropy detection during runtime (#247)
Selecting the suitable random number generation method
2019-07-15 14:35:20 +01:00
Roy Schuster e5a64652a2 Added an RPC to allow retiring a node (#238) 2019-07-12 15:32:10 +01:00
Eddy Ashton 0f3fa033d2
Support multiple crypto curves (#243)
* Sketch CurveImpl enum, replace macro definitions with templates

* Replace use of MD_TYPE and HASH macros with templates

* Replace HASH macro

* WIP

* Remove remaining compile-disabled code from keypair.h

* Expose CurveImpl, correct 256k1_bitcoin params

* Test all supported curves

* Add test that wrong curve fails to validate

* verify(vector, vector) should delegate, not reimplement

* Corrupt more, to ensure we affect content not padding

* Rename CURVE_CHOICE options to be LEDGER_CURVE_CHOICE

* LEDGER_CURVE_CHOICE determines default_curve_choice

* Proof-of-concept - factories for virtual implementation

* Virtualise PublicKey

* Re-enable other tests

* Remove templated CurveParameters

* Add labels, test for wrong curve, wrong impl

* Correct comment

* Delegate sign(CBuffer), reducing code duplication

* Remove TODO enum

* tls_bench compares curves for signing

* Extract make_contents

* tls_bench does comparison of all supported curves

* Tidy

* Temporary verbose logging of ecp group ID

* Produce standard (non-recoverable) signatures by default, for compatibility

* Fix curve logging, add tests of key transfer across implementations

* Verify with non-recoverable sigs too

* Log inconsistent failing cases

* Correct implementation substitutability test

* Normalize secp256k1 signatures - they may  have come from mbedtls

* Re-order picobench results for readability

* Add some secp256k1 link dependencies

* Unprotect constructors - there are legitimate uses for direct construction

* Verifier curve type is parsed from cert

* history_bench builds

* Reminder TODO comment

* frontend_test builds and passes

* Clients compile

* genesisgenerator compiles

* membervoting_test builds

* Fix sign_hash, sign/verify ack data normally

* Remove unneeded CurveParams entirely

Detect PublicKey type

Simplify construction to minimum

* Correct test with new API

* verify_hash via publickey, test sign_hash and verify_hash

* Include tests

* Update to latest signature

* Ditto

* Update function signatures for people with raw data

* Fix history calls

* When constructing from explicit key, don't pass curve too

* API updates

* Fix nodestate

* inline

* EVERYTHING BUILDS

* Tidy cmake link args

* Remove unnecessary direct use of mbedtls_ecdsa_*

* Remove uint8_t restriction in sig_size

* tls_bench actually compares relevant hash operations

* bitcoin preference doesn't need to be a macro

* Standardise use of use_bitcoin_impl

* clang-format

* Test now uses distinct manual hash operation

CHECK rather than REQUIRE

* Rename LEDGER_curve to SERVICE_IDENTITY_curve

* use fmtlib

* Let mbedtls determine message digest size/function

* Add details to all thrown errors

* Remove parameter packs, document use_bitcoin_impl

* Name magic constant, extract parse_secp256k_bc
2019-07-12 11:12:05 +01:00
Amaury Chamayou e3b1f0140e Remove warmup cooldown (#246) 2019-07-12 10:32:20 +01:00
Amaury Chamayou 746ef708dc
Fix performance regression when not using PBFT (#245) 2019-07-12 09:52:05 +01:00
Amaury Chamayou c399249977
Fix circle (#244) 2019-07-12 08:24:50 +01:00
Roy Schuster 1dab271820
Reverted secp256k1 verification to use public key from cert (#235)
* Reverted secp256k1 verification to use public key from cert
2019-07-09 15:25:16 +01:00
Amaury Chamayou 28cfce70d0
Try to make LGTM find more code (#232) 2019-07-08 13:47:09 +01:00
Amaury Chamayou 76923038f6
Compact the right history where recovering private ledger (#233) 2019-07-08 13:46:47 +01:00
Amaury Chamayou a2b97ed359
Fix LGTM warning (#231)
Fixing https://lgtm.com/projects/g/microsoft/CCF/alerts/?mode=list
2019-07-08 08:48:48 +01:00
Amaury Chamayou bb43c3482b
Always sign member commands (#229) 2019-07-05 14:32:02 +01:00
Amaury Chamayou 430829f598
Fix joinrpc command (#228) 2019-07-05 13:33:45 +01:00
Sylvan Clebsch c2806470e2 add rbmap and champ get by pointer calls (#210) 2019-07-05 11:17:01 +01:00
olgavrou 893f529328
fixing typos that break common ci (build with -DPBFT=ON) (#223) 2019-07-04 16:27:33 +01:00
Roy Schuster 726adaa9e1
Allowing to break KV foreach loops (#221)
* Allowing to break KV foreach loops
2019-07-04 14:46:34 +01:00
Amaury Chamayou 5cb4d5e6d0
Logging change (#222) 2019-07-04 14:20:40 +01:00
Julien Maffre ce1fb1f56b
Adding basic documentation for governance (#217) 2019-07-04 13:26:46 +01:00
Amaury Chamayou 3c44e87866
Hooks in history for initial PBFT integration (#220) 2019-07-04 10:44:53 +01:00
Roy Schuster 1dfb3baca3
Not allowing adding nodes with a host:port combination that already exists (#218)
* Not allowing to add nodes with a host:port combination that already exists
2019-07-04 09:59:35 +01:00
Roy Schuster 2025258d75
Secp256k1 bc verify using embedded signature (#213)
* Added support for secp256k1 verification using the embedded signature
2019-07-03 15:15:21 +01:00
Eddy Ashton f847c40a85
add_custom_command rather than add_custom_target (#211)
Avoid patching in every build
2019-07-03 11:41:56 +01:00
Eddy Ashton cbb2992b3a
Allow RPC body to be given on command line (#207)
* --req arg can take @file or RPC contents

* Update docs

* Explicit startnetwork, file args during startup

* Formatting

* Correct capitalisation
2019-07-03 09:36:36 +01:00
Eddy Ashton a8624c0ce2
Add getNetworkInfo RPC (#201)
* Add GetNetworkInfo definitions

* Implement GetNetworkInfo

* Add generated schema
2019-07-01 16:50:12 +01:00
Amaury Chamayou 7c952c208a
Remove log line (#198) 2019-07-01 13:24:42 +01:00
Amaury Chamayou 5c76cc2123
Fix docgen (#194) 2019-06-27 13:45:28 +01:00
Eddy Ashton 5716ccb74d
LocalRemote can run binaries from outside build directory (#192)
* Don't chmod LocalRemote files
Only relative paths should be corrected

* Comment tweak

* Format
2019-06-27 13:42:31 +01:00
Amaury Chamayou 10dbabb7af Remove direct Hacl_ calls (#191) 2019-06-27 13:29:47 +01:00
Eddy Ashton 87ba9c8a4b
Schedule morning CI earlier (#193)
It should run when the VMs start, regardless of daylight savings
2019-06-27 13:06:46 +01:00
Roy Schuster 2ad5f162cd
Code version testing (#187) 2019-06-26 15:51:10 +01:00
motdc 906d085948
Fixed ITimer build (#190) 2019-06-26 15:32:08 +01:00
Eddy Ashton a171802ff4
Scheduled CI build (#189)
* Add daily morning CI build

* CI machines don't start on weekends, don't schedule jobs
2019-06-26 12:59:26 +01:00
Amaury Chamayou a5a7fcea3c
Allow sgx only as well as virtual only (#188) 2019-06-25 15:37:05 +01:00
Julien Maffre 0d855ff4da
Evercrypt update (#182) 2019-06-24 15:52:11 +01:00
Amaury Chamayou 0b95d4f1c3
Restrict CI runs to branches that opt in, PRs, and to only files that… (#186) 2019-06-24 13:44:27 +01:00
Amaury Chamayou beeb07086a
Update service connection name for new sub (#185) 2019-06-21 18:18:31 +01:00
Eddy Ashton e3ca9fa35f
Remove static_checks from VSTS - its in CircleCI (#184) 2019-06-21 17:26:26 +01:00
Eddy Ashton 32a520df4c
DevOps test fan-out (#183) 2019-06-21 16:27:54 +01:00
Eddy Ashton 2989f5510c
Fixed width log prefix (#181)
* Initial fixed format prefix

* Combine filename and line number
2019-06-20 11:24:50 +01:00
Eddy Ashton d19f0b368f
Friendlier formatting of log messages (#179)
* Stop repeating FMT_HEADER_ONLY

* Remove unnecessary format separator

* Add LOG_*_FMT macros

* Many replacements, mostly LOG_INFO > LOG_INFO_FMT

* Finish nodestate.h

* Fix typos

* Halfway through raft.h

* LOG_FATAL > LOG_FATAL_FMT

* Prefer continue to empty while, for readability

* Replace all LOGs in tcp.h

* Replace remaining LOG_TRACEs

* Add picobench tests comparing LOG_DEBUG with LOG_DEBUG_FMT

* Simplify string-only logs

* Another batch of renames

* Replace in keypair.h

* Include ostream.h - we defined operator<< and want to use it

* Clarify comments

* Replace in kv.h

* Replacements in rpcconnections.h

* Replacements in nodeconnections.h

* Final pass on LOG_FAILs

* Add missing brackets noticed in review
2019-06-19 17:51:45 +01:00