Skip to content

Conversation

@zvolin
Copy link
Member

@zvolin zvolin commented Oct 3, 2025

No description provided.

@zvolin zvolin marked this pull request as ready for review October 10, 2025 15:08
@zvolin zvolin requested review from fl0rek and oblique October 14, 2025 09:18

# This validator is started as a separate network, only to be able to test
# transactions eviction cases. Thus it has low TTL and block size.
validator-eviction-testing:
Copy link
Member

Choose a reason for hiding this comment

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

I think validators should be grouped together, but not feeling too strongly about it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I moved it to the bottom because it's completely separate network, but no strong feelings too

environment:
- NODE_NAME=validator-eviction-testing
# amount of DA nodes to provision (default: 3)
- NODE_COUNT=3
Copy link
Member

Choose a reason for hiding this comment

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

Does it mean that both validators will send the funds?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, because the networks are separated, accounts need funding on both

Copy link
Member

Choose a reason for hiding this comment

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

thanks! shared secret keys and separate networks threw me off initially. Would you mind adding small comment like

This creates a separate private network, with the same accounts provisioned
or something to that effect

@zvolin zvolin requested a review from fl0rek October 14, 2025 13:40
pub struct TestAccount {
/// Bech32 `AccountId` of this account
pub address: Address,
#[allow(dead_code)]
Copy link
Member

Choose a reason for hiding this comment

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

Move this below the doc comment


if let Some(new_sequence) = res.as_ref().err().and_then(extract_sequence_on_mismatch) {
account.base.sequence = new_sequence?;
continue;
Copy link
Member

Choose a reason for hiding this comment

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

This goes back to sign_tx, shouldn't we recalculate gas?


if let Some(new_sequence) = res.as_ref().err().and_then(extract_sequence_on_mismatch) {
account.base.sequence = new_sequence?;
continue;
Copy link
Member

Choose a reason for hiding this comment

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

Some as the above comment

// we need to revert the account sequence to that of the rejected tx.
TxStatus::Rejected => {
let mut acc = self.lock_account(context).await?;
acc.base.sequence = sequence;
Copy link
Member

Choose a reason for hiding this comment

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

Is the following possible?

  1. User starts 3 submissions
  2. They got signed and broadcasted sequencally, lets say their sequence numbers are: 101, 102, 103
  3. On the confirm_tx, we get the replies with this order: 102, 101, 103
  4. The base.sequence becames 103, but in reality it should be the lowest evicted.

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.

update the sequence and resign transaction when rejected due to sequence mismatch Re-broadcasting evicted transactions and add Rejected status

3 participants