建议 #286
Recommence, and complete, development of Carrier 2.0
- 1. 发布当前
- 2. 提出尚未开始
- 3. 决定尚未开始
Abstract
We propose to form a new team of 5 remote developers called "Kademlia Forte" to recommence and complete the stalled Carrier 2.0 package. As part of this motion, we propose to employ a Distributed Network of Database nodes, alongside Ordering nodes incorporating Carrier 2.0/Java Supernodes, forming node clusters which parallel a Blockchain structure, but incorporate unlimited Data volumes for the Smart Contracts, which thereby become possible, for inter-business trading. The process of consensus-seeking which is used, relies on a Byzantine Fault Tolerant Protocol. We propose to enhance the security of this protocol (which is known to be vulnerable in the case where more than 33% of nodes are controlled by malicious agents), using our own "ChubbyChecker" package, to cross-check database records, against data recorded onto a real Blockchain, from transaction "traces" intercepted at the point of receipt of submissions (ie before the transactions "hit" the databases). Security against malicious agents is thus guaranteed. 1. https://github.com/bft-smart/library (opens in a new tab), 2. https://arxiv.org/pdf/1903.01919 (opens in a new tab) and 3. https://itotchaincloud.com.au.the-bucordo-project (opens in a new tab) . Such database networks are not required to involve trading. The networks may be simply used for mutual security.
Goal
-
Prior to, and for one month from date of project initiation, Project Manager to gather existing documentation and knowledge, from within the Elastos organisation, and the existing Elastos.Carrier.Java repository, about the workings and design of the package, including detail regarding Distributed Hash Table operation (in particular the Kademlia protocol), and detail regarding Server- and Client-Side operations. In this period, attempt to recruit 3 team members incuding 1 unfilled Team Leader role (the second is already filled).
The following refers to the proposed new Tier of Database Nodes which will rely on the Primary Tier Java SuperNodes for
Bootstrapping. The inherited Order and Intention of the SuperNode Tier will be respected. The definition of the original
Order and Intention shall be derived from the repository at https://github.com/elastos/Elastos.Carrier.Java.git (opens in a new tab). -
There will be 3 aspects to both Security (Encryption, Authentication and Authorisation) and the development of Database APIs/Standard Protocols.
I. Client-Side components: On one side will be the development of Secure Database dApp Client-Side Plugins (ie APIs using Standard gRPC and also RESTful APIs) in Typescript (the GUI to the proposed Ionic/Angular Bridging dApp - targeted at client developers. Must be generic, offering npm package(s), SDKs and excellent Documentation, with sample code).
The Bridging dApp must have access to the system, meaning:
i. A clear API contract must be defined
1. gRPC APIs - most basic business requests, and all Peer to Peer operations - (must be extensible to client developers via Plugin-registration)
2. RESTful APIs - standard web interaction requests - (must also be extensible via Plugin registration)
(RESTful API process
i. Client GUI sends REST request to Server-Side service
ii. Java Supernode service, running existing microservices, interacts with its Carrier System (ie Security-enhanced Kademlia network)
iii. Java Server makes an HTTPS request to the target website/external API.
iv. Data validation and sanitisation is performed before returning responses
v. Retrieved data can be cached for distributed access and redundancy
vi. Kademlia Protocol ensures data availability and consistency across network
vii. Data will be client-side encrypted before storage)II. On a second side will be Server-Side components
i. API Gateway: routes requests to services:
1. Services: Authentication (gRPC - uses Typescript's gRPC-Web)
Authorisation (gRPC)
Database access (gRPC) - extensible, core generic range of services
Traditional webservices (RESTful APIs using Angular HTTP client)
email,
websites,
banking services,
other webservices,
etc. (also extensible, generic core)III. Thirdly, Security: In-transit encryption (TLS 1.3), Autentication/Authorisation - Elastos DID. Client-Side Encryption for Data-at-Rest (ie in Databases). Metadata stored on SQLite databases on the nodes will have multiple keys in an asymmetric encrypted sharing system with one key per customer organisation.
-
There will thus be 2 important challenges:
I. First Challenge: Create a Generic Bridging dAPP in Ionic/Angular
i. A dApp that acts as a Middleware between our Client Developers' dApps and our planned Server-Side services (eg database access, webservice access)
ii. A dApp that allows Client Developers to extend and customise the actual Bridging dApp itself
eg Plugins for Authentication or Database Access operated via dApp Lifecycle Hooks - eg customised-Plugin registration call-back.
iii. A dApp that is accompanied by a comprehensive SDK including npm libraries and other tools, plus clear documentation with examples.
iv. End-to-end tested and passed
v. Testing to include investigation of potential security flaws due to integrating these components, including networking with Kademlia Protocol.II. Second Challenge: Our vision is of scalable network of Server-Side Carrier SuperNodes (in Java, as currently existing), with 1 SuperNode per ordinary (database) node-cluster, ie the PostGIS database Stateful Sets, BFT-SMaRt middleware Deployments and ChubbyChecker Stateful Sets on Kubernetes-structured node-networks or node-clusters, the nodes are set up such that each BFT-SMaRt container has corresponding Database and ChubbyChecker containers. These 3 containers exist as 2 Stateful Sets (database and checker) and one deployment (bftsmart) multiplied by the number of Member-Classes (or possibly as "Members") in the Business Network. Each cluster of Stateful Sets/Deployments will have launched one Bootstrapping-Capable SuperNode. The advantages to this vision are concerned with 2 fields
i. SECURITY. Although BFT systems have vulnerabilities pertaining to cases where more than 33% of nodes are under the control of malicious actors, ChubbyChecker, together with Authentication, Authorisation and in-transit encryption (ie Carrier 2.0 and TLS 1.3) virtually eliminates these vulnerabilities (with False Negatives as the exceptional case). It appears we must live with the remote possibility of False Negatives - ie when the systems report no problems when in fact there are problems, in reality. Our defence is that ChubbyChecker undertakes a series of 12 integrity checks per transaction, based on expected properties of transaction- and block-transformations, and informed by the traces of the orginally submitted transactions, intercepted at receipt (ie before passing to the databases) and recorded immediately on the Carrier 2 DHT Business Network nodes (ie on SQLite databases). Undertaking these checks is split into 2 tasks. Firstly to immediately separate from the "Critical" Transactions, the "Non-Critical" Transactions (customer-defined categories). The processing of Non-Critical Transactions is put aside until non-Peak hours by forming one file per 24 blocks containing the DHT network addresses of the Non-Critical Transaction Traces which is encrypted and written to the VMs (ie nodes). Later, the file guides the processing by ChubbyChecker of the Non-Critical Transactions. So secondly comes the processing of the Critical Transactions (including all financial as well as other transactions), which continues in real time as ChubbyChecker puts a 12-way screen across every Critical Transaction. There is, actually are third and fourth aspects to this work, which involve executing a Smart Contract on Hedera which records, for the third aspect, the calculated value of the Merkle Root of the current transaction trace set. This value is then compared to the previous value for consistency. The fourth aspect involves a less frequent recording, on Smart Contract, of Whole-Of-Database Merkle Roots, at intervals that are yet to be decided. The processes just described are basically Anchoring Data Recorded on Carrier 2 Business Network Nodes, as well as (separately) a series of All-Data Cross-Checkable Merkle Root values from the PostGIS database, to the Blockchain, during which Consistency and Security are cross-checked. The 12-point Cross Checks are extended by the checking of the equalities within 2 series of Blockchain Smart Contract Merkle Root records. Anchoring all this to the Hedera Blockchain is our strategy for ensuring faithful copies of data throughout the systems.
ii. SUPPLY-NETWORKING becomes possible with client-side encryption being employed to seal data at rest from unauthorised access (despite all nodes carrying copies of all other nodes' transactions). Asymmetric encryption techniques make secure sharing of information possible. Centralisation of these database/middleware systems in proximal Supernode networks in datacentres would enhance bandwidth availability and thus performance. We would need to make these Carrier-BFT-SMaRt/PostGIS/ChubbyChecker "nodes" interoperate in connection with the Carrier 2.0/Java "Supernodes". This needs to be discussed, initially with CRC, and then, if approved, within the development team. ChubbyChecker can work independently of Carrier 2.0 and it appears that the BFT-SMaRt containers would be required to provide a Java interface to the secure container representing the Carrier 2.0 distributed network (derived from a Java Supernode). Note that there would, in the final analysis, be many Java Supernodes and more Java Database Nodes, in fact the number of database nodes would correspond to the total number of BFT-SMaRt server/Deployments which each comprise one node in the totally-replicating networks. Also, there would be many independent networks. Typically in the case of Supply Networks, one Business-related Supply network would correspond to one or several installations, or VM clusters, of BFT-SMaRt/Carrier 2.0 nodes, with one node for each participating Supplier Class, and one for each Consuming Network Member. The number of Nodes allocated to each VM is variable as long as there are as many nodes as Member/Member-Classes in the full network, including all VMs. The networks do not need to always be "Supply Networks". Independent businesses can be grouped with others on independent nodes/Supernodes. The networks thus formed exist primarily for mutual security guarantees only, and not for trading or communication. Also there can be extraneous Nodes "riding along with" an enterprise network, for security, but separately networked while sharing the VM cluster with the enterprise network.
Careful consideration must be given to the allowed content of inter-Business-Network metadata, which will be designed from the point of view of security and auditability at a global level, and stored on the Supernodes in their SQLite
storage databases, yet content which must exclude transgressions of Business and Personal Privacy. -
If it is agreed to implement BFT-SMaRt as the UNIVERSAL MIDDLEWARE IN CONNECTION WITH POSTGIS AS THE UNIVERSAL, SPATIALLY EXTENDED DATABASE, all executed and all committed transactions can be cross-checked against a blockchain-recorded set of strategically intercepted transaction traces by our proprietary system, "ChubbyChecker", freely made available to CRC, including participation in Byzantine Fault Tolerant consensus-replicated database networks (BFT-SMaRt: see 1. https://github.com/bft-smart/library (opens in a new tab), 2. https://arxiv.org/pdf/1903.01919 (opens in a new tab) and 3. https://itotchaincloud.com.au.the-bucordo-project (opens in a new tab)) - this applies to gRPC and REST communications.
-
As an experiment, we have already successfully containerised the Carrier 2.0/Java supernode, as it presently exists on Github. We then moved on to develop an interface and communication protocol between the Java BFT-SMaRt package and the Carrier 2.0/Java Supernode package. As we will use a Kubernetes setup, we would create Services and Deployments for BFT-SMaRt and Carrier 2.0. We havee decided to deploy the 2 latter packages in 2 Kubernetes Deployments.
-
As for the Front End (Client-Side)dApps, the goal is to develop an extensible dApp employing Lifecycle Hooks to facilitate Plugins (eg providing opportunity for Client Developers to register their own Custom Plugins). This Bridging dApp must have all Security (Encryption, Authentication/Authorisation) in place as well as a generic set of Database interfaces including a full range of Spatial queries, data visualisation components, and basic screens, and must provide access to gRPC and REST systems, and provide access to a Personal level, as well as a distinct Enterprise-Network-level, Peer to Peer system (on gRPC) operating via the Java Supernodes in the case of Personal P2P, and via the Database Nodes in the case of Enterprise P2P.
-
If the previous plans regarding BFT-SMaRt are approved, we intend to develop the Server-Side code on Ubuntu 22.04 using k3d (k3s Kubernetes on Docker), a Project auspiced by openSUSE Rancher Organisation, or possibly Microk8s on Multipass nodes, to avoid cloud costs, enabling a compact Kubernetes-compliant environment, that fits on a desktop/laptop computer, with at least 32GB RAM. We request that our developers be provided with 64GB computers. The Front End development will also take place in this environment so that testing and integration are possible. The Ionic/Angular Platforms will be on the same hosts, but separated from 2 Canonical Multipass virtual machines, representing the Supply-Networked Backends, upon which Server-Side development, in k3d or microk8s, and Java, will occur.
-
The development process, for our team, and for Client Developers, will be fully documented.
-
In Production, a Client Organisation would need to establish a Cloud presence with Kubernetes (eg GKE), employing Traefik as the API Gateway (involving the use of Ingresses).
-
Within one month from date of initiation, John Olsen, as Project Manager, to finish recruitment, and to commence 2 Team Leaders -
a. Java Team Leader
b. Ionic/Angular Team Leader (who has already accepted an invitation)also, within one month from initiation date to finalise appointments and prepare to commence the development team of 2, including 1 Java Server-Side developer, and 1 Ionic/Angular developer.
-
Within 6 weeks from date of initiation, Project Manager, with the 2 Team Leaders, to complete the initial process of understanding how to approach the tasks related to the continued development of Carrier 2.0, based on the use of the Carrier 2.0 Java Supernodes, having come to agreement with CRC on the terms of the Project. Project Manager to develop a detailed (updatable) Project Plan with explicit fortnightly milestones in this period. The specifics will include how we intend to incorporate the necessary security and privacy features, absent from the native Kademlia protocol (encryption mechanisms, digital signatures, access control), and how we shall implement generic database access, using Standard Protocols and APIs, including access to databases that employ BFT-SMaRt middleware, and interfaces to databases with Spatial extensions (if agreed). The format shall be a fortnightly updatable timeline from beginning to end of project. Note that much of the work relating to generic database interfacing has already been completed in BFT-SMaRt.
-
Within 45 days from date of initiation, complete the familiarisation of the teams with the project, (the teams will have started 6 weeks after initiation date), and Team Leaders to develop work plans with team members, with each team working as a pair.
-
Pay Project Manager and Team Leaders 1 month's salary after 2 months from initiation date.
-
Pay team members one month's salary after one month's work.
-
Continue paying Manager and Leaders together, followed by Team salaries approximately 14 days later.
-
Project Manager to keep all external stakeholders informed of progress in development with detailed monthly updates.
-
Project Manager to produce detailed fortnightly (updatable) schedules, and to keep sending monthly updates of these to CRC.
-
If option to support exclusive use of BFT-SMaRt with PostGIS is approved, Project Manager to complete programming of ChubbyRegister (Version 2.0, to be incorporated within BFT-SMaRt in Java) and ChubbyChecker (Version 2.0, in GO, as a separate container image) by milestone at 28th October, 2024.
-
Continue process until project completed (25th March, 2025).
-
Angular Team to provide range of tools and npm/other packages to be incorporated into SDK to enable extension/adaptation of Ionic Bridging dApp by client developers.
-
Project Manager to provide instructions to containersise Carrier 2.0/Java supernode, BFT-SMaRt package and ChubbyChecker (the latter 2 only if agreed by CRC)
-
Project Manager to complete adequate, helpful and friendly Project Documentation, together with code samples, prior to delivery of Project.
Motivation
The Cyber Republic Secretariat has advised us that the previous Trinity Tech Team has departed, leaving Carrier 2.0 incomplete and undocumented.
We need the Carrier 2.0 package to be completed to help ensure safe net transport accessibility and security, for our own dApps, and for the broad Elastos Community.
In particular, Carrier 2.0 is necessary so that business users, as much as individuals, may avoid reliance on the fault-ridden Domain Name System (DNS) where possible, now a dinosaur from 1984, and much-loved by malicious agents.
Individuals and businesses alike deserve network transport that is secure and dependable. That network transport should be Carrier, especially as we intend to provide a business-like, Server-side, gRPC service (for database and Peer to Peer access), alongside secure Traditional Website/Services using RESTful APIs: eg website/webservice access, some content delivery, email, etc, with both gRPC and REST services on Carrier2-centred, Java-based Supernodes (existing).
Our vision is of a 2-level set of nodes:
-
A top level Set of Carrier 2 SuperNodes - maintaining the existing repository. These are Bootstrapping Nodes.
-
A Tier-2 layer of Database Nodes, running much of the SuperNode software, but without the BootstrapCommand and associated
classes.
The repository incorporates the existing 2 repositories from https://github.com/elastos/Elastos.Carrier.Java (opens in a new tab) and https://github.com/bft-smart/library (opens in a new tab), although we have greatly enhanced the latter repository since we began working with it in 2022.
The deployment sequence would mean:
-
initialising and starting a BFT-SMaRt Node Network which must launch one Carrier 2 Supernode per cluster
-
Deploy and Bootstrap a Database Node Distributed Hash Table (DHT) Network (ie a Carrier 2 network) per cluster (or across clusters if such is the business network's scope) as a second tier - similar to SuperNodes but without Authority or capacity to Bootstrap other Nodes. The DHT network of database nodes is bootstrapped by the Supernode it launched for itself earlier, or a neighbour in the case of failures. There are thus 2 aspects to networking: BFT-SMaRt & Carrier 2. Both must be able to work independently, but all BFT-SMaRt communication - both internal to the system, and with clients, must be ensured to go via TLS/1.3-secured Carrier 2 channels. The same constraints apply to PostGIS and ChubbyChecker communications.
Plan introduction
Under the leadership of John Olsen, who is an ex-Director of Community Housing Companies in Australia, with more than 20 years experience, and who is also the creator of his Software as a Service company's original Bucordo Project, having also trained as a Database Developer and Java Programmer, we seek to hire 2 Java Server-side database developers, 2 Ionic/Angular developers, including 2 as Team Leaders, 1 for each discipline, to undertake completion of development of the Carrier 2.0 package. Initially we will employ 5 people (1 Project Manager, 2 Team Leaders and 2 team members), if funding is approved. We undertake to report monthly on progress towards the milestones set out here.
As further detail on the Project becomes apparent, the Project Manager will incorporate new knowledge in the monthly reports to CRC, in order to specify more measurable (fortnightly) goals than we can provide at this stage. The project will provide a set of enterprise-strength, net transport security, privacy and database access control guarantees, which our company, as well as others, are relying upon to incorporate in dApps. It will incorporate a mobile- and user-friendly Bridging front end dApp. This will allow Client Developers to extend and adapt the Bridging dApp itself, for their own requirements.
We assume that all dApps using Carrier 2.0 employ the gRPC protocol buffer system for database access and for the Peer to Peer communication system. We will also provide access to Traditonal webservices using a Kademlia-compatible REST API system. The current SuperNode Design will be retained, as the only Authorised mechanism for Bootstrapping all other nodes.
Added to this Top Tier will be a Second Tier of Database Nodes. The Database Tier will feature most of the software pertaining to the SuperNodes, with the exception of the ability to Bootstrap other nodes. (the BootstrapCommand and associated classes are absent from Database Nodes).
It is important to note that our motivation for completing the Carrier 2.0 project, aside from providing the Elastos Community with an excellent and much-needed package,is very much determined by the complex needs of an Enterprise Application Suite we are developing separately. This will place a high level of demand on the features of the final Carrier 2.0 package we must produce. We believe this to be a healthy situation for the quality of the final outcomes.
We hope to obtain CRC's agreement that, due to the much enhanced security features over a standard database installation, in addition to the enabling of automated Supply-Networking, made possible by the Project Manager's company's Bucordo Project - 1. https://github.com/bft-smart/library (opens in a new tab), 2. https://arxiv.org/pdf/1903.01919 (opens in a new tab) and 3. https://itotchaincloud.com.au.the-bucordo-project (opens in a new tab) - we be able to work exclusively with the University of Lisbon's BFT-SMaRt middleware system (in connection with free provision of our proprietary ChubbyChecker package, which seals security vulnerabilities in BFT-SMaRt - see "Abstract", "Goals", and 3rd reference). We also hope CRC will see wisdom in choosing a Spatially Extended and free database, PostGIS.
We will not, however, be neglecting SQLite, as this database, at the client/user/elastos-member level, as well as at the node data level, is pivotal. In fact we are hoping to be able to partition the database for a "Personal" and "Business" separation. We do intend to develop Intra-Business-Network Peer to Peer communications which will be restricted in scope to the registered Business Network of the client.
One advantage of allowing this, is that a lot of the preliminary Server-side work has already been completed by the Project Manager's company, including the successful containerisation of the Carrier 2.0 Java Supernodes, a partially complete implementation of BFT-SMaRt integration, with much else besides, and this would all be made available, freely, for the purposes of this Project. This would include the publication of documented instructions and code.
A second advantage is probably the most important one, concerning the much-enhanced Backend security obtainable by employing BFT-SMaRt alongside our own ChubbyChecker package, which, when used together, guarantee security from external hacking, including any anti-trust actvities of the database operations teams themselves. Note that actual "insider jobs", perpetrated by registered users, are not protected against, although by using something like the free and open-source Elastic Stack with Machine Learning, AI-led Usage-Pattern Anomaly Monitoring and Detection is possible, thus closing those internally-originating security loopholes. If all these techniques were in place, any organisation would be all-but impenetrable, with the extremely rare (but technically possible) exceptions of "False Negative" results, where the systems fail to report problems that actually do exist. Operators require Product Liability Insurance to cover this case.
However, we do not intend to develop with the Elastic Stack in this Project.
These are our 12 Cross Checks:
Check_1. Across all transactions, in Post-Registration-execute and in Post-
Registration-commit/abort phases, block sequence numbers must be continuous.
Check_2. “In the Pre-Registration files, ostensibly continuous among the K Blocks,
the Traces cannot be divided into Blocks a priori. However with ChubbyRegister
writing an encrypted file, containing the Sub-Phase-3 Smart Contract’s Id, that
corresponds to the last Block in the current Ultimate Check, locally (ie to the VM
or “Installation”), named with the preceding check-phase’s “last Block Number +
24” , then, ChubbyChecker can securely assign traces, from the Preregistration
Stage, to blocks, working backwards, and check Block continuity a posteriori.”
On each node, using this method, the [total of Preregistered (submitted)
Transactions in one Ultimate Checking Phase] must equal [(total of TxUUID’s
executed) – in the Post-Registration-execute phase] – AND must equal [(total of
TxUUID’s committed + total of TxUUID’s aborted) in the Post-Registration-commit/
abort phase], across all Post-Registered Blocks in the same Checking Phase.
Check_3. Across all checked transactions (Pre-Registration-
submit, Post-Registration-execute and Post-Registration-
commit/abort phases), each signature is traceable to a current
client from the current installation’s range of member-class
servers’ (ie nodes’) clients.
Check_4. Across all checked transactions, the ‘entnum’ field
in the transaction’s contents, when compared to the client’s
registered ‘entnum’, must match.
Check_5. Across all checked transactions, the ‘schema’ field
in the transaction’s contents, when compared to the client’s
available ‘schemata’, must match one item. These are fully
qualified names ie database.schema.table.
Check_6. Across all checked transactions, the ‘amount’ field
in all financial transactions, and, where amounts exist,
in any other transaction (amount fields include the string
‘_amnt’ in their names), must be constant across
preregistration (submission), execution
and committal/roll-back.
Check_7. On each node, TxUUIDs are generated at Pre-Registration, so in each of
the k BlockSeq numbers, for: (a) Pre-Registration-submit phase; (b) Post-
Registration-execute phase; and (c) Post-Registration-commit/abort phase: [each
TxUUID occurs once exactly], AND [the TxUUIDs in (a) are “1 to 1” AND “onto” the
sets for (b) AND for (c)]. See Check_2 above for method of distinguishing blocks.
Check_8. On each node, across phases (b) and (c), [Total of TxUUID’s with
opCodeExec == “true” (which should be all TxUUID’s)] == [Total TxUUID’s with
opCodeCommit == “true”] + [Total TxUUID’s with opCodeAbort == “true”].
Check_9. On each node, the total number of structs in the array of structs,
spanning each BlockSeq (k), is equal to the agreed number (eg 1,000) of
transactions per Block, and this holds for all of (a). Pre-Registration-submit, (b).
Post-Registration-execute, and (c). Post-Registration-commit/abort phases. Here
the particular transactions in each BlockSeq for phases (a) and (b) are determined
a posteriori by reference to phase (c), as in Check_2.
Check_10. Across all nodes, and for both Post-Registration-execute and
Post-Registration-commit/abort phases, for a set of transactions in
BlockSeq (k), with TxUUID = z: ([Total of TxUUID’s with opCodeExec ==
“true”] == [Total of TxUUID’s with opCodeCommit == “true”] OR [Total of
TxUUID’s with opCodeExec == “true”] == [Total of TxUUID’s with
opCodeAbort == “true”]) AND len{TxUUID = z} = N(i), the Number of
nodes in the installation [i] being examined , for all (k, z) in [i].
(Transactions in k determined a posteriori from phase (c), as in Check_2).
Check_11. Across all nodes, at the Post-Registration-commit/abort phase,
for a full set of transactions in BlockSeq (k): the ordering of transactions
must be constant for all member class servers (replicas or nodes), and for
all k under examination.
Check_0.
consists of the requirement that, Across all nodes, after each block of transaction commit processes, all the State
-Change Hashes recorded by all replicas (ie nodes) must be identical.
We propose these 12 cross checks with the open invitation, to anybody concerned, to publish a proof or disproof of the
necessity and sufficiency of these 12 conditions, or a consistently derived subset thereof, assuming the
incorruptibility of the Smart Contract recordings, to guarantee absence of fraud and technical error in the databases
of any Byzantine Fault Tolerant node-cluster.
Obviously, the proposed guarantee, also assumes the existence of a system of halting affected production, alerting and the conducting of a Root Cause Investigation.
Questions going to corruptibility of the blockchain recordings, will undoubtedly revolve around the accessibility of
the originating interceptors of requests, the BFT-SMaRt containers where "ChubbyRegister" is running, along with the
opposite endpoint at the Hedera Node. Since it is to be ensured that all communications proceed via
Carrier 2, we believe the inaccessibility of the ChubbyRegister process is guaranteed. This also applies to all
endpoints involved in ChubbyChecker's communications and processes.
The third advantage is that by leveraging the required networking of the BFT-SMaRt system, a side-effect is the enablement of Supply Networking and automated inter-business Smart Contract-based trading. These Smart Contracts are private, and allow unlimited data volumes.
The fourth advantage lies in the fact that BFT-SMaRt is founded on a distributed networking methodology, which makes it entirely compatible with the Carrier 2.0/Java repository.
The fifth advantage is that Carrier 2 and BFT-SMaRt are both coded in Java.
The Kademlia Protocol (2002) is the (Unsecured) Foundation for Carrier 2
Kademlia can use UDP, TCP or other protocols for system communication
The Trinity-Tech team has implemented a Server Node as a Java Supernode over TCP. This is a Bootstrapping Node.
ITOTCCA is extending this with a Consensus-Based, Replicating Database/Middleware Distributed System (BFT-SMaRt-on-PostGIS) which is subjected to a 12 Stage Data Integrity Test for all transactions, and is designed to protect, work with and respect the original Elastos.Carrier.Java intentions and integrity. The Carrier 2 DHT/BFT-SMaRt network is the foundation for the distribution and storage of Enterprise Metadata (ie on SQLite databases on each node), and this data contains only encrypted technical trace information from the enterprise transactions themselves (note the fields involved are asymmetrically encrypted and privately shared with the SaaS Operator). Thus there are 2 networks operating together: 1. The client-side encrypted, Byzantine Fault Tolerant Bucordo Network of Databases and Middleware (PostGIS/BFT-SMaRt/ChubbyChecker) and 2. the Carrier 2 Distributed Hash Table network involving those same Bucordo nodes. The (SaaS-Operator-encrypted in asymmetric connection with Customer organisations - ie multiple keys) metadata goes on DHT, enterprise (client-encrypted) data on BFT/PostGIS.
Trinity-Tech & ITOTCCA added security mechanisms - TLS encryption, Authentication with Ionic, Kubernetes and PostGIS RBAC (Authorisation mechanics)
Kademlia: Petar Maymounkov & David Mazieres, New York University, 2002:
Structure (from https://en.wikipedia.org/wiki/Distributed_hash_table (opens in a new tab)")
"The structure of a DHT can be decomposed into several main components.[13][14] The foundation is an abstract keyspace, such as the set of 160-bit strings. A keyspace partitioning scheme splits ownership of this keyspace among the participating nodes. An overlay network then connects the nodes, allowing them to find the owner of any given key in the keyspace.
Once these components are in place, a typical use of the DHT for storage and retrieval might proceed as follows. Suppose the keyspace is the set of 160-bit strings. To index a file with given filename and data in the DHT, the SHA-1 hash of filename is generated, producing a 160-bit key k, and a message put(k, data) is sent to any node participating in the DHT. The message is forwarded from node to node through the overlay network until it reaches the single node responsible for key k as specified by the keyspace partitioning. That node then stores the key and the data. Any other client can then retrieve the contents of the file by again hashing filename to produce k and asking any DHT node to find the data associated with k with a message get(k). The message will again be routed through the overlay to the node responsible for k, which will reply with the stored data”
So, clearly, in the case of providing Database-Node Access, our task is to utilise adapted 'put(k, data)' and 'get(k)' messages to access Database Records which are effectively the file-data mentioned above. This would mean not only assigning a filename (using a [network, database, schema, table, record-id] identifier) to every database record across clusters of networks and databases, but also assigning nodes to individual "client devices". So a record identifier [n, d, s, t, r] would be SHA-1 hashed to produce the 160-bit key (k), and this set of keys would exist for all nodes (ie client devices and database records). Each client device would participate in 2 separate systems.
- A Peer to Peer network (P2P), utilising SQLite for local data storage on each device, and,
- The Elastos Database Access Network (EDAN), based on PostGIS/BFT-SMaRt Database Nodes residing with Elastos Carrier Node Software, and including "Enterprise Peer to Peer" networking bounded by the Business Network of the client. This network
would be partitioned from the client's Personal P2P storage, ie there would be Personal and Business partitions of
SQLite.
On the EDAN there would be Client and Server Nodes, with each Database Record [N, d, s, t, r] representing one filename on all Business Network Database Server Nodes, and each Client Device representing one Client Node [client's address on the Elastos Network].
However, due to the limited (though enormous!) scope of a 160-bit key system, and the very large number of "filenames" (Database Records) demanding unique keys, the EDAN will be sharded into mutually exclusive Partitions comprising one second tier Business Network each. For global connectivity and routing, the 160-bit keys would be partitioned into one prefixing 32-bit key to identify the Supernode, with 128 bits reserved for the second tier networks, and providing enough keyspace to allow for all records of second tier as sub-networks. This same space size would apply to each Supernode's Business Network.
So we will be dealing with Database Records N:{d}:{s}:{t}:{r}, where N is given by the 32-bit Supernode key for the second-tier business network, and the PostGIS records correspond to (d,s,t,r) on the Business Network's databases. The network metadata has keys in the 128-bit space, prefixed by the same 32-bit key as the PostGIS records.
The 128-bit keys are represented by a 32 digit Hex String while the Supernode's id is given by a 8 digit Hex String which is prepended to the metadata key to give a resultant 40 digit Hex Key for all Metadata, globally. Every metadata record will carry copies of the related PostGIS transaction key to which it is related as a Trace. The unique transaction key for records on PostGIS is to be given by the same 40-digit Hex String as for the Metadata records, except prepended with textual (d,s,t) entries for human reading and searching of PostGIS records.
Each metadata record corresponds to a PostGIS entry record, being the trace of that transaction, and representing one traditional Kademlia "filename" on all Servers (Nodes) on Network N, with each Client Device representing one Client Node [still simply client's address on the Elastos Network].
The unique 128-bit record keys are generated by our GeneralServer class by calling createTransactionTrace(), and appended to the 8 Hex digit Supernode Id.
An Entry Transaction may mask several consequent triggered transactions on PostGIS, with an entry table corresponding in form to the data input form providing the original data. A recalculation and redistribution process follows original data input at the Entry Transaction, which sets data in the more Business-Information Structured section of the database.
In order to be well prepared for a positive outcome on this question, we have already commenced work on the database tier.
Naturally, if we obtain approval to proceed with this project, we would continue to provide Public access to an equivalent repository, and also donate a publically accessible body of code for the combined BFT-SMaRt/Elastos.Carrier and our ChubbyChecker container images.
Also, if approval is given for this option, our developers (with the exception of the Project Manager and the Angular Team Leader), would require new 64GB RAM laptop computers. An amount has been allowed at the first milestone (27th August, 2024) for 5 of these (MSI Katana Laptops), to be purchased in Perth, Australia, and shipped, initially, to the 3 other team members. Please refer also to the Budget Statement.
In any case, we undertake to develop broadly-applicable generic database APIs for a wide range of database brands, determined by consultation with CRC, including our own need to interface to a BFT-SMaRt/PostGIS system, if agreed. The latter system will require special attention towards adapting to the PostGIS database, with its Geographic/Spatial extensions. We will be required to add further generic Spatial service definitions and implement the corresponding functionalities. We believe this will have broad commercial application and benefit.
SUMMARY OF SUPERNODE BOOTSTRAP SEQUENCE
On VM-cluster with 5 effective Kademlia Nodes (4 x BFT-SMaRt/PostGIS + 1 x Loadbalancer) and one Kademlia SuperNode. Startup script initialises and instantiates the 4-BFT-SMaRt Node network, ends by firing:
"bftsmart.demo.itotcca.GeneralServer $NODE_INDEX" for each of the 4 Orderer (BFT-SMaRt) Nodes.
Then forked process:
BFT-SMaRt
initialise GeneralServer, and finalise this initiation process showing: "Ready To Process Operations".
This is followed by starting bftsmart.demo.itotcca.GrpcProxy, and, ultimately, bftsmart.demo.itotcca.GeneralClient.
The first GeneralClient in the foregoing launch sequence will launch;
the solo Carrier 2 Java Supernode for the cluster.
All BFT-SMaRt nodes run their own copy of a DHT-Network Initialiser which includes a bootstrap request.
We need to ensure that Carrier is used for all internal and external communication including all code involved in
communications, such as internal BFT-SMaRt communications and all external comms with clients. - For all Carrier
classes this assurance is present - We need to isolate communication-based classes in BFT-SMaRt, ChubbyChecker and
PostGIS, including bftsmart. & bftsmart.demo.itotcca.
- Internal:
- External:
We also need to ensure PostGIS and ChubbyChecker comms go via Carrier 2, (ie uncover all comms classes)
and ensure that the Bootstrapping process is enforced for each new database node, and all containers within. We also
must ensure that the Loadbalancer for the cluster, and the ELA/ETH Chain Node are also able to be Bootstrapped.
In order to simplify the recovery process after failovers, BFT-SMaRt and the Loadbalancers will be deployments.
Other important classes involved in BFT-SMaRt operations
/GenericServiceImpl.java
/TableColumnMetadata.java
/InsertRecordRequest.java
/InsertRecordResponse.java
/UpdateRecordRequest.java
/UpdateRecordResponse.java
/SelectRecordRequest.java
/SelectRecordResponse.java
/DeleteRecordRequest.java
/DeleteRecordResponse.java
And
Carrier
Instantiation of each node-cluster is accompanied by inclusion of the "carrier2-supernode" container as a
StatefulSet, after Loadbalancer & Database/bftsmart/checker Nodes.
A 4-member-class Network, therefore has 4 "database-middleware-checker nodes", 1 Loadbalancer and one Carrier 2
SuperNode.
Initialize SuperNode: Create a supernode with a unique Carrier ID, using Elastos DID. Assign it
to the correct shard (network ID).
Populate SuperNode Routing Table: Which specific method(s)? Populate the supernode’s routing table with initial
contacts obtained from the other bootstrapping nodes.
Perform SuperNode Initial Lookup: Which specific method(s)? Perform an initial lookup to verify the connection and
populate the routing table with additional nodes.
Connect to, and Bootstrap BFT-SMaRt Nodes, Databases, ChubbyCheckers and the Loadbalancer: Elastos contributes the
BootstrapCommand to the process (introduce new nodes to DHT network)
Populate new Nodes' Routing Tables: Which specific method(s)? Populate the nodes' routing tables with initial
contacts obtained from the bootstrapping node.
Perform new Nodes' Initial Lookups: Which specific method(s)? Perform an initial lookup to verify the connections and
populate the routing tables with additional nodes from within Business Network.
Note: In all the above, the extent of visible Networks must remain strictly constrained to
the Nodes' own Business Network.
BFT-SMaRt is Byzantine Fault Tolerant middleware, which orders and replicates submitted transactiions to all database nodes in a network of databases. The system enables enhanced security and also the operation of unlimited data-volume, and private, Smart Contracts (ie in a Supply Chain). Our implementation of BFT-SMaRt already uses gRPC communication and methodology, and is completely suited to the present tasks. Our company seals the system against the inherent vulnerability of Byzantine Fault Tolerance (the fact that undetected hacking and external fraud is possible if more than 33% of database nodes are controlled by malicious agents), using a proprietary and innovative system of Transaction Cross-Checking, laying off the risk of database hacking onto the ELA/ETH Blockchain, by recording traces of incoming transactions, intercepted at source, onto the Blockchain.
Budget introduction
We are estimating that the entire project, to restart work on Carrier 2.0 where the Trinity Team ended, will take 33 weeks to complete and deliver, with friendly, informative documentation included, in English, an extensible Bridging dApp with SDK including npm package(s) for client Developers, a security-enhanced in-transit system, encryption for data at rest (in databases), and very much enhanced protection against hacking for the databases (if agreed by CRC). We would like to use the free and open source, Spatially extended (ie Geographical) database called PostGIS (an extension of PostgreSQL), in conjunction with the University of Lisbon's BFT-SMaRt.
There will be:
1 sub-team of 2 Java server-side developers; one Senior Java developer as Java team leader; (2)
2 Ionic/Angular developers; with Muhammad Zohaib Ashfaq as Angular Team Leader (already accepted invitation). (2)
John Olsen as Project Manager: (1)
for a total of 5 team members.
Junior team members (1 Java and 1 Angular team members) will earn 1,500 ELA per month each, for 6 months. Teams to work in pairs as follows (flexible):
- Team J1 Java server-side: Bootstrapping procedures (SuperNodes & Database Nodes)
Database Access Plugins (gRPC-compatible, HTTP2)
BFT-SMaRt/Carrier 2.0 integration (gRPC-compatible, HTTP2)
gRPC Systems (HTTP2)
2 Peer to Peer systems - Enterprise and Personal
Plugins/Lifecycle Hooks - Extensibility
Security
RESTful APIs - (HTTPS) - Trad. webservices
Spatial extensions
Plugins/Lifecycle Hooks - Extensibility
- Team A1 Angular - Bridging dApp
- Plugins/Lifecycle Hooks - Extensibility
- Security Enhancements
- Database BFT-SMaRt
- Basic screens
- 2 Peer to Peer systems - Enterprise and Personal
- Databae Spatial extension
- Data visualisation components
- gRPC Systems
- RESTful APIs
the Senior Java developer (Team Leader) 1630 ELA per month for 28 weeks,
and the Senior Angular developer (Team Leader) 1630 ELA per month for 28 weeks.
The Project Manager will earn 1630 ELA per month for 28 weeks.
There is expected to be a recruitment hiatus of one month from initiation date, while we find developers.
If approval is given for the BFT-SMaRt/PostGIS option, our developers (with the exception of the Project Manager and the Angular Team Leader), would require new 64GB RAM laptop computers on which to develop. An amount of 5800 ELA has been allowed at the first milestone (17th June, 2024) for 5 of these (MSI Katana Laptops), (where only 3 will be bought initially, the remainder to be spent only if/when contingency developers are employed) to be purchased in Perth, Australia, to be shipped directly to the team members. NOTE: If CRC can provide access to cheaper computers, that would be appreciated.
We have included provision for 1 Java developer and 1 extra Angular developer as contingency measures, allowing for 4 month's payment each.
We have omitted provision (at the initiating payment) for engagement of the Recruiting Agency as we expect the Council to arrange for the engagement of a Java Team Leader, a Java team member and an Angular team member.
In the event of the project being completed before March 25, 2025, or also, if the extra team members are unused or only partially used, and if we can save money on the Recruiting Agency, the remaining funds will be returned to CRC. As an indication, if no contingency payments are utilised, (thus also saving recruitment fees for contingency workers), and the project takes the full term, we would expect to return 4 * (1500*2) + 2320(contingency computers) = 14,320 ELA.
This would represent a total expected eventual Project cost of 66,599 - 14,320 = 52,279 ELA. Also, if the required computers cost less than anticipated, those savings will be returned. Any other overall savings, including any savings made due to appreciation in the ELA price, will also be returned.
HOWEVER, as it appears that the amounts quoted previously are considered too large to afford for CRC, our next position is to offer to perform the same work for whatever rate of pay (starting at 50% discount, as above) would be more acceptable for the Council, as long as the Council can provide developers to work at those rates. John and Zohaib are prepared to work at the lower rate, as necessary.
Budget amount
66599
Plan
| Milestone goal | Date |
|---|---|
Achieve funding approval from CRC. | 2024-08-26T14:00:00.000Z |
Continue preliminary research into Elastos' existing knowledge and code base regarding Carrier 2.0. . Initiate Project Repositories on Github. | 2024-09-09T14:00:00.000Z |
Select and commence 2 Team Leaders (Java, Angular) and complete selection and appointment of Java/Angular development teams. | 2024-09-23T14:00:00.000Z |
Teams to commence work today. Ensure all team members understand our objectives, how existing package currently works, how package will work, and stages to get there. | 2024-10-07T13:00:00.000Z |
Angular & Java Leaders to continue writing test code for their features. | 2024-10-21T13:00:00.000Z |
Angular & Java team leaders to continue with test/integration code. 2nd Angular team to continue with Database Plugin query systems (Spatial queries and BFT-SMaRt interfaces, or generic SQL APIs) in liaison with Java teams. | 2024-11-04T13:00:00.000Z |
Angular and Java team leaders to continue writing test/integration code for all Angular and Java features, and to continue assisting their teams with problems and liaising with Project Manager. Java team Tasks: Integrate Java supernode system with BFT-SMaRt/Spatial system or SQL system. Also develop Java-based gRPC and REST systems. Design & implement Plugin Architecture, provide Lifecycle hooks and extension points for Clients. Implement API Gateway using Traefik - include gRPC and REST. Implement Core/generic SQL features. Pay Manager and Leaders one month's salary. | 2024-11-18T13:00:00.000Z |
Angular team to continue to develop Database gRPC query system, including generic interface, BFT-SMaRt interface, and spatial queries. Angular team continues with developing Lifecycle Hooks and Plugin mechanisms (eg Custom Plugin Registration System). | 2024-12-02T13:00:00.000Z |
Both sub-teams to continue to work as scheduled. Work on Java and Typescript REST APIs and gRPC system to be ending. Work on Database Standard APIs, Spatial interfacing and Plugins continuing. | 2024-12-16T13:00:00.000Z |
Angular and Java sub-teams continue to work on range of supported database APIs and plugins, and Spatial system. | 2024-12-30T13:00:00.000Z |
Angular and Java Team Leaders to prepare to complete test and integration code, and final testing in consultation with Java and Angular teams. | 2025-01-13T13:00:00.000Z |
Angular and Java teams completing work on range of supported database APIs and plugins. Heading towards completion and testing of Plugins and also preparing to test and integrate Encryption, Authentication and Access Control Systems, gRPC system and REST APIs. | 2025-01-27T13:00:00.000Z |
With 1.5 months remaining, we should be doing final debugging, testing and integration work. | 2025-02-10T13:00:00.000Z |
Java and Angular code to be complete in all areas, except final debugging. Project Manager to report on state of Project to CRC, and to continue preparing final documentation & sample code. | 2025-02-24T13:00:00.000Z |
Project to be getting ready to deliver, with debugging, testing and integration of all components nearing completion. | 2025-03-10T13:00:00.000Z |
Project to be ready to deliver, with debugging, testing, integration and proving of all components complete. Apple and Android dApps should be available for free download and installation, from respective Stores. Also npm package(s) forming part of SDK need to be complete and available. Backend/Database SQL Server, Spatial extension, and BFT-SMaRt middleware interfaces should be complete, tested and proven. gRPC and REST communication systems should have been proven. Project Manager to have completed all documentation, ready for publication. Pay team final month's salary. Pay Project Manager and Team Leaders final salary payment for one fortnight. | 2025-03-24T13:00:00.000Z |
Budget
| Type | Milestone | Amount | Criteria |
|---|---|---|---|
ADVANCE | 0 | 5000 | Achieve funding approval from CRC. Commence consultations with CRC members as to their needs in relation to Carrier 2.0. Communicate our own desires for Carrier 2.0. Reconcile all parties' needs. Establish whether a universal implementation of the BFT-SMaRt middleware with PostGIS database is approved. Continue research process. Commence recruiting. Project Manager to order 3 new 64GB RAM MSI Katana computers, saving provision for 2 more if contingencies needed. |
CONDITIONED | 1 | 1223 | Continue research into Carrier 2.0 and complete process of team recruitment. We aim to have a team of one Project Manager (John Olsen), one Senior Java team leader, 1 sub-team of 2 Java developers each (with one sub-team of 2 as "contingency" across final 4 months of Project). Additionally we would like to produce a friendly dApp interface (Ionic/Angular) and thus we have invited Muhammad Zohaib Ashfaq to fill the role of Angular Team Leader. We have also allowed for recruitment of 2 team members for Zohaib and for 2 Angular developers as contingency across 4 final months of project. |
CONDITIONED | 2 | 1223 | Commence 2 Team Leaders by today. Decide whether we can proceed with our plan to use BFT-SMaRt/ChubbyChecker/PostGIS, or else make range of databases to be supported as generic as possible. Initiate Project Repository on Github. With Project Manager and Team Leaders in place, establish communication systems (Slack). Team Leaders to be preparing to engage team members in project. |
CONDITIONED | 3 | 1223 | Teams to commence work today. |
CONDITIONED | 4 | 1223 | Pay Manager and Leaders one month's salary. Project Manager to submit report on current state of Project. |
CONDITIONED | 5 | 3000 | Angular and Java team leaders to continue writing and correcting test/integration code. |
CONDITIONED | 6 | 4890 | Angular and Java team leaders to continue writing & correcting test/integration code for all Angular and Java features, and to continue assisting their teams with problems and liaising with Project Manager. |
CONDITIONED | 7 | 3000 | Angular team to continue to develop Database gRPC query system, including generic interface, BFT-SMaRt interface, and spatial queries. |
CONDITIONED | 8 | 4890 | All sub-teams to continue to work as scheduled. |
CONDITIONED | 9 | 6000 | Angular and Java sub-teams continue to work on range of supported database APIs and plugins, Spatial system and extensibility. |
CONDITIONED | 10 | 4890 | Angular and Java Team Leaders to prepare to complete test and integration code, ready for final testing in consultation with Java and Angular teams. |
CONDITIONED | 11 | 6000 | Angular and Java teams completing work on range of supported database APIs and plugins. Heading towards completion and testing of Plugins and also preparing to test and integrate Encryption, Authentication and Access Control Systems, gRPC system and REST APIs. |
CONDITIONED | 12 | 4890 | With 1.5 months remaining, we should be doing final debugging, testing and integration work. |
CONDITIONED | 13 | 6000 | Java and Angular code to be complete in all areas, except final integration and debugging. |
CONDITIONED | 14 | 4890 | Project to be getting ready to deliver, with debugging, testing and integration of all components nearing completion. |
COMPLETION | 15 | 8257 | Project to be ready to deliver, with debugging, testing, integration and proving of all components complete. |
登录后可另存为草稿 将创建一份私人草稿,保存之前不会存储任何内容。