Skip to content

Latest commit

 

History

History
90 lines (53 loc) · 19.3 KB

stateset.md

File metadata and controls

90 lines (53 loc) · 19.3 KB

Stateset

Abstract

A web application layer on top of an interoperable decentralized, replicated, authoritative global state machine with minimal trust between nodes would allow for the creation of a distributed sales and finance automation network. Such a network would have many useful applications in global commerce and finance, insurance and more. We present Stateset, a distributed sales and finance automation network, and describe in detail how it achieves the goal of a globally distributed shared state for managing sales and finance operations. Stateset is built on 8 fundamental technologies; Cosmos-SDK Blockchain Application Framework, a UTXO based State Machine, Tendermint BFT Consensus Engine, Trusted Executable Environments (TEE) for Private and Verifiable Computation, IPFS for content addressed networking and storage, IBC for transport, authorization and ordering with other blockchain networks, Next.js and GraphQL API Engine.

Stateset Network

Stateset is a next-generation, secure, sales and finance automation network for the world. There will be a collective oneness for all commerce and finance where digitally native contracts, assets and financial transactions can be securely created and transacted freely without intermediaries or enforcement agents. Our vision is there will be an interoperable network of blockchains and Stateset will lead the commerce and financial workflows that have a shared global state with instant finality and low transaction fees.

In Stateset, business processes are shared between a global network of nodes transacting sales and finance information. Modules for different processes between counterparties are richly composable and distributed amongst a network of peers and nodes in the stateset network. We exchange the paradigm of custom implemented and siloed workflows withing one organization for a new orchestrated, shared set of workflows between nodes in a globally distributed network.

We imagine entire value chains of trade partners onboarding into the network in groups of producers, consumers, lenders, merchants, brokers, providers and suppliers. Robust data mapping has been built into the platform to ensure that these types of trade partners are using a platform the is logically centralized but organizationally decentralized across network participants. This is the natural progression of computing. Going from on-premise databases, to distributed cloud multi-tenant instances, to a decentralized byzantine fault tolerant (BFT) global network for business to business workflows involving sales, finance, back office and other key revenue driving processes. Stateset is the infrastructure for the future of this computing paradigm. There will be a network of interoperable economically incentivized blockchain networks; the cornerstone of the infrastructure of global economy over the next two decades.

Data and processes will be implemented upon multiple blockchain protocols that are local to specific regions but that interact with each other through the message transport and ordering layers such as IBC. These channels will have their order of transactions and be able to interchange assets with Stateset leveraging the same replicated and highly available cluster of nodes communicating via ABCI. There will be an internet of blockchain nodes that are used for consumer and business applications built on many different blockchain protocols.

Stateset is going to displace legacy enterprise software, on-premise and cloud business solutions; with next-generation technology that is more secure and robust. It is built on state-of-the-art Byzantine Fault Tolerant engine and is able to communicate with the Interchain. Stateset will be a global constant, an infrastructure and shared network of nodes that are able to exchange assets, messages and other types of state and information securely and instantly across the globe.

B2B Enterprise Applications

B2B enterprise software for sales, service, marketing, finance, middle and back office functions; are mission-critical for revenue driving within an organization. This is the initial focus for workflows being built into Stateset. Stateset redesigns these b2b applications from first principles as a set of shared workflows between organizations. We have designed lead generation, lead sharing and lead management across organizations. Account and Contact management with robust Controller and Processor data mapping built in for GDPR and CCPA compliant data subject adherence and consumer data privacy. Contract management software for buy side and procurement as well as sell side contracts with shared execution logic between organizations. Case, Application, Contract, Invoice and Loan Lifecycle management using auto-executing and reconciliation free workflows across counterparties. Order Management across the entire value chain with auto-replenishment between vendors and merchants. Invoice and Billing Management with mitigation of counterparty risk related to non-payment and non-performance. Asset Management that is native to the ledger and no longer siloed within one organization. Documents are file storage that is content addressed and proxy re-encrypted for secure uploading and sharing with participants in a completely verifiable manner. Stateset is the future of b2b sales and finance software. Stateset has been developed from first principles for companies to run their mission critical revenue driving operations, accelerate working capital lifecycles and accelerate growth across their entire value chain. The following technologies are state-of-the art developments that are critical to the Stateset Network and Stateset Platform.

Stateset Network

Stateset at the infrastructure level is comprised of a distributed network of nodes used for business to business workflows. The network allows for net new nodes on the network to join and leave the network at will with unspent output recovery with other nodes in the network through the cluster of notary nodes. The Stateset Network is the authoritative, single state across multiple networks using a deterministic virtual machine. Stateset Network is logically centralized but organizationally decentralized across 1000’s of organizations around the world that are managing front, middle, back office and working capital lifecycles. The network leverages a thin waist and uniform peer-to-peer networking protocol for assimilation and standardization across the network. An organizations services on the network consists of the docker containers for user interface, GraphQL engine, Spring REST service and each nodes PostgreSQL.

