Skip to content

Conversation

@SupernaviX
Copy link
Collaborator

@SupernaviX SupernaviX commented Oct 23, 2025

Completes #203

Implements a new tx_submission module. This module listens for commands to submit a transaction, submits it, and replies once the TX has been acknowledged.

At the moment it connects to one hard-coded peer (though it handles gracefully reconnecting on error). When we support multiple peers and peer discovery, that will of course need to change.

I also built a CLI tool for ease of testing. That lives in a subdirectory of the new module. I tested it on a lil testnet and it worked fine.

@SupernaviX SupernaviX changed the title feat: start working on tx submission TxSubmission module Oct 24, 2025
@SupernaviX SupernaviX linked an issue Oct 24, 2025 that may be closed by this pull request
@SupernaviX SupernaviX marked this pull request as ready for review October 24, 2025 20:24
Copy link
Collaborator

@sandtreader sandtreader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice! Only question is where the cli should live - I'd prefer it in utils/ I think.

(ignore some comment noise about request/response, I should have read all of it)

--package acropolis_module_spdd_state \
--package acropolis_module_stake_delta_filter \
--package acropolis_module_tx_submitter \
--package acropolis_module_tx_submitter_cli \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a module - it has its own main. Should go into top-level utils/ or somesuch I think.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see sorry, it's in a subdir of modules/tx_submitter. Still I think it should be pulled out.

let mut process = Process::<Message>::create(config).await;

TxSubmitter::register(&mut process);
CliDriver::register(&mut process);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is neat but I'm wondering if we need a simpler way to create single-message CLIs... I'll think about it!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sandtreader I think it'd be worth finding a simpler way to do this if/when we have a second use case for it. Do you know of any other "commands" that the system would need to support? I can't think of a way for a user to modify system state besides submitting a transaction (unless we support custom indexers or something like that

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a fair point! Yes let's leave it if/until needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

) <- sorry, I forgot this

};
let tx = Arc::new(Transaction::from_bytes(cbor)?);
let mut waiting = FuturesUnordered::new();
for peer in peers {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh, nice :-)

@sandtreader
Copy link
Collaborator

All good, thanks - merging

@sandtreader sandtreader merged commit 0224c04 into main Oct 27, 2025
2 checks passed
@sandtreader sandtreader deleted the sg/tx-submission branch October 27, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tx Submission

3 participants