Documentation: Clarify that #[transactional] is NOT applied by default to functions #1848
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses a misconception about the
#[transactional]
attribute usage in Bifrost pallets by providing comprehensive analysis and documentation.Issue
Someone claimed that "all functions now have
#[transactional]
by default" which needed verification and clarification.Analysis Results
After thorough analysis of the Bifrost codebase, this claim is completely FALSE. The evidence shows:
Key Findings
#[transactional]
#[transactional]
#[transactional]
#[transactional]
(out of hundreds)#[transactional]
usage is on internal helper functions, not user-facing pallet callsActual Behavior
Documentation Added
transactional_analysis.md
) - Detailed investigation resultsANSWER_CN.md
,ANSWER_EN.md
) - Direct responses in Chinese and Englishtest_transactional_usage.sh
,demo_transactional_patterns.sh
) - Executable verification toolsConclusion
The
#[transactional]
attribute is:This documentation will help prevent future confusion about Substrate's transactional behavior in the Bifrost ecosystem.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.