Containers are provisioned using Terraform and are orchestrated using Kubernetes. Docker files are used to containerize the application as well as to update different services on the network. PostgreSQL is used as the underlying RDBMS. Known entities on the network will be identifiable on Stateset upon login and known entities on the network are able to be directly transacted with in a secure and privacy preserving manner. Nodes on the network are able to instantly communicate with other nodes on the network in real-time on a global transaction network that is secured and replicated in trusted executable environments. All of the business information that is executed will be the same shared business execution logic across same across every node in the network. Shared execution logic ensures that counterparties are viewing the same exact data when transacted with. There is not concept of global state but a set of peer-to-peer UTXO sets across a globally distributed network of a nodes. The UTXO sets are maintained between companies for post-contract and asset lifecycles and managing data mapping processes across organizations. Double spending of input states is prevented using a cluster of nodes using Tendermint BFT which communicate with the Stateset State Machine using ABCI (Application Blockchain Interface).

HSM and Key Management

Keys will be managed by the companies that are the legally known entity on the network. The Key Management is leveraging a HSM to secure the keys to sign messages on the network. The cryptographic operations that are performed by the HSM are key generation and signing. The private key material is stored in the HSM if the node is configured to use an HSM. The public keys are stored in the HSM (if configured for the node) and the respective key stores, which is the node key store for the node CA key and legal identity of the organization on the network. The certificate chain is stored there as well. The certificate chain is not stored in the HSM. Operations involving the private keys such as signature generation will be delegated by the node to the HSMs, while operations involving the public keys will be performed by the Stateset node. A Stateset node, including a notary node, must have all its keys in the same KeyStore or HSM. Splitting the keys across a combination of different key stores and HSMs is not supported.

Stateset Agents

Agents are unique to every known identity on the network. Based on what information it knows about the current state of the business, it will start business processes and flows on the network. The Stateset network will have agents living on the network that are instantiating flows between entities on the network. The agents will also be able to give the same answer to everyone across the network. The Agents will be operated via voice and text using a deep learning based Natural Language Understanding RNN. The latest advancements is using XLNet Autoregressive pretraining for language understanding. XLNet maximized sequence using all possible permutations of the factorization order. The factorization order is arbitrary and the target is ambiguous producing start of the art results. Data from the Stateset Network can be extracted from the PostgresDB and used for training data for the Stateset Agent. This will enhance the ability for the Agent to execute workflows on the network. The RNN is called upon via voice and text and the agents are able to traverse the different networks to execute transactions. The agents are able to effectively leverage the RPC calls on the network to configure parameters or metadata about the chain. A custom metadata page is accessible via the agents for updating the parameters of the network. The agents are leveraging natural language processing to perform intent and entity detection from a given utterance. The agents are stateless and query directly from the blockchain networks. Many abstractions of the agent will be available depending on the endpoints. One of the most anticipated endpoints will be audio that are calling to the agent to perform state changes on the network such as transactional operations and querying state from the blockchain networks. Other anticipated application will be voice usage in VR and AR systems to make wake call at which point the agent would be leveraged as a broker between the different API endpoints and chains.

SGX Nodes and Differential Privacy

Intel SGX will provide the trusted executable environment (TEE) for an encrypted ledger. Enclaves create a tamper-proofed space for programs to execute, so that they can process data without the owner of the physical hardware being able to inspect or interfere with it. This allows organizations to run computations without anyone having access to them creating powerful tool for solving problems involving multiple nodes in the network. Anywhere collaboration is needed but trust is expensive can benefit from enclave technology. TEEs also present the opportunity to integrate differential privacy on the Network of nodes performing privacy preserving analytics on the business network of nodes. Differential privacy with a Stateset node is implemented as an augmentation to the Nodes SQL database used a ledger. This is attached to the JVM is a parameter in the node configuration file and leveraged at the state layer. Leveraging queries to retrieve ledger states that have been recorded in the Stateset Nodes vaults. The state could include personal identifying information (PII) or other types of customer data that does not belong to the Node operator nor the owner of the node. Stateset allows for performing privacy preserving data analytics and machine learning on the Stateset Node is utilizing differential privacy on the SQL database that is used as the storage layer of the distributed business network.

Stateset Network Governance

Governance of the Stateset Blockchain Network will be done on chain using the modules given by the Cosmos-SDK. This includes all upgrades across the network for platform versioning. These include governing limits associated with max transactions and message sizes and the computation that occurs across the network. Governance also includes the acutal core committers to the codebase and the ownership of the technology. The Stateset Network is Open Source Software licensed under Apache 2. This means that developers can contribute to the opensource version of the protocol.

Stateset Network DevOps

