Skip to content

Commit

Permalink
Start implementing Amaru project layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
KtorZ committed Mar 28, 2024
1 parent 126c499 commit 1ff7a63
Show file tree
Hide file tree
Showing 11 changed files with 659 additions and 21 deletions.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
"dependencies": {
"@astrojs/check": "^0.5.9",
"astro": "^4.5.6",
"typescript": "^5.4.2"
"remark": "^15.0.1",
"remark-parse": "^11.0.0",
"remark-rehype": "^11.1.0",
"remark-stringify": "^11.0.0",
"typescript": "^5.4.2",
"unified": "^11.0.4"
},
"packageManager": "[email protected]",
"devDependencies": {
Expand Down
5 changes: 3 additions & 2 deletions src/components/Card.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface Props {
import { createHash } from 'crypto';
const { title } = Astro.props;
const { title, href } = Astro.props;
const digest = createHash('sha256').update(title).digest('hex');
Expand All @@ -22,7 +22,7 @@ const pixels = Array.from(digest).map((digit) => {
<div class="pixel" data-x={pixels[2].x} data-y="0"></div>
<h3>{title}</h3>
<p class="justified"><slot /></p>
<a class="no-effect" href="{href}" aria-label={title}></a>
<a class="no-effect" href={href} aria-label={title}></a>
<span class="more">
Read more <svg class="icon slide"><use xlink:href="#arrow-right"></use></svg
>
Expand Down Expand Up @@ -126,6 +126,7 @@ const pixels = Array.from(digest).map((digit) => {
height: 100%;
top: 0;
left: 0;
z-index: 2;

&:focus,
&:hover {
Expand Down
29 changes: 13 additions & 16 deletions src/components/Pattern.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const { actives, nCol, nRow } = Astro.props;
const cls = (id: number) => (actives.has(id) ? 'active' : '');
const width = (nCol || 1) * 40;
const height = (nRow || 1) * 40;
const width = (nCol || 1) * 400;
const height = (nRow || 1) * 400;
const patternId = createHash('sha256')
.update(Buffer.from(Array.from(actives)))
Expand All @@ -28,26 +28,23 @@ const patternId = createHash('sha256')
id={patternId}
x="0"
y="0"
width="40"
height="40"
width="400"
height="400"
patternUnits="userSpaceOnUse">
{
[0, 1, 2, 3].map((row) =>
[0, 1, 2, 3].map((col) => {
const id = 2 * col + 8 * row;
const flip = row % 2 ? !(col % 2) : col % 2;

const x1 = col * 100;
const y1 = row * 100 + (flip ? 100 : 0);
const z1 = y1 + (flip ? -100 : 100);

return (
<>
<path
id={id.toString()}
class={cls(id)}
d={`M ${col * 10} ${row * 10 + (flip ? 10 : 0)} v ${flip ? -10 : 10} h 10 Z`}
/>
<path
id={id.toString() + 1}
class={cls(id + 1)}
d={`M ${col * 10} ${row * 10 + (flip ? 10 : 0)} h 10 v ${flip ? -10 : 10} Z`}
/>
<polygon id={id.toString()} class={cls(id)} points=`${x1},${y1} ${x1},${z1} ${x1 + 100},${z1}` />
<polygon id={id.toString() + 1} class={cls(id + 1)} points=`${x1},${y1} ${x1+100},${y1} ${x1 + 100},${z1}` />
</>
);
}),
Expand All @@ -62,11 +59,11 @@ const patternId = createHash('sha256')
radius="0.025"></feMorphology>
</filter>
</defs>
<rect fill=`url(#${patternId})` width={width} height={height}></rect>
<rect fill=`url(#${patternId})` width="100%" height="100%"></rect>
</svg>

<style>
svg pattern > path {
svg pattern > polygon {
filter: url(#outline);
fill: transparent;

Expand Down
8 changes: 8 additions & 0 deletions src/content/maintainers/ktorz.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
id: KtorZ
firstname: Matthias
lastname: Benkort
company: Cardano Foundation
role: Technical Director
github: KtorZ
twitter: _KtorZ_
linkedIn: matthias-benkort-47186a57/
8 changes: 8 additions & 0 deletions src/content/maintainers/scarmuega.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
id: Scarmuega
firstname: Santiago
lastname: Carmuega
company: TxPipe
role: CEO
github: scarmuega
twitter: santicarmuega
linkedIn: santiagocarmuega
237 changes: 237 additions & 0 deletions src/content/projects/amaru.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
---
name: Amaru

shortDescription: |
An alternative Rust node client for the Cardano blockchain.
summary: |
An alternative Rust node client for the Cardano blockchain. Aimed as
an entrypoint for client applications initially, it aspires to become
a full block-producing node running side-by-side the Haskell nodes to
further increase the decentralisation of the platform while fostering
its rich open source ecosystem.
maintainers:
- KtorZ
- Scarmuega

links:
- to: Source code
href: https://github.com/pragma-org/amaru/

- to: Project tracking
href: https://github.com/orgs/pragma-org/projects/1

- to: Installation instructions
href: '#'

- to: Documentation
href: '#'

roadmap:
type: phases
phases:
- name: Client node
color: '#99c2ff'
description: |
A node capable of **synchronizing** the chain from a (remote) trusted peer,
and serve the data to client applications through an API query layer.
Such a node is most useful for decentralised applications building on
the blockchain. It doesn't however take part in the consensus nor help
to propagate blocks on the network.
A full relay node as an entrypoint to the network is still required at
this point.
start: Q1 2024
milestones:
- when: mid-April
title: Chain-Synchronization PoC
description: |
Perform basic chain-synchronization of the latest Cardano era
through [Dolos](https://github.com/txpipe/dolos) to demonstrate the
capabilities of the base Rust primitives.
link: https://github.com/pragma-org/amaru/milestone/1

- when: Buidler Fest
title: Workshop
description: |
Organize workshop(s) during the [Buidler
Fest](https://buidl.2024.cardano.org/) second day to gather
builders feedback and insights about what they would expect from an
alternative node.
link: https://github.com/pragma-org/amaru/milestone/2

- when: June
title: (Partial) validator
description: |
Apply a subset of the ledger rules to partially validate
transactions sent through the node in an attempt to provide better
user feedback, and in the longer run, prepare the ground for a
relay node.
link: https://github.com/pragma-org/amaru/milestone/3

packages:
- title: Chain synchronization (single relay)
link: https://github.com/pragma-org/amaru/issues/1
description: |
We must ensure that data can be synchronized from another source
and made accessible to client applications.
At this point, we assume that all data comes from a single trusted
relay (i.e. a Haskell node).
- title: Read-only client APIs
link: https://github.com/pragma-org/amaru/issues/10
description: |
The primary goal of a client node is to be a read-only entrypoint
for client applications. So it must provide an API for accessing
the stored data.
We aim to support the legacy Ouroboros node-to-client
mini-protocols to ensure interoperability with the existing
ecosystem as well as the new [utxoRPC](https://utxorpc.org)
specification.
- title: Transaction Submission Proxy
link: https://github.com/pragma-org/amaru/issues/8
description: |
A read-only node is useful but relatively limited to observing the
chain. Having easy ways to alter the blockchain state by accepting
transaction is thus a necessary feature.
We intend to let client applications submit through the client
node, by proxying transactions to its underlying trusted peer,
while performing extra validation upfront to improve the user
experience associated with transaction submission.
- title: Minimal Viable Ledger
link: https://github.com/pragma-org/amaru/issues/6
description: |
In order to provide some useful transaction submission
capabilities, we must perform some ledger validation upfront. More
specifically, we are interested in validation that only requires
protocol parameters but not a full ledger state yet.
This is because the communication between Amaru and its trusted
peer happens through node-to-node protocols.
Submitting an invalid transaction has therefore no visible effects
and doesn't generate feedback for the submitter.
- title: Packaging & distribution
link: https://github.com/pragma-org/amaru/issues/9
description: |
A software is meant to be used. Which means that we must ensure
prompt delivery and make it easy to consume and operate.
This work packages covers anything from build artifacts to
monitoring.
- title: Companion dApp examples
link: https://github.com/pragma-org/amaru/issues/11
description: |
The best way to ensure that we build _the right software_ is by
using it. With the alternative node, we want to build applications
that make use of it and witness the product of our making.
Such example applications also serve a double-purpose of being
useful documentation pieces.
- name: Relay node
color: '#f7b262'
start: Q3 2024
description: |
A node capable of validating (at least partially) blocks seen on the
network and propagate them by taking part in the p2p gossiping between
nodes. It can also seemingly follow the chain from multiple peers by
performing adequate chain selection.
Such node doesn't yet take part in the consensus and cannot produce
blocks. It can however fully replace any relay and is, from the
perspective of any external observer, a Cardano relay node.
milestones: []
packages:
- title: Dynamic peer management
description: |
TODO
- title: Consensus chain selection
description: |
TODO
- title: (partial) Transaction stage-1 validations
description: |
TODO
- title: Transaction stage-2 validations
description: |
TODO
- title: Reward calculations
description: |
TODO
- title: TestNet(s)
description: |
TODO
- name: Full node
color: '#d8829d'
start: Q1 2025
description: |
A node that can produce blocks and take part to the consensus. It can
monitor the leader schedule, manage a mempool, forge blocks and follow
protocol updates (hard-forks).
A full node is not however capable of validating the historical chain.
Instead, it always bootstrap from a snapshot constructed from an
archive node.
milestones: []

packages:
- title: (full) Transaction stage-1 validations
description: |
TODO
- title: Hard-fork combinator
description: |
TODO
- title: Block forging
description: |
TODO
- title: Full block validation & propagation
description: |
TODO
- name: Archive node
color: '#0d0a0b'
description: |
A node that can validate any historical part of the chain, including
the Byron era of Cardano. Its purpose is to produce ledger and
blockchain snapshot usable by full nodes.
At this point, it is unclear whether we want to build this, for the current
Haskell nodes already fullfil that role and there's at this point no clear
benefits in building an alternative.
milestones: []

packages:
- title: Historical validations
description: |
TODO
- title: Snapshots aggregation & creation
description: |
TODO
---

Amaru aspires to bring an alternative node to operate the Cardano blockchain in order to further increase the decentralisation of the platform while fostering an even more rich open source ecosystem.

The project is ambitious and spans over many areas such as networking, cryptography or language theory. It is developed from several parts each covering a different aspect of the node and its surrounding ecosystem. One of the core objectives is to achieve a full block-producing Cardano node which can run side-by-side the existing Haskell nodes in a fully interoperable manner.

Besides, Amaru is also geared towards developer experience and aims at providing easy to grasp interfaces using widely spread technologies such as gRPC while maintaining compatibility with the strong ecosystem of middlewares, such as Ogmios or Oura, that constitutes the backbone of Cardano services.
4 changes: 4 additions & 0 deletions src/layouts/base.astro
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ const title = Astro.props.title ? `PRAGMA – ${Astro.props.title}` : `PRAGMA`;
></path>
</symbol>

<symbol id="linkedIn" viewBox="0 0 24 24" fill="currentColor">
<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>
</symbol>

<symbol id="discord" viewBox="0 0 24 24" fill="currentColor">
<path
d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const members = await getCollection('members');
title="Hosting open-source projects and helping them to thrive"
id="projects">
<div class="flex-row flex-center" id="cards">
<Card title="Polaris" href="/projects/polaris">
<Card title="Amaru" href="/projects/amaru">
An alternative Rust node client for the Cardano blockchain. Aimed as
an entrypoint for client applications initially, it aspires to become
a full block-producing node running side-by-side the Haskell nodes to
Expand Down
2 changes: 2 additions & 0 deletions src/pages/projects.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
Loading

0 comments on commit 1ff7a63

Please sign in to comment.