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

55 Коммитов

Автор SHA1 Сообщение Дата
olgavrou aa86312e3e merge ePBFT and CCF docs (#436) 2019-10-11 09:45:54 +01:00
Julien Maffre daeea1306b
Slightly clearer docs (#426) 2019-10-09 17:32:32 +01:00
Julien Maffre f5009fb62d
Members should vote for Lua app before opening the network (#411) 2019-10-07 15:18:10 +01:00
Amaury Chamayou e0a031c0c0
Merge node and mgmt frontends (#402) 2019-10-01 16:17:14 +01:00
Julien Maffre c089e08f02
After the service is open, members should trust new nodes (#395) 2019-09-30 13:13:42 +01:00
Eddy Ashton c7568876f6
Use libcurl on the host to send HTTP notifications (#381)
* Minimal curl post example

* Make sure request is null-terminated

* Python notification server receives HTTP

* Drop old notifications, write HTTP to given address

* Set appropriate content type

* Start using curl_multi

* Properly poll for curl multi responses, +cleanup

* Add Content-Type header

* Re-enable notifications test

* Minor TODOs

* Document curl dependency

* Install correct dev library for libcurl

* find_package(CURL)
2019-09-19 11:23:55 +01:00
olgavrou eabd57476b
fix broken links (#379) 2019-09-18 10:41:07 +03:00
Amaury Chamayou f71a103f41
Dynamic vote (#370) 2019-09-17 16:47:34 +01:00
Julien Maffre 95faf70e63
Users need to be specified by members before opening the network (#371) 2019-09-16 09:24:48 +01:00
Julien Maffre c4f509a7d2
Members must open the network first (#366) 2019-09-13 14:37:06 +01:00
Julien Maffre 30c1c230fb
Re-enable code update and add node tests (#362) 2019-09-10 11:34:21 +01:00
Amaury Chamayou 0ce7460cfa
Prefix tables (#354) 2019-09-06 18:02:26 +01:00
Eddy Ashton 108211d5e0
Don't remove completed proposals (#353)
* Add ProposalState enum

* Rename Proposal to Propose

* Rename OpenProposal to Proposal

* Add withdraw RPC

* Document withdrawal

* Consistency: Rename "removal" to verb "remove"

* Expose withdraw RPC in memberclient

* Improve error when voting for accepted proposal

* Test withdrawal behaviour in member_client_test

* Update schema

* Add formatted info to error messages

* Typo fix

* Distinguish INVALID_CALLER from INVALID_PARAMS

* Add tests of new failure modes

* Upper-case ProposalState for consistency

* Accept proposed removal of proposal removal

* Update docs
2019-09-05 17:57:08 +01:00
Amaury Chamayou f744d557bb
Docker on windows (#352) 2019-09-04 17:45:36 +01:00
olgavrou aca3a82491
log formatting (#346) 2019-09-04 12:03:33 +01:00
Eddy Ashton 8b83e8f1eb
Remove boost dependency (#349)
* Remove boost from ansible

* Remove unused boost references

* Add dockerignore, remove clang-format Q_FOREACH

* Restore Q_FOREACH

* Non-specific FOREACH macro
2019-09-03 17:24:38 +01:00
Eddy Ashton c9b0f7ef5f
Make implicit proposer vote explicit (#339)
* Proposer sends ballot

* Remove unnecessary error log line

* Add test of proposer initially voting against

* Throw errors, not strings

* Update memberclient documentation

* --standardize-long-options

* Remove final references to nodes.json

* Modified propose_params

* Python wrappers use --updated-option-names

* --member-cert

* '=' != ' '
2019-08-29 17:16:08 +01:00
Julien Maffre 86b5cc6ca1
Updates docs after light genesis update (#333) 2019-08-29 10:33:29 +01:00
Amaury Chamayou 101937d092
Remove mentions of simulation mode (#332) 2019-08-28 17:29:26 +02:00
Julien Maffre 6fe6254e83
Light genesis (#318) 2019-08-28 10:57:45 +01:00
olgavrou 72c5d4aa4f
Consensus naming (#306) 2019-08-15 17:52:43 +01:00
Julien Maffre 5c3d857452
Raft host/port rename (#279) 2019-08-06 12:38:19 -04:00
Eddy Ashton 0613009331
Automatically populate error codes in Lua (#273)
* Create env table from C++, not lua

* Register LOG macros to be accessible from lua

* Lua log macros can take a list of args, like io.write

* Auto fill lua error codes

* Remove manual error codes

* Fix luageneric_test

* Add Lua LOG_TRACE, tests of pre-populated env bits

* Add app errors to lua logging

* Document pre-populated env fields

* Set things up in the right order
2019-07-26 11:11:19 +01:00
Eddy Ashton e6d9bdab4e
JSON macro improvements (#271)
* Fall back to adl lookup

* Basic test of custom schema with ADL

* Flip json/json_schema dependency, to support user types

* Remove default namespace setup

* Remove test structs from ccf namespace

* Move schema code out of CCF namespace

* Refactor macros for generality

* Updated macros in json_bench

* General rename to new macros

* Add _WITH_BASE, condense, remove dead macros

* Fix _WITH_BASE only, add test

* Further renames

* Add support for generating map schema

* Correct namespace

* If you only have optional fields, still need REQUIRED macro

* Add updated comment, with examples

* Remove unneeded old macro variant

* FILL_SCHEMA from macro, not terror template tuple

* Remove unused magic template tuples

* Manual schema to match manual conversion

* Another comment update

* GetCommit::In has optional fields

* Updated schema

* Add test for doc examplse

* Remove unused

* Support different names for JSON and C++ fields

* Test schema with differing fields names

* Add comment on WITH_RENAMES

* clang-format
2019-07-25 16:51:27 +01:00
Eddy Ashton c5de34f9ad Separate standard from CCF error codes, allow app extensions (#267) 2019-07-21 16:15:28 +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 430829f598
Fix joinrpc command (#228) 2019-07-05 13:33:45 +01:00
Julien Maffre ce1fb1f56b
Adding basic documentation for governance (#217) 2019-07-04 13:26:46 +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
Roy Schuster 2ad5f162cd
Code version testing (#187) 2019-06-26 15:51:10 +01:00
Amaury Chamayou a5a7fcea3c
Allow sgx only as well as virtual only (#188) 2019-06-25 15:37:05 +01:00
Amaury Chamayou b91e856ee8
Tests without sgx (#175) 2019-06-19 11:35:56 +01:00
Eddy Ashton 6501a2a35e
Update contributing guide and OpenEnclave links (#174)
* Add description of CI + static_checks to CONTRIBUTING

* Update links to OpenEnclave repo
2019-06-19 10:31:08 +01:00
Eddy Ashton 7665746ab1
Harden Lua handler API (#172)
* Proof of concept

* Replace tests of __default handlers, fix formatting

* Clarify names

* Obsessive formatting

* Remove lua's DEFAULT_HANDLER and references to it

* Add tests we'd like to pass

* Avoid copies in push_raw args

* Add stub push_raw for RequestArgs

* Implement push_raw for RequestArgs

* Lua nil should become json null

* A passing test

* All tests take args table

* Don't hide logging_client errors, check_returncode

* Update logging.lua to new API

* Obsessive formatting

* Whitespace

* Whitespace

* Update docs

* Typo
2019-06-19 09:20:26 +01:00
Eddy Ashton 82538b13c1
Remove special lua __default script (#169)
* Proof of concept

* Replace tests of __default handlers, fix formatting

* Clarify names

* Obsessive formatting

* Remove lua's DEFAULT_HANDLER and references to it

* Tweak docs
2019-06-18 16:14:21 +01:00
Roy Schuster 7c09e1ec4e
RPC support for adding nodes (#142)
* Added the "add_node" RPC
* Adding a node also inserts its certificate to the node certificates table
2019-06-17 14:03:22 +01:00
Amaury Chamayou 7e3d6e4f7c
Update logging_lua.rst (#165) 2019-06-17 10:07:25 +01:00
Eddy Ashton 395e1b05cc
Remove jsonrpc::success() (#164)
* No success without an argument

* Make it clear that JoinNetwork gets an async response

* return json::success(true);

* Expect truth

* luA luI

* Make logging.lua consistent with logging.cpp

* KO OK
2019-06-17 09:30:56 +01:00
Eddy Ashton f0dc80528b
Schemas for member and management frontend (#153)
* Fetch schema from each frontend, report schema-less methods

* Non-forwardability should not be coerced to a schema

* clang-format

* Add placeholder schema types for management frontend

* Add support for enums in auto-schema-generation

* Add schema for GetSignedIndex

* Use GetSignedIndex types

* Report schema for pairs

* Standardise types/schema for GetQuotes

* Fix typo

* Simplify GetQuotes response

* Schema for setRecoveryNodes

* Add generated schema for management frontend

* Don't repeat unschema'd methods

* Refactor schema generation to better support arbitrary types

* Add some schema to memberfrontend

* Fix install overloads again

* Empty schemas should still be objects, not nulls

* Schemas for remaining member frontend methods

* Dump of current schemas

* Fix json_schema test

* Update docs with new schemas

* Add section links
2019-06-13 13:26:46 +01:00
Amaury Chamayou 4cd861805f
Doc fixes (#151) 2019-06-12 17:33:11 +01:00
Amaury Chamayou 8e25001640
Clean up cmake flags (#148) 2019-06-12 13:39:22 +01:00
Eddy Ashton ee9d7f994e Documented schemas (#135) 2019-06-11 08:56:48 +01:00
Julien Maffre 1df8fc71e5 Preserve node artefacts for each type of test (#114) 2019-06-05 22:43:40 +01:00
Eddy Ashton e567277a42
Json schema: Take 3 (#113)
* Add a getApi method, listing all installed RPC method names

* Sketch RecordParams struct

* WIP

* Broken WIP

* Partial macro

* Basic examples working

* Partial file separation

* Move, rename, and fix FOR macro

* Use json get

* Build to_json from RequiredJsonFields too

* Remove unneeded pair specialisation

* Add comments, collide required and optional

* REformat

* Use new macros everywhere

* Remove unused template

* Rename getApi to listMethods

* Move frontend-specific calltypes to /rpc

* Specify GetTxHist return type

* Pretty-print client responses by default

* Add a GetSchema RPC

* Other tools demand ugly formatting by default

* mins and maxes for numerics, map of schemas

* Support _FOR_JSON_0

* Fix support for std::optional optional fields

* Test std optionals

* Define schemas for GetCommit

* More definitions for existing RPCs

* Tidy schema generation, including for vectors

* Add proper unit test

* Initial test of schema generation

* Fix failing tests

* Formatting

* Add (currently failing) test of nested structs

* Add misleadingly passing test

* Set correct expected pointers, test currently fails

* Oops - deexpand

* Correctly build pointer path for erroneous array elements

* Demonstrate invalid, not just missing, valeus

* Skeleton of json_bench

* Fix typo

* WIP

* Compare manual json parsers vs macro-defined

* mumble mumble

* Add valijson, +basic test

* Add benchmark of valijson validation

* Benchmark simple and complex structs

* Additional broken schema test

* Include pointer to parse errors

* Restore old basic translator macro

* Restore simpler macro for translators that don't need schema

* Add auto schema for private logging methods

* Add manual schema + validation for PUBLIC logging RPCs

* Match RPC format

* More RPC format fixes

* Correct scenario test target

* Add documentation entry on API schema

* Initial schema retrieval test

* Correct URLs in generated schema

* Send schema to a flat folder

* Remove unnecessary size_t max restriction

* Report non-matching schema

* Add current schemas

* Tidying

* clang-format

* Remove schema generation e2e test

* fmtlib, remove $id from schema

* Fix pointer paths
2019-06-05 10:36:50 +01:00
Amaury Chamayou 1f1a6001f1
Fix GitHub license detection (#105) 2019-06-03 09:38:03 +01:00
Amaury Chamayou f9fcd16c99 Update for gh-pages 2019-05-31 18:09:52 +01:00
Roy Schuster 7303faa433
Storing signed vote requests in a new table (votinghistory) (#81)
* Storing signed vote requests in a new table (votinghistory)

* Adding a script that can read the ledger

* Verifying signed votes

* Enforcing vote signature requirement

* Added documentation
2019-05-31 15:00:46 +01:00
Julien Maffre a68be8453a Synchronous join protocol (#100) 2019-05-31 11:35:35 +01:00
Eddy Ashton 3dfffb70a8
Simplify client binary by loading host details from nodes.json (#33)
* snake_case

* Attestation CAs are optional

* Add start_network.py

* Add nodes options, differentiate subcommand arg descriptions

* Load host connection details from nodes json

* Consolidate CA options, default certs and PKs

* gov-script is non-optional

* nodes.json contains node certs, not networkcert

Restore passing of file path
2019-05-07 13:48:27 +01:00