Stateset uses continuous integration / continuous deployment using Terraform, Helm, and Google Kubernetes Engine (GKE) on Google Cloud Platform (GCP). The Terraform Provider for Stateset deploys the Hasura instance with a Cloud SQL Database Proxy Container connecting to the Postgres Database running on Cloud SQL. On net new customer sign up; a script is called upon and deploys the entire stack of containers in GKE with a prefix dependent on the customer’s nodeName. Consul is used for service mesh networking and service registry discovery for the Stateset Network. 3 Consul Servers are used to manage agents that are sidecars for services running on the Stateset Network. These agents are able to broker message back to the Server cluster which uses Raft consensus to come to a single source of truth on the services that are running on the network. Kubernetes on GKE with Consul based mesh networking provides visibility into the network infrastructure and services that are running.

Virtual/Augmented Reality Interface

VR/AR will be used as a graphical user interface and input layer for interacting with Stateset. Stateset leverages virtual and augmented reality headsets as well as Augmented Reality from mobile devices to interact with the Stateset network. The primary input mechanism is voice leveraging Natural Language Processing to activate flows on the network. The flows are leveraged to make state changes across the Stateset network. Hololens will be used as an interface into the ledger specifically how to visualize the current state of the contracts that have been deployed on the network. The ability to see the transactions that have occurred in a simple interface that multiple companies can operate on is essential.

IBC

IBC is like TCP/IP for Blockchain Networks. Interoperability is a key component for developing the next generation of blockchain and cryptographic networks by having traversable and configurable chains that have metadata that is immutable but data that is mutable. Metadata can control governance structures, consensus algos, modifications for different type of blockchain transaction mechanisms and other types of modules. The inter-blockchain communication protocol is a catalyst for the polycentric interchain. Different application specific blockchain networks are going in to be used in different use cases. They currently cannot talk to each other, transfer packets, between blockchains such as token transfers, signatures, votes and other types of transactions. Currently all of the assets on different chains are siloed. Use the unique features of each chain communicate. IBC is a messaging protocol for the interchain. Authenticated, Ordered and Route topology between networks. IBC enables chain innovation and continuous innovation across multiple state machines. Stateset specializes in sales and finance automation with a focus being interoperable with other state machines and smart contracts in the IBC ecosystem:

IBC/APP: Application-layer packet semantics. Relayer during the hackathon. Application layer protocols sit on top of IBC. Cross-Chain account abstraction: delegate control to another chain. What state machine interacts. Interchain code relocation: transport contracts in packets. IBC/TAO: Transport, authencation ordering. Transport data from Stateset to another blockchain network: Authenticating that the data came from Stateset and is going to a different blockchain network or state machine. Authenticating that data came from another Blockchain network is interacting with the Stateset Blockchain Network. The Ordering abstraction allows to reason about the ordering of the transactions.

IBC Protocol Stack consist of clients, connections, channels, packets, modules: • Client: verifying consensus transcripts • Connections: associating two chains. Created with a handshake. Paired set of identifiers. • Channels: data pipe between two modules. Channels handle Ordering Semantics and routing Semantics. Smart Contracts. Agoric’s JavaScript contracts on Swingset. Transfer of data between modules on different chains. • Packets: Where the action happens. The core messages, can contain different types of data. Token transfers, votes, etc. analogous to the core o one transfer from one to another o start a transfer on one chain o send an outgoing queue on the other o message on the other chain to receive that data o and client to verify data o send an acknowledgement that it completed o time out packets as well o after certain amount of blocks that packet can timeout • Module A wants to send some packet Module B on another. A relayer does the physical transfer. Routes it to Chain B. It goes to the module via Cosmos IBC.

Next.js and GraphQL

Stateset Platform provides a user interface to call workflows between organizations and read state from one organizations node using graphql and the next.js react framework. The platform is closed source is a client for calling Stateset but is not required to use the Stateset network. Entities can choose to build their own clients for interacting with the Stateset Network. The Stateset platform is managed service which is hosted using serverless functions powering server rendered react web pages and statically generated web pages connected to cms systems. Next.js is quickly becoming the leading web application framework and coupled with GraphQL it is a fast, responsive and best-in-class framework for developing a web interface to interact with the Stateset Network. GraphQL on top of the Postgres Nodes allows us to create subscriptions on states to receive the data in real time at the network level. The graphql engine combined with react hooks and the next.js routing is a great combination for traversing the stateset in real-time and implementing transaction workflows across companies. We recognize that contracts could be much more composable and written in the same language as our interface layer, JavaScript. Combined with graphql, we could create the secure third-party component system for developers to build on the Stateset platform.

Conclusion

Our mission is to create a fast, state-of-the-art network with fast finality and shared state machine for global commerce and finance automation. We have proposed peer-to-peer distributed sales and finance network of nodes for transactions using Tendermint BFT. Stateset is a next-generation network for the world of sales and finance automation.