Skip to content

Commit

Permalink
Add dugong protocol update (#1059)
Browse files Browse the repository at this point in the history
## Summary

Adds support for the WIP dugong protocol update, with a tag pointing at
the tip of radixdlt/radixdlt-scrypto#2068

You'll need to wipe your dev database to run it, as it attempts to run
Dugong right after Cuttlefish part 2.

## Testing

A test checks that Dugong enacts with default testing config.

## Changelog

Updated.
  • Loading branch information
dhedey authored Feb 19, 2025
2 parents cfa428f + 33aa82b commit 9cecaff
Show file tree
Hide file tree
Showing 43 changed files with 249 additions and 166 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,16 +253,21 @@ jobs:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build Node
run: ./gradlew build
- name: Run Node in the background
- name: Pre-build node
# We pre-build the node so that running it is fast in the below job, which means
# we can use the wait 2 minutes trick to wait for it to boot up so that we can
# move on to executing the API tests
run: ./gradlew :core:assemble
- name: Run node in the background
# We run the node in the background so we can run the CLI tests against it
env:
# This is to skip keygen step
RADIXDLT_NODE_KEY: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY=
run: |
echo "db.historical_substate_values.enable=true" >> core/default.config
./gradlew :core:run --info &
- name: Wait for 2 minutes
# This should be enough time for the node to boot up, as we have built it already
run: sleep 2m
- name: Install mesh-cli
run: curl -sSfL https://raw.githubusercontent.com/coinbase/mesh-cli/master/scripts/install.sh | sh -s
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

> Headline features that might be called out in the node release overviews
* Various engine updates - please see the [engine CHANGELOG](https://github.com/radixdlt/radixdlt-scrypto/blob/develop/CHANGELOG.md).
* *Pending...*

### Breaking changes
Expand All @@ -58,7 +59,7 @@

> Other incidental features or changes which shouldn't break existing integrations, but are worthy of mention to node-runners or other interested parties.
* *Pending...*
* A new scenario, `radiswap_v2` will run immediately after `Dugong` enactment on test networks, to demonstrate blueprint linking.

# v1.3.x - [Cuttlefish](https://docs.radixdlt.com/docs/cuttlefish)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,16 @@ public record ProtocolConfig(
public static final String BOTTLENOSE_PROTOCOL_VERSION_NAME = "bottlenose";
public static final String CUTTLEFISH_PART1_PROTOCOL_VERSION_NAME = "cuttlefish";
public static final String CUTTLEFISH_PART2_PROTOCOL_VERSION_NAME = "cuttlefish-part2";
public static final String DUGONG_PROTOCOL_VERSION_NAME = "dugong";

public static ImmutableList<String> VERSION_NAMES =
ImmutableList.of(
GENESIS_PROTOCOL_VERSION_NAME,
ANEMONE_PROTOCOL_VERSION_NAME,
BOTTLENOSE_PROTOCOL_VERSION_NAME,
CUTTLEFISH_PART1_PROTOCOL_VERSION_NAME,
CUTTLEFISH_PART2_PROTOCOL_VERSION_NAME);
CUTTLEFISH_PART2_PROTOCOL_VERSION_NAME,
DUGONG_PROTOCOL_VERSION_NAME);

public static final String LATEST_PROTOCOL_VERSION_NAME =
VERSION_NAMES.get(VERSION_NAMES.size() - 1);
Expand Down
73 changes: 45 additions & 28 deletions core-rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions core-rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ resolver = "2"
# Then use tag="release_name-BLAH" in the below dependencies.
# =================================================================

sbor = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "develop-d6b146e6", features = ["serde"] }
radix-transactions = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "develop-d6b146e6" }
radix-transaction-scenarios = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "develop-d6b146e6" }
radix-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "develop-d6b146e6", features = ["serde"] }
radix-engine-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "develop-d6b146e6" }
radix-engine = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "develop-d6b146e6" }
radix-substate-store-impls = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "develop-d6b146e6" }
radix-substate-store-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "develop-d6b146e6" }
radix-substate-store-queries = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "develop-d6b146e6" }
radix-rust = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "develop-d6b146e6", features = ["serde"] }
radix-blueprint-schema-init = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "develop-d6b146e6", features = ["serde"] }
radix-engine-toolkit-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "develop-d6b146e6" }
sbor = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "dugong-1655ddc3", features = ["serde"] }
radix-transactions = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "dugong-1655ddc3" }
radix-transaction-scenarios = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "dugong-1655ddc3" }
radix-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "dugong-1655ddc3", features = ["serde"] }
radix-engine-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "dugong-1655ddc3" }
radix-engine = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "dugong-1655ddc3" }
radix-substate-store-impls = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "dugong-1655ddc3" }
radix-substate-store-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "dugong-1655ddc3" }
radix-substate-store-queries = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "dugong-1655ddc3" }
radix-rust = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "dugong-1655ddc3", features = ["serde"] }
radix-blueprint-schema-init = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "dugong-1655ddc3", features = ["serde"] }
radix-engine-toolkit-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "dugong-1655ddc3" }

itertools = { version = "=0.10.5" }
jni = { version = "=0.19.0" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ pub(crate) async fn handle_lts_transaction_status(
.filter_map(|p| p.1.intent_invalid_from_epoch)
.next();

let intent_is_permanently_rejected = invalid_from_epoch.map_or(false, |invalid_from_epoch| {
current_epoch >= invalid_from_epoch
}) || known_pending_payloads.iter().any(|p| {
p.1.earliest_permanent_rejection
.as_ref()
.map_or(false, |r| r.marks_permanent_rejection_for_intent())
});
let intent_is_permanently_rejected = invalid_from_epoch
.is_some_and(|invalid_from_epoch| current_epoch >= invalid_from_epoch)
|| known_pending_payloads.iter().any(|p| {
p.1.earliest_permanent_rejection
.as_ref()
.is_some_and(|r| r.marks_permanent_rejection_for_intent())
});

if let Some(txn_state_version) = txn_state_version_opt {
let hashes = database
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ pub(crate) async fn handle_transaction_status(
.filter_map(|p| p.1.intent_invalid_from_epoch)
.next();

let intent_is_permanently_rejected = invalid_from_epoch.map_or(false, |invalid_from_epoch| {
current_epoch >= invalid_from_epoch
}) || known_pending_payloads.iter().any(|p| {
p.1.earliest_permanent_rejection
.as_ref()
.map_or(false, |r| r.marks_permanent_rejection_for_intent())
});
let intent_is_permanently_rejected = invalid_from_epoch
.is_some_and(|invalid_from_epoch| current_epoch >= invalid_from_epoch)
|| known_pending_payloads.iter().any(|p| {
p.1.earliest_permanent_rejection
.as_ref()
.is_some_and(|r| r.marks_permanent_rejection_for_intent())
});

if let Some(txn_state_version) = txn_state_version_opt {
let hashes = database
Expand Down
Loading

0 comments on commit 9cecaff

Please sign in to comment.