Skip to content

cuprated: relay rules#424

Merged
Boog900 merged 5 commits intomainfrom
relay_rules
Apr 11, 2025
Merged

cuprated: relay rules#424
Boog900 merged 5 commits intomainfrom
relay_rules

Conversation

@Boog900
Copy link
Copy Markdown
Member

@Boog900 Boog900 commented Apr 2, 2025

What

Adds tx-pool relay rules to cuprated.

@github-actions github-actions Bot added the A-binaries Area: Related to binaries. label Apr 2, 2025
@Boog900 Boog900 marked this pull request as ready for review April 2, 2025 19:41
@Boog900 Boog900 self-assigned this Apr 2, 2025
@Boog900 Boog900 requested a review from hinto-janai April 2, 2025 19:41
@Boog900 Boog900 removed their assignment Apr 2, 2025
Comment thread binaries/cuprated/src/txpool/relay_rules.rs
Comment thread binaries/cuprated/src/txpool/relay_rules.rs
Comment thread binaries/cuprated/src/txpool/relay_rules.rs Outdated
Comment thread binaries/cuprated/src/txpool/relay_rules.rs
/// Checks the transaction passes the relay rules.
///
/// Relay rules are rules that govern the txs we accept to our tx-pool and propagate around the network.
pub fn check_tx_relay_rules(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some questions:

Copy link
Copy Markdown
Member Author

@Boog900 Boog900 Apr 11, 2025

Choose a reason for hiding this comment

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

There seem to be other relay rules not included here, e.g.: https://github.com/monero-project/monero/blob/3b01c490953fe92f3c6628fa31d280a4f0490d28/src/cryptonote_core/tx_pool.cpp#L150-L151, should the diff between monerod and cuprated relay rule behavior be documented somewhere?

That one isn't really a relay rule IMO, it just prevents a previously timed out tx from getting added to the pool again.

All relay rules should be included here.

Should check_fee/dynamic_base_fee have some tests to make sure it matches monerod over time?

Probably, I don't know how we would do that without generating txs though so that will have to come later

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

monerod's tx-pool also deals with some consensus checks, only the checks that have m_no_drop_offense = true are relay checks

@Boog900 Boog900 requested a review from hinto-janai April 11, 2025 18:48
@Boog900 Boog900 merged commit 474ff9e into main Apr 11, 2025
11 checks passed
@Boog900 Boog900 deleted the relay_rules branch April 14, 2025 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-binaries Area: Related to binaries.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants