Skip to content

input-output-hk/acropolis

 
 

Repository files navigation

Acropolis

Acropolis is a project to create a kit of micro-service parts, written in Rust, which allows flexible construction of clients, services and APIs for the Cardano ecosystem.

Acropolis is based on the Caryatid framework, which in turn uses a message bus such as RabbitMQ to communicate between micro-services.

graph TB

  subgraph Microservice A
    Module1(Module 1)
    Module2(Module 2)
    Caryatid1(Caryatid Framework)

    Module1 <--> Caryatid1
    Module2 <--> Caryatid1
  end

  subgraph Microservice B
    Module3(Module 3)

    Caryatid2(Caryatid Framework)

    Module3 <--> Caryatid2

  end

  RabbitMQ([RabbitMQ Message Bus])
  style RabbitMQ fill:#eff

  Caryatid1 <--> RabbitMQ
  Caryatid2 <--> RabbitMQ
Loading

Modules

This project is in an experimental phase at the moment, and the module structure is highly subject to change:

  • Upstream Chain Fetcher - implementation of the Node-to-Node (N2N) client-side (initiator) protocol, allowing chain synchronisation and block fetching
  • Mithril Snapshot Fetcher - Fetches a chain snapshot from Mithril and replays all the blocks in it
  • Genesis Bootstrapper - reads the Genesis file for a chain and generates initial UTXOs
  • Block Unpacker - unpacks received blocks into individual transactions
  • Tx Unpacker - parses transactions and generates UTXO changes
  • UTXO State - watches UTXO changes and maintains a basic in-memory UTXO state
  • SPO State - matches SPO registrations and retirements
  • DRep State - tracks DRep registrations
  • Governance State - tracks Governance Actions and voting
  • Stake Delta Filter - filters out stake address changes and handles stake pointer references
  • Epochs State - track fees blocks minted and epochs history
  • Accounts State - stake and reward accounts tracker
  • Assets State - tracks native asset supply, metadata, transactions, and addresses
graph LR

   UpstreamChainFetcher(Upstream Chain Fetcher)
   GenesisBootstrapper(Genesis Bootstrapper)
   MithrilSnapshotFetcher(Mithril Snapshot Fetcher)
   BlockUnpacker(Block Unpacker)
   TxUnpacker(Transaction Unpacker)
   UTXOState(UTXO State)
   SPOState(SPO State)
   DRepState(DRep State)
   GovernanceState(Governance State)
   StakeDeltaFilter(Stake Delta Filter)
   EpochsState(Epochs State)
   AccountsState(Accounts State)
   AssetsState(Assets State)
   ParametersState(Parameters State)

   UpstreamChainFetcher --> BlockUnpacker
   MithrilSnapshotFetcher --> BlockUnpacker
   BlockUnpacker --> TxUnpacker
   GenesisBootstrapper --> UTXOState
   TxUnpacker --> UTXOState
   TxUnpacker --> AssetsState
   TxUnpacker --> EpochsState
   TxUnpacker --> AccountsState
   TxUnpacker --> DRepState
   TxUnpacker --> SPOState
   TxUnpacker --> GovernanceState
   GovernanceState --> ParametersState
   TxUnpacker --> ParametersState
   UTXOState --> StakeDeltaFilter
   StakeDeltaFilter --> AccountsState
   UpstreamChainFetcher --> EpochsState
   MithrilSnapshotFetcher --> EpochsState
   EpochsState --> AccountsState
   SPOState --> AccountsState
   DRepState --> GovernanceState
   GovernanceState --> AccountsState
   ParametersState --> AccountsState
Loading

Messages

The messages passed between modules are defined in a single global enum in the Messages crate.

Processes

There is currently only one process, for testing:

  • Omnibus - includes all the above modules for testing, by default using the internal message bus only

About

Acropolis microservice architecture & components in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 10

Languages