You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/TABLE.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
| <spanstyle="color:red;">Critical</span> | Use appropriate origin checks | Open access on extrinsics without checks may allow unauthorized actions that can compromise security | Add access control checks to limit access to specific users or roles |
5
5
| <spanstyle="color:red;">Critical</span> | Avoid unbounded iteration | Unbounded iterations over large data structures can lead to resource exhaustion and potential denial of service | Implement limits or use a bounded storage map for these iterations |
6
6
| <spanstyle="color:red;">Critical</span> | Unchecked input data | Lack of input validation can lead to unexpected behaviors and potential vulnerabilities | Validate input data before processing to ensure safe and predictable behavior |
7
-
| <spanstyle="color:red;">Critical</span> | Avoid unwrap usage inside runtime | Using `unwrap()` or `expect()` without proper error handling can lead to runtime panics and crashes | Handle errors gracefully with `Result` or `Option` types to prevent panics |
7
+
| <spanstyle="color:red;">Critical</span> | Avoid unwrap usage inside runtime | Using `unwrap()` or `expect()` without proper error handling can lead to runtime panics and crashes | Handle errors gracefully with `Result` or `Option` types to prevent panics |
8
8
| <spanstyle="color:red;">Critical</span> | Use benchmarking for accurate dynamic weights | Using hardcoded weights for extrinsics can lead to inaccurate resource estimations and performance issues. | Implement benchmarking to dynamically assess the weights of functions, ensuring they accurately reflect execution costs |
9
9
| <spanstyle="color:orange;">High</span> | Make proper usage of XCM `Junctions`| Misuse of junction types (especially GeneralIndex) for purposes beyond their intended entity representation can lead to incorrect path routing | Use junctions strictly for their intended purpose of representing entities in Location paths; propose RFCs for new needs |
10
10
| <spanstyle="color:orange;">High</span> | Properly setup XCM `Barrier`| Improperly configured XCM executor barriers can allow unauthorized free execution from any origin | Implement restrictive barriers with explicit authorization for unpaid execution and clear documentation of intended uses |
@@ -19,6 +19,7 @@
19
19
| <spanstyle="color:orange;">High</span> | Avoid redundant storage access in mutations | Using both try_mutate and insert leads to unnecessary storage accesses | Use `try_mutate` or `try_mutate_exists` to read, modify, and write in a single step |
20
20
| <spanstyle="color:orange;">High</span> | Prevent unnecessary reads and writes in storage access | Frequent reads and writes to storage without optimization can degrade performance | Use efficient storage access methods such as `try_mutate` to combine reads and writes |
21
21
| <spanstyle="color:orange;">High</span> | Implement `try-state` Hook | The absence of `try-state` hooks prevents runtime sanity checks, making it harder to ensure that the storage state is sensible after upgrades | Implement the `try-state` hook to perform thorough state checks without altering storage |
22
+
| <spanstyle="color:gold;">Medium</span> | Append entries efficiently | Using `try_mutate` has a severe penalty when appending elements to a `StorageValue`| Use `try_append` instead of `try_mutate` whenever possible |
22
23
| <spanstyle="color:gold;">Medium</span> | Implement proper XCM fee management | Using the FeeManager unit type without consideration leads to unintended fee burning rather than proper fee handling | Implement proper FeeManager that either deposits or distributes fees, with clear handling of fee-exempt locations |
23
24
| <spanstyle="color:gold;">Medium</span> | Remove deprecated storage getters | Using deprecated storage getters may lead to compatibility issues in future versions | Replace deprecated getters with the recommended methods in updated frameworks |
24
25
| <spanstyle="color:gold;">Medium</span> | Avoid hardcoded parameters and values | Hardcoding parameters can reduce flexibility and adaptability to different environments | Use configurable parameters to enhance adaptability |
0 commit comments