Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert: stalehash extension #2184

Merged
merged 3 commits into from
Oct 11, 2024
Merged

revert: stalehash extension #2184

merged 3 commits into from
Oct 11, 2024

Conversation

aramikm
Copy link
Collaborator

@aramikm aramikm commented Oct 11, 2024

Goal

The goal of this PR is

Closes #2183

Reverting #2137

Checklist

  • e2e Tests updated
  • Benchmarks updated
  • Spec version incremented?

})
}
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: assuming there is still stalehash check in extrinsics?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That is correct, we didn't remove that check.

Copy link
Collaborator

@saraswatpuneet saraswatpuneet left a comment

Choose a reason for hiding this comment

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

one comment, lgtm

Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

@github-actions github-actions bot added the metadata-changed Metadata has changed since the latest full release label Oct 11, 2024
Copy link
Collaborator

@wilwade wilwade left a comment

Choose a reason for hiding this comment

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

Not sure it's the issue, but we'll revert just in case

@github-actions github-actions bot removed the metadata-changed Metadata has changed since the latest full release label Oct 11, 2024
@@ -232,22 +232,6 @@ describe('📗 Stateful Pallet Storage', function () {
section: 'statefulStorage',
});
});

it('🛑 should fail call to remove page for un-delegated attempts', async function () {
Copy link
Collaborator Author

@aramikm aramikm Oct 11, 2024

Choose a reason for hiding this comment

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

These tests are not correct and I had to remove since we are using a badMsaId which it's nonce is lower than current nonce for providerKeys it is throwing following error.

1010: Invalid Transaction: Transaction is outdated which might be a nonce check race condition issue which is not related to this specific pallet or extrinsic

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

On a second thought it is weird why this gets triggered

The following is the only place we are returning InvalidTransaction::Stale.

		// The default account (no account) has a nonce of 0.
		// If account nonce is not equal to the tx nonce (self.0), the tx is invalid.  Therefore, check if it is a stale or future tx.
		if self.0 != account.nonce {
			return Err(if self.0 < account.nonce {
				InvalidTransaction::Stale
			} else {
				InvalidTransaction::Future
			}
			.into())
		}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think it's a blocker for this PR merge but we should take a deeper look

@github-actions github-actions bot added the metadata-changed Metadata has changed since the latest full release label Oct 11, 2024
@aramikm aramikm merged commit 3931f20 into main Oct 11, 2024
27 checks passed
@aramikm aramikm deleted the removing_provides_for_stalehash branch October 11, 2024 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
metadata-changed Metadata has changed since the latest full release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Stale Hash potential issues
4 participants