# Mosaic Node ## Stack ![](https://i.imgur.com/UMX4urE.png) ## Application Messaging Interface ## Ring-writer-logs With ring-writer-logs, we look to expand on the ES/CQRS structure of _single-writer-logs_ defined in ThreadsDB, to enable collective logs written by the ring members. Signatures of `logNode(N-1)` are included in `logNode(N)`. Arguments for including signatures in logs: a. history protection within the logs, assuming logNode(N) |--ringContract |--links | |--logNode(N-1) | |--logNode(<N-1) | |--checkpoints // referencing the increasingly coarsegrained older checkpoints kept onchain |--record |--header | |--time | |--contentKey |--body // gets fucked up below here, more than above even |--Gate1 | |--address | |--pins{tokenId:cid} // sign to output the Pins |--Gate2 ## Parts ### "Genesis"Config / GenesisContract Genesis *is* the contract deployment done to kick off the app. ### Config `~/.mosaic/config` services layout ```jsonld { "Addresses":{ "ethereumWeb3": "http://localhost:8545", // "/ip4/127.0.0.1/tcp/8548" "ipfsApi": "http://localhost:5001", } } ``` ### Manifest Should be independent specific host runs on. ```yaml { specVersion: 0.0.1 } ``` ### Databus / Prefetcher(?) ### ThreadsDB ## Random references - configs https://docs.ipfs.io/guides/examples/config/ - IPFS as a library tutorial https://github.com/ipfs/go-ipfs/blob/master/docs/examples/go-ipfs-as-a-library/README.md https://godoc.org/github.com/ipfs/interface-go-ipfs-core ## Archive notes ### ring-writer-lognode plan-b: include signatures and node updates in the logNode; vs. rely on contract to garantuee integrity of history of logNodes logNode(N) |--signaturesHeader | |--blockNumber (? shrug) | |--signatures // signs logNode(N-1) | |--nodeUpdate // delta to |--links | |--logNode(N-1) | |--logNode(<N-1) |--record |--header | |--time | |--contentKey |--body // gets fucked up below here, more than above even |--Gate1 | |--address | |--pins{tokenId:cid} // sign to output the Pins |--Gate2