Skip to content

Commit

Permalink
Merge branch 'staging' into coot/network-config
Browse files Browse the repository at this point in the history
  • Loading branch information
rphair authored Mar 4, 2025
2 parents 2f91f45 + e18007e commit 80b3391
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 23 deletions.
14 changes: 14 additions & 0 deletions blog/2025-01-17-january.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
slug: 2025-01-17-media-cardano-developer-office-hours
title: "Cardano Developer Office Hours #12 - Presenting the yaci-devkit"
authors: [cf]
tags: [media, Developer Office Hours]
---

This 12th installment of the Cardano Developer Office Hours is presented by Satya Ranjan, Senior Enterprise Architect at the Cardano Foundation. In this session, Satya discusses how the yaci-devkit simplifies building and testing on a local Cardano dev network, helping developers iterate faster and avoid public testnet limitations. The session highlights key features such as customizable block times, integrated tools, and Blockfrost-compatible APIs. A live demo shows easy setup using Docker and NPM distributions.

<div style={{ textAlign: 'right' }}>
[**Watch now**](https://youtu.be/lY7Ceuyc5qw)
</div>

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/lY7Ceuyc5qw?si=cne4wlwWjVLuS-pO" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
14 changes: 14 additions & 0 deletions blog/2025-02-05-february.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
slug: 2025-02-05-media-cardano-developer-office-hours
title: "Cardano Developer Office Hours #13 - Java Implementation on Rosetta"
authors: [cf]
tags: [media, Developer Office Hours]
---

This 13th installment of the Cardano Developer Office Hours is presented by Thomas Kammerlocher, Senior Full Stack Developer at the Cardano Foundation. Thomas discusses the Java implementation of Rosetta, a tool developed by Coinbase for exchanges to integrate with Cardano. Rosetta simplifies multi-chain support with its blockchain-agnostic API, and the transition from TypeScript to Java enhances performance and reduces resource consumption. Upcoming updates include support for staking rewards tracking, off-chain data integration, and more improvements to scalability and efficiency.

<div style={{ textAlign: 'right' }}>
[**Watch now**](https://www.youtube.com/watch?v=rbiH6GYWbyQ)
</div>

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/rbiH6GYWbyQ?si=kCaECBmE5Rc1Zyx_" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
5 changes: 5 additions & 0 deletions blog/tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ DAO:
permalink: /DAO
description: All blockchain-based self-governing organizations (Decentralised Autonomous Organization)

developer office hours:
label: Developer Office Hours
permalink: /developer-office-hours
description: Developer Office Hours are dynamic and interactive sessions where the Cardano developer community connects with experts to explore new and evolving developments. These sessions focus on exploring new and updated developments, featuring expert presentations, live demos, and interactive Q&A segments that break down complex topics.

developer-portal:
label: developer-portal
permalink: /developer-portal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ keywords: [cardano-cli, cli, keys, stake addresses, register, cardano-node, tran
---

:::tip
To integrate the Conway era, which differs significantly from previous eras, `cardano-cli` has introduced `<era>` as a top-level command, replacing the former `<era>` flags. For example, instead of using era-specific flags like `--babbage-era` with commands such as `cardano-cli conway transaction build --babbage-era`, users must now utilize the syntax `cardano-cli conway transaction build <options>`.
To integrate the latest (Conway) era, which differs significantly from previous eras, `cardano-cli` has introduced `<era>` as a top-level command, replacing the former `<era>` flags. For example, instead of using era-specific flags like `--babbage-era` with commands such as `cardano-cli transaction build --babbage-era`, users must now utilize the syntax `cardano-cli <era> transaction build <options>`.
:::

## Registering a stake address

To participate in the protocol, such as delegating stake to a stake pool to earn rewards or, in the upcoming Conway era, delegating stake to a delegate representative, you must first register your stake credentials on the chain. This registration is accomplished by submitting a **stake address registration certificate** within a transaction. The process includes paying a deposit, the amount of which is determined by the `stakeAddressDeposit` protocol parameter. You can get the deposit back when you submit a **stake address deregistration certificate**.
To participate in the protocol, such as delegating stake to a stake pool to earn rewards or, in the Conway era, delegating stake to a delegate representative, you must first register your stake credentials on the chain. This registration is accomplished by submitting a **stake address registration certificate** within a transaction. The process includes paying a deposit, the amount of which is determined by the `stakeAddressDeposit` protocol parameter. You can get the deposit back when you submit a **stake address deregistration certificate**.

Delegating to a stake pool also involves submitting a certificate to the chain, in this case, a **stake address delegation certificate**.

You can easily generate such certificates with `cardano-cli`. The corresponding commands can be found under `cardano-cli conway stake-address`:
You can easily generate such certificates with `cardano-cli`. The corresponding commands can be found under `cardano-cli latest stake-address`:

```shell
cardano-cli conway stake-address
Usage: cardano-cli conway stake-address
cardano-cli latest stake-address
Usage: cardano-cli latest stake-address
( key-gen
| key-hash
| build
Expand All @@ -43,15 +43,16 @@ Usage: cardano-cli conway stake-address
Query the protocol parameters to find out the amount of lovelace required as a deposit for registering a stake address, in this case, it is 2000000 lovelace (two ada):

```shell
cardano-cli conway query protocol-parameters | jq .stakeAddressDeposit
cardano-cli latest query protocol-parameters | jq .stakeAddressDeposit
2000000
```

To generate the registration certificate, run:

```shell
cardano-cli stake-address registration-certificate \
cardano-cli latest stake-address registration-certificate \
--stake-verification-key-file stake.vkey \
--key-reg-deposit-amt 2000000 \
--out-file registration.cert
```

Expand All @@ -75,8 +76,8 @@ It's important to note that when using `build`, the deposit is automatically inc
### Using the `build` command

```shell
cardano-cli conway transaction build \
--tx-in $(cardano-cli query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \
cardano-cli latest transaction build \
--tx-in $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \
--change-address $(< payment.addr) \
--certificate-file registration.cert \
--out-file tx.raw
Expand Down Expand Up @@ -144,7 +145,7 @@ Using the `build-raw` command involves a slightly more intricate process. Simila
Query the balance of the `payment.addr`:

```shell
cardano-cli conway query utxo --address $(< paymentstake.addr)
cardano-cli latest query utxo --address $(< paymentstake.addr)
TxHash TxIx Amount
--------------------------------------------------------------------------------------
0690c70f117281627fc128ede51b1fe762c2bbc15c2e3d4eff2101c9d2613cd8 0 9999834851 lovelace + TxOutDatumNone
Expand All @@ -154,7 +155,7 @@ cardano-cli conway query utxo --address $(< paymentstake.addr)
You can leverage `jq` by having `cardano-cli` return the output in JSON:

```shell
cardano-cli conway query utxo --address $(< paymentstake.addr) --output-json
cardano-cli latest query utxo --address $(< paymentstake.addr) --output-json
{
"0690c70f117281627fc128ede51b1fe762c2bbc15c2e3d4eff2101c9d2613cd8#0": {
"address": "addr_test1qp9khgeajxw8snjjvaaule727hpytrvpsnq8z7h9t3zeue2jrk54ttv0yj7llrfuhr66z4wynpcqxuqeln0jp9y70e0qvjewan",
Expand All @@ -170,23 +171,23 @@ cardano-cli conway query utxo --address $(< paymentstake.addr) --output-json
```
Using `jq` to parse that JSON
```shell
cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r .[].value.lovelace
cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r .[].value.lovelace
9999834851
```
:::

Query the protocol parameters:

```shell
cardano-cli conway query protocol parameters --out-file pparams.json
cardano-cli latest query protocol parameters --out-file pparams.json
```

Draft the transaction to calculate its transaction fee:

```shell
cardano-cli conway transaction build-raw \
--tx-in $(cardano-cli query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \
--tx-out $(< payment.addr)+"$(cardano-cli conway query utxo --address $(< payment.addr) --out-file /dev/stdout | jq -r .[].value.lovelace)" \
cardano-cli latest transaction build-raw \
--tx-in $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \
--tx-out $(< payment.addr)+"$(cardano-cli latest query utxo --address $(< payment.addr) --out-file /dev/stdout | jq -r .[].value.lovelace)" \
--fee 0 \
--certificate-file registration.cert \
--out-file tx.draft
Expand All @@ -195,7 +196,7 @@ cardano-cli conway transaction build-raw \
Calculate the transaction fee, it is useful to assign the output to a variable (`fee`):

```shell
cardano-cli conway transaction calculate-min-fee \
cardano-cli latest transaction calculate-min-fee \
--tx-body-file tx.draft \
--protocol-params-file pparams.json \
--tx-in-count 1 \
Expand All @@ -210,14 +211,14 @@ Calculate the change of the transaction. Note that the deposit is not explicitly
Query the protocol parameters to get the deposit amount:

```shell
cardano-cli conway query protocol-parameters | jq .stakeAddressDeposit
cardano-cli latest query protocol-parameters | jq .stakeAddressDeposit
2000000
```
Query the current balance of `payment.addr`:


```shell
cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r .[].value.lovelace
cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r .[].value.lovelace
9999834851
```

Expand All @@ -228,8 +229,8 @@ change=$((9999834851 - 171089 - 2000000))
Build the transaction:

```shell
cardano-cli conway transaction build-raw \
--tx-in $(cardano-cli query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \
cardano-cli latest transaction build-raw \
--tx-in $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \
--tx-out $(< payment.addr)+$change \
--fee 171089 \
--certificate-file registration.cert \
Expand All @@ -238,13 +239,13 @@ cardano-cli conway transaction build-raw \
## Sign and submit the transaction

```shell
cardano-cli conway transaction sign \
cardano-cli latest transaction sign \
--tx-body-file tx.raw \
--signing-key-file payment.skey \
--out-file tx.signed
```
```shell
cardano-cli conway transaction submit \
cardano-cli latest transaction submit \
--tx-file tx.signed
```

Expand Down
8 changes: 8 additions & 0 deletions src/data/builder-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,14 @@ export const Showcases = [
getstarted: "https://github.com/cardano-community/pg_cardano/blob/master/README.md#contents",
tags: ["rust", "serialization", "sql", "lowlevel"]
},
{
title: "Cardano-C",
description: "A pure C library for interacting with the Cardano blockchain. Compliant with MISRA standards and binding-friendly architecture.",
preview: require("./builder-tools/cardano-c.png"),
website: "https://github.com/Biglup/cardano-c",
getstarted: "https://cardano-c.readthedocs.io/en/latest/getting_started.html",
tags: ["serialization", "sdk", "lowlevel"]
},
{
title: "Orcfax",
description:
Expand Down
Binary file added src/data/builder-tools/cardano-c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 80b3391

Please sign in to comment.