Anoma 백서

Anoma

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 4쪽 중 3쪽

provider can pay the settlement fees. Amounts of donations must be public in order to perform the QF calculations, but individual identities can be kept secure using Anoma’s execution environment. Expressive intents can also capture additional dimensionality which is difficult to represent in a simpler QF model - for example, many projects require a certain amount of funding in order to do anything at all, and only wish to receive funding (and commit to action) should a certain threshold be met. This can be expressed as a constraint in the intent, and the solver must either find enough funding to meet the threshold or omit the project, as desired, in order for the final settlement transaction to be valid. 7.2.2 Novel applications Here we sketch some novel decentralised applications that can be built using Anoma’s architecture: DAOs 2.0, runtime rollups, multiparty multivariate barter- ing, auctions, and local episodic games. 7.2.2.1 DAOs 2.0Decentralised autonomous or- ganisations (DAOs) hold the twin promises of organ- isationaloperational transparency, in that the rules for decision-making are articulated and executed in the same code, which anyone can read, andopera- tional verifiability, in that any past actions of the organisation can be proven to a third party to be consistent with this rule set. In present instantiations, however, they obtain transparency and verifiability by execution on a public blockchain. Operational disclosure allows organisations to present, and prove with verifiability, specific data about the or- ganisations inputs and outputs (e.g. quarterly funding disclosure for a non-profit) without revealing every aspect of decision-making, which is a lot of data from which someone can easily cherry-pick to misrepre- sent what’s really happening, or which members of the public with other agendas (perhaps operating a competing organisation, or with a personal bone to pick with a member of the one in question) can use to start bike-shedding debates or otherwise interfere with organisational operations. Anoma’s architecture allows for the creation of com- plex DAOs which need make no such compromise: they can keep both decision-making rules and data locality, visible only to parties within the organisation, but prove arbitrary properties of each to the world as they choose. In particular, this system could be used to instantiate something like the plural money system[8]. Communi- ties could themselves create complex DAOs, controlled by members of the community, with internal commu- nity currencies, community-owned SALSA-allocated assets, and limitations/taxes on wealth transfer out- side the community. 7.2.2.2 Runtime rollupsLet us take a “rollup” to be the separation of computation and verification such that the verification can be suitably replicated for improved fault-tolerance while the computation need not be. In systems which rely on imperative semantics, and where end-users are signing particular imperative execution paths, rollups are long-lived and must be specifically specified by users. In Anoma’s declarative architecture, since users sign intents ex- pressing properties which the execution is required to satisfy rather than any particular execution path, rollups can be created at runtime depending on dy- namic demand, and markets for compute may be used rather than replication where doing so is cheaper. 7.2.2.3 Multiparty, multivariate complex bar- teringConsider three friends, Alice, Bob, and Char- lie, a hotel operator David, a festival producer Eve, andatraincompanyDeutscheBahn. Thefestivalruns for three weekends in July near Potsdam. Alice, Bob, and Charlie wish to attend the festival together, on the same weekend, and take trains from their respec- tive home towns of Berlin, Zurich, and Amsterdam. They’re flexible about the particular weekend, and 12 would like the combined price of train tickets, hotel rooms, and festival passes to be as low as possible. Eve wants to sell tickets to his festival, which are fixed-price based on his costs plus markup, but some- times resold by parties who purchase them early on then later realise that they cannot attend. Deutsche Bahn sells train tickets with variable prices based on demand, David likewise for hotel rooms (and she has both single rooms suitable to host one person and quadruple rooms suitable to host four). Alice, Bob, and Charlie are happy to room with another person, as long as they are also attending the festival (they view this as good evidence of a likely friendship). In the world today, Alice, Bob, and Charlie might go to the festival’s website to look for ticket availability, then try to check hotel and train prices across the three possible weekends and compile a spreadsheet in order to figure out what their costs might be. Of course, while they’re busy compiling the spreadsheet, someone else looking to travel could book their hotel room or train seat, and they’d be out of luck. Worse, they could book a hotel room for a particular weekend, then find out that the train tickets are unavailable and be unable to change the hotel room (at least without paying a cancellation fee). Alice, Bob, Charlie, David, Eve, and Deutsche Bahn could all use Anoma as a substrate for multiparty complex bartering. Each party would author an intent with their preferences, and all intents would either be matched atomically (meaning that train tickets, hotel rooms, and festival passes are booked for all of Alice, Bob, and Charlie in correspondence at once) or not at all. Using complex bartering,whatall parties want is public, butwhothey are need not be revealed. This can also be used for simpler cases, such as fun- gible tokens. Users can author intents capturing the semantics of market & limit orders, and also more complex algorithms such as an AMM. Expressed in intent form, an AMM order is simply a price curve along which one is willing to swap two assets (xy = k). Users can author AMM intents for the full price range or any subrange (similar to Uniswap v3). Un- like on-chain AMMs, this does not require sending transactions or locking any assets up. 7.2.2.4 Complex auctionsIndependent of more long-term reasons, auctions often benefit from data lo- cality for game-theoretic reasons: a sealed-bid second- price auction gives bidders reason to bid their true value, but requires bid disclosure in order to work. The first and most immediately feasible way is to use programmable threshold decryption to keep all bids encrypted until the auction deadline has passed, then decrypt them all at once, select the highest bidder as the winner and charge them the second-highest price. This can be combined with other disclosure techniques for concealment of identity. FHE can also be used to implement complex auctions, by performing the bid selection directly as operations on the bids submitted as ciphertexts. 7.2.2.5 Local episodic gamesConsider a digi- tal re-enactment of a game of poker. Games of poker are episodic, in that (even if bets are being placed and winners reported to a leaderboard) no interac- tion or ordering takes place between different games - if users are submitting actions, actions taken by users within the same game must be ordered with respect to actions taken by other users in that game, but not with respect to actions taken by any others. Anoma’s fractal instance architecture can instantiate this structure efficiently: players, when they start a poker game, launch a temporary consensus instance (simply operated between themselves) to order state transitions within that game, then submit the results at the end to a poker tracking/statistics application on a more long-running fractal instance. This frac- tal instance can be run on LAN for low-latency, and transactions need not have any cost (since the set of who can submit them is restricted to the players). Poker also requires data disclosure, primarily keeping an individual hand and periodically revealing cards, and randomness (for the deck shuffle), which can be provided by the execution system and threshold signatures from the threshold cryptosystem in Anoma, respectively. 13 8 Architectural instantiation The Anoma architecture requires many individually intricate subcomponents which can be instantiated in a variety of ways with different performance, complex- ity, and ergonomic trade-offs. Here we sketch the ab- stract interfaces required of necessary subcomponents and summarise our current development directions in instantiating them. 8.1 Gossip The Anoma gossip system is a pseudonymously iden- tified, path-authenticated, fault-accountable sparse overlay network. In contrast to conventional peer- to-peer gossip networks, this system is designed to operate with optional attestations. Nodes are identi- fied by cryptographic keys and all messages are en- crypted to their recipient and signed by their sender. Nodes craft & enforce local rules around message va- lidity, rebroadcast, and retention. Combined with a settlement ledger and path-authentication-based fees, this provides an incentivised data availability layer for transaction-relevant data, which is used within the Anoma architecture by users to broadcast intents, which are sent around until solvers find counterpar- ties, create transactions, and submit them to fractal instances for settlement. Nodes maintain a local trust graph and ruleset around message content validity and rebroadcast criteria. The Anoma gossip system uses an explicit trust model, where the underlying physical network is distrusted, new nodes bootstrap with a set of trusted peer public keys, and nodes main- tain trust relations over time, keeping track of who introduced them to whom and applying changes in trust recursively along the trust graph. 8.1.1 Node model Nodes in the gossip network are assumed to possess a private key, the corresponding public key to which is used as identification. Nodes must totally order and sign all messages which they send, which are unique. Signing two messages with the same nonce is an accountable fault. In traditional P2P gossip systems, nodes are primar- ily identified by their IP address, which refers to a physical network destination and is assumed to be long-lived. By contrast, in the Anoma gossip sys- tem, nodes are primarily identified by their public key, which can list and periodically rotate IP addresses at which it could potentially be reached (but which a sender does not necessarily need to know in order to send messages). This can be seen as a sort of vir- tual gossip network, with identity persistence based on secret information (the private keys) which can be freely moved across physical substrates. Local caches of physical routing latency are kept in order to maintain a relatively efficient mapping of the spatially non-local virtualised network into the spatially local physical one. This choice of structure also allows for a conceptually elegant virtualisation of fault-tolerant subsystems: a thresholdcryptosystemincombinationwithconsensus (in order to provide ordering) effectively virtualises many nodes as one node, with the threshold key used for incoming and outgoing messages and shares for threshold decryption and threshold signing internally rebroadcast around for reconstruction (encrypted to individual node public keys). In contrast to other blockchain systems, Anoma’s gossip network is not sharded on the basis of security domains (compare to independent blockchain mempools), but rather simply sparse, where real-time demand can inform connection choices and routing tables. 8.1.2 Path authentication Anoma’s gossip system providespath authentication: the receiver of a message can verify a chain of sig- natures recursively back all the way to the original sender, such that each party in the message chain can be verified to have authorised the next send, and can be both potentially paid for participating in gossip and held accountable for inconsistent ordering across messages. This is accomplished simply by keeping an ordered list of signatures in the message header, which can all be checked by the recipient for correct- ness and linkage consistency. For efficiency validity checks may be compressed and inner path identities may be hidden using ZKPs, which the recipient then 14 verifies as a part of receiving the message. 8.1.3 Gossip incentives The path authentication system described above can be used to provide a form of gossip incentive whereby a user can broadcast an intent and offer payment to any nodes who participate in a chain of gossip which leads to its eventual settlement. The user simply in- cludes a small fee (the semantics of which are chosen at runtime) which they allow gossip nodes to malleate, so that each node, when forwarding the message, can choose to take a portion of the fee for themselves. If the node can settle the intent by combining it with others, crafting a valid transaction, and submitting it to the appropriate fractal instance, they can claim the fee immediately. If not, the node can choose how much fee to take for themselves before they forward the message. Of course, they can take all the fee, but then there would be no reason for other nodes to rebroadcast or settle the intent, so the node would receive nothing. Nodes can thus be expected to re- broadcast intents taking only enough of the fee such that the expected benefits of potential settlement out- weigh the opportunity cost of potentially being able to settle it themselves (but the user can broadcast their intent to many parties, so an individual node who cannot immediately settle it is unlikely to be the first to be able to). 8.2 Consensus The consensus component is an algorithm by which many nodes can be abstracted as one virtual node, which will be correct subject to certain assumptions about the correctness of the constituent nodes (gener- ally > 23). Just as individual nodes operate a deter- ministic state machine and send and receive messages in a local total order, virtual nodes created by use of the consensus algorithm operate a deterministic (replicated) state machine and send/receive messages in a total order. The consensus algorithm is responsi- ble for abstracting many nodes into this virtual node by gossiping, ordering, and executing transactions (in- coming messages), then finalising the updated states (outgoing messages) in a verifiable manner. At present, the consensus component in Anoma is instantiated by Typhon[9], which draws substantially from Heterogeneous Paxos[10], Narwhal[11], and Ten- dermint[4]. 8.2.1 Ordering The ordering component of consensus is responsible for ordering transactions prior to execution, where nodes participating in consensus must agree on the ordering and ensure that all transactions so ordered are available to them for execution. 8.2.2 Execution The execution component of consensus is responsible for executing transactions on which an order has al- ready been agreed, updating the state to reflect the results of transaction execution, and finalising the up- dated state so that external parties can inexpensively verify properties of it. 8.3 Execution environments The execution environment of Anoma is a runtime responsible for partitioning and permissioning state and code to allow for safe interoperation of mutually distrusting programs, abstracting state changes and providing appropriate primitives for cryptographic operations, and handling cross-fractal instance state verification as well as synchronous and asynchronous cross-fractal-instance messaging. These three respon- sibilities of abstraction are orthogonalised into three components: the validity predicate subsystem, the unified execution environment (Taiga), and the trans- parent execution environment (Typhon EE). 8.3.1 Validity predicate subsystem The validity predicate (VP) subsystem is responsible for partitioning and permissioning state and code in order to allow for safe interoperation of mutually dis- trusting programs. This is accomplished by splitting the keyspace of state into mutually exclusive prefix spaces, where the first part of a key corresponds to ownership by a specific validity predicate, stored at a sentinel key within that prefix. Whenever state 15 within a particular prefix is altered, the validity pred- icates associated with that prefix are called, and they can choose to accept or reject the transaction. Valid- ity predicates can also choose to require that other validity predicates also accept. The validity predicate subsystem is itself implemented as a validity predicate and can in principle be instan- tiated recursively. The subsystem is also responsible for enforcing limitations on what data is accessible to VPs. 8.3.2 Taiga Unified EE The Taiga unified execution environment is responsi- ble for handling data access and operations. 8.3.2.1 Data locality domainsTransparent data is represented as a mutable key-value tree, where keys can be read, written, and deleted, and prefixes can be iterated over. Semi-discreet data is represented as an immutable append-only note set, where each note can be either consumed once or many times. Each note includes a key, value, and owner key, to which an encryption of the note contents must be available. Discreet data is represented as a mutable key -> ci- phertext mapping, where keys can be read, written, and deleted, and ciphertexts can be operated on using special homomorphic instructions. 8.3.3 Typhon Transparent EE The Typhon execution environment is the lowest-level execution environment, designed to impose only the minimal requirements and structure required by Ty- phon for transaction ordering and concurrent execu- tion. The Typhon execution environment has only trans- parent state, which is organised in a key-value tree. Transactionsdeclareparentsofallsubtreesofkeyspace within which they will read and write. Using this infor- mation, Typhon can identify transactions which touch only non-overlapping regions of state and thus order transactions for concurrent execution. This execution environment does not itself have any state semantics for data or state/code partitioning. Further structure is specified by a root validity predicate, stored at a particular sentinel key, which is called as a part of all transactions. The Typhon EE is also responsible for handling asyn- chronous message passing across fractal instances and synchronous (atomic) message passing within chimera chains. The EE handles transport, ordering, and ver- ification, while message semantics are left to higher execution abstraction layers. 8.4 Compilation stack In order to provide a unified black-box application development interface, the Anoma implementation includes a new language, Juvix, and a compiler stack, designed in tandem to allow developers to write for- mally verified, fault-tolerant distributed applications. A great deal of research work into the compiler stack remains and this section should be considered a work in progress. Several components described herein are only partially implemented and alternatives are still under active consideration. 8.4.1 Juvix Juvix is a high-level function language which compiles to a variant of the simply typed lambda calculus. Programs written in Juvix can express and reason about public, semi-discreet, and discreet data and operations. Juvix’s lambda calculus output language can be compiled to RISCV or WASM through C, or can be compiled to the abstract categorical operations of the AVM which can in turn be instantiated as polynomials, the input language of VampIR. 8.4.2 AnomaVM The AnomaVM (AVM) is a distributed abstract cate- gorical virtual machine. The AVM is designed to cap- ture information theoretic semantics of multiparty in- teractionsandcomputewithoutfixingconcretecrypto- graphic representations/instantiations or operational execution semantics. An AVM program directly ref- 16 erences agents by role, who can reason about each others state t
프로젝트로 돌아가기