Skip to content

Commit 54cd9aa

Browse files
committed
merge upstream/main
Signed-off-by: William Hankins <william@sundae.fi>
1 parent c09a81d commit 54cd9aa

File tree

28 files changed

+1484
-118
lines changed

28 files changed

+1484
-118
lines changed

.github/workflows/run-tests-on-push-to-main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ jobs:
4040
--package acropolis_module_snapshot_bootstrapper \
4141
--package acropolis_module_spdd_state \
4242
--package acropolis_module_stake_delta_filter \
43+
--package acropolis_module_tx_submitter \
4344
--package acropolis_module_upstream_chain_fetcher \
44-
--package acropolis_module_utxo_state
45+
--package acropolis_module_utxo_state \
46+
--package acropolis_process_tx_submitter_cli
4547
4648
- name: Run Build
4749
run: cargo build --verbose
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Weekly Status Markdown
2+
3+
on:
4+
schedule:
5+
- cron: "0 14 * * MON" # Mondays 07:00 PT (14:00 UTC)
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-status:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
issues: write # needed to create/update issues
14+
pull-requests: write # needed to post/update a PR comment
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.11"
22+
23+
- name: Install deps
24+
run: pip install requests
25+
26+
- name: Get current date
27+
id: date
28+
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
29+
30+
- name: Generate weekly status markdown
31+
id: gen
32+
env:
33+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
REPO: input-output-hk/acropolis
35+
# --- Use ONE of the two approaches below ---
36+
37+
# A) Projects v2 (recommended):
38+
PROJECT_OWNER: input-output-hk
39+
PROJECT_NUMBER: 7
40+
STATUS_DONE_VALUE: Done
41+
STATUS_INPROGRESS_VALUE: In Progress
42+
43+
# B) Fallback via labels:
44+
# DONE_LABELS: "status: done,done"
45+
# INPROGRESS_LABELS: "status: in progress,in progress"
46+
47+
OUTPUT_PATH: artifacts/weekly_status.md
48+
run: |
49+
mkdir -p artifacts
50+
python scripts/weekly_status_markdown.py | tee /tmp/out.md
51+
echo "md<<EOF" >> $GITHUB_OUTPUT
52+
cat /tmp/out.md >> $GITHUB_OUTPUT
53+
echo "EOF" >> $GITHUB_OUTPUT
54+
55+
- name: Upload markdown artifact
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: weekly-status
59+
path: artifacts/weekly_status.md
60+
if-no-files-found: warn
61+
62+
# Create GitHub Issue with weekly status
63+
- name: Create Weekly Status Issue
64+
if: ${{ github.event_name != 'pull_request' }}
65+
uses: actions/github-script@v7
66+
with:
67+
script: |
68+
console.log('Event name:', context.eventName);
69+
console.log('Checking if artifacts/weekly_status.md exists...');
70+
71+
const fs = require('fs');
72+
if (!fs.existsSync('artifacts/weekly_status.md')) {
73+
console.log('❌ artifacts/weekly_status.md not found!');
74+
throw new Error('Weekly status file not found');
75+
}
76+
77+
const content = fs.readFileSync('artifacts/weekly_status.md', 'utf8');
78+
console.log('✅ File read successfully, length:', content.length);
79+
80+
const issue = await github.rest.issues.create({
81+
owner: context.repo.owner,
82+
repo: context.repo.repo,
83+
title: `📊 Weekly Status - Week of ${{ steps.date.outputs.date }}`,
84+
body: content,
85+
labels: ['weekly-status', 'automated']
86+
});
87+
88+
console.log('✅ Issue created successfully:', issue.data.html_url);

Cargo.lock

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ members = [
2525
"modules/historical_accounts_state", # Tracks historical account information
2626
"modules/consensus", # Chooses favoured chain across multiple options
2727
"modules/chain_store", # Tracks historical information about blocks and TXs
28+
"modules/tx_submitter", # Submits TXs to peers
2829

2930
# Process builds
30-
"processes/omnibus", # All-inclusive omnibus process
31-
"processes/replayer", # All-inclusive process to replay messages
32-
"processes/golden_tests", # All-inclusive golden tests process
31+
"processes/omnibus", # All-inclusive omnibus process
32+
"processes/replayer", # All-inclusive process to replay messages
33+
"processes/golden_tests", # All-inclusive golden tests process
34+
"processes/tx_submitter_cli", # CLI wrapper for TX submitter
3335
]
3436
resolver = "2"
3537

@@ -41,7 +43,7 @@ caryatid_module_clock = "0.12"
4143
caryatid_module_spy = "0.12"
4244
anyhow = "1.0"
4345
chrono = "0.4"
44-
clap = { version = "4.5", features = ["derive"] }
46+
clap = { version = "4.5", features = ["derive", "string"] }
4547
config = "0.15.11"
4648
dashmap = "6.1.0"
4749
hex = "0.4"

codec/src/map_parameters.rs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,9 @@ pub fn map_address(address: &addresses::Address) -> Result<Address> {
6969

7070
addresses::Address::Stake(stake_address) => Ok(Address::Stake(StakeAddress {
7171
network: map_network(stake_address.network())?,
72-
payload: match stake_address.payload() {
73-
addresses::StakePayload::Stake(hash) => {
74-
StakeAddressPayload::StakeKeyHash(hash.to_vec())
75-
}
76-
addresses::StakePayload::Script(hash) => {
77-
StakeAddressPayload::ScriptHash(hash.to_vec())
78-
}
72+
credential: match stake_address.payload() {
73+
addresses::StakePayload::Stake(hash) => StakeCredential::AddrKeyHash(hash.to_vec()),
74+
addresses::StakePayload::Script(hash) => StakeCredential::ScriptHash(hash.to_vec()),
7975
},
8076
})),
8177
}
@@ -97,10 +93,10 @@ pub fn map_stake_credential(cred: &PallasStakeCredential) -> StakeCredential {
9793
pub fn map_stake_address(cred: &PallasStakeCredential, network_id: NetworkId) -> StakeAddress {
9894
let payload = match cred {
9995
PallasStakeCredential::AddrKeyhash(key_hash) => {
100-
StakeAddressPayload::StakeKeyHash(key_hash.to_vec())
96+
StakeCredential::AddrKeyHash(key_hash.to_vec())
10197
}
10298
PallasStakeCredential::ScriptHash(script_hash) => {
103-
StakeAddressPayload::ScriptHash(script_hash.to_vec())
99+
StakeCredential::ScriptHash(script_hash.to_vec())
104100
}
105101
};
106102

@@ -274,7 +270,7 @@ pub fn map_certificate(
274270
.iter()
275271
.map(|v| {
276272
StakeAddress::new(
277-
StakeAddressPayload::StakeKeyHash(v.to_vec()),
273+
StakeCredential::AddrKeyHash(v.to_vec()),
278274
network_id.clone().into(),
279275
)
280276
})
@@ -398,7 +394,7 @@ pub fn map_certificate(
398394
.into_iter()
399395
.map(|v| {
400396
StakeAddress::new(
401-
StakeAddressPayload::StakeKeyHash(v.to_vec()),
397+
StakeCredential::AddrKeyHash(v.to_vec()),
402398
network_id.clone().into(),
403399
)
404400
})

0 commit comments

Comments
 (0)