-
Notifications
You must be signed in to change notification settings - Fork 81
Expand file tree
/
Copy pathgas_thresholds.json
More file actions
168 lines (168 loc) · 4.98 KB
/
gas_thresholds.json
File metadata and controls
168 lines (168 loc) · 4.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
{
"version": "1.0.0",
"description": "Gas benchmark regression thresholds for TeachLink contract operations",
"last_updated": "2026-03-28",
"thresholds": {
"contract_operations": {
"initialize": {
"max_instructions": 500000,
"max_memory_bytes": 50000,
"description": "Contract initialization"
},
"add_validator": {
"max_instructions": 200000,
"max_memory_bytes": 10000,
"description": "Adding a validator to bridge"
},
"add_supported_chain": {
"max_instructions": 200000,
"max_memory_bytes": 10000,
"description": "Adding a supported destination chain"
},
"set_bridge_fee": {
"max_instructions": 150000,
"max_memory_bytes": 5000,
"description": "Setting bridge transaction fee"
},
"read_query": {
"max_instructions": 100000,
"max_memory_bytes": 5000,
"description": "Read-only queries (get_token, get_nonce, etc.)"
}
},
"bridge_operations": {
"bridge_out": {
"max_instructions": 800000,
"max_memory_bytes": 50000,
"description": "Locking tokens for cross-chain bridge"
},
"complete_bridge": {
"max_instructions": 1000000,
"max_memory_bytes": 80000,
"description": "Completing a bridge transaction with validator signatures"
},
"cancel_bridge": {
"max_instructions": 500000,
"max_memory_bytes": 30000,
"description": "Cancelling a pending bridge transaction"
}
},
"performance_cache": {
"cache_hit": {
"max_instructions": 200000,
"max_memory_bytes": 20000,
"description": "Reading from performance cache (fresh)"
},
"cache_miss_compute": {
"max_instructions": 1500000,
"max_memory_bytes": 100000,
"description": "Computing bridge summary on cache miss"
},
"cache_invalidation": {
"max_instructions": 150000,
"max_memory_bytes": 5000,
"description": "Invalidating performance cache"
}
},
"consensus": {
"register_validator": {
"max_instructions": 500000,
"max_memory_bytes": 30000,
"description": "Registering a BFT consensus validator"
},
"create_proposal": {
"max_instructions": 400000,
"max_memory_bytes": 30000,
"description": "Creating a bridge proposal for consensus"
},
"vote_on_proposal": {
"max_instructions": 300000,
"max_memory_bytes": 20000,
"description": "Voting on a bridge proposal"
}
},
"tokenization": {
"mint_content_token": {
"max_instructions": 600000,
"max_memory_bytes": 50000,
"description": "Minting an educational content NFT"
},
"transfer_content_token": {
"max_instructions": 500000,
"max_memory_bytes": 30000,
"description": "Transferring content token ownership"
},
"update_metadata": {
"max_instructions": 400000,
"max_memory_bytes": 30000,
"description": "Updating content token metadata"
}
},
"rewards": {
"initialize_rewards": {
"max_instructions": 400000,
"max_memory_bytes": 20000,
"description": "Initializing the rewards system"
},
"fund_reward_pool": {
"max_instructions": 500000,
"max_memory_bytes": 20000,
"description": "Funding the reward pool"
},
"issue_reward": {
"max_instructions": 400000,
"max_memory_bytes": 20000,
"description": "Issuing rewards to a user"
},
"claim_rewards": {
"max_instructions": 600000,
"max_memory_bytes": 30000,
"description": "Claiming pending rewards"
}
},
"messaging": {
"send_packet": {
"max_instructions": 700000,
"max_memory_bytes": 50000,
"description": "Sending a cross-chain packet"
},
"deliver_packet": {
"max_instructions": 500000,
"max_memory_bytes": 30000,
"description": "Marking a packet as delivered"
}
},
"notifications": {
"send_notification": {
"max_instructions": 350000,
"max_memory_bytes": 20000,
"description": "Sending an in-app notification"
}
},
"mobile_platform": {
"initialize_mobile_profile": {
"max_instructions": 400000,
"max_memory_bytes": 30000,
"description": "Initializing user mobile profile"
}
},
"audit": {
"create_audit_record": {
"max_instructions": 400000,
"max_memory_bytes": 20000,
"description": "Creating an audit trail record"
}
},
"wasm_binary": {
"max_size_bytes": 307200,
"warning_size_bytes": 256000,
"description": "WASM binary size limit (300 KB)"
}
},
"regression_policy": {
"max_percentage_increase": 10,
"warning_percentage_increase": 5,
"fail_on_regression": true,
"baseline_file": "gas_baseline.json"
}
}