Skip to content

Commit f8dc256

Browse files
feat: Add fees for hook transactions (#21157)
Signed-off-by: Neeharika-Sompalli <[email protected]> Signed-off-by: Michael Tinker <[email protected]> Co-authored-by: Michael Tinker <[email protected]>
1 parent 6c7ae40 commit f8dc256

File tree

41 files changed

+745
-112
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+745
-112
lines changed

hapi/hedera-protobuf-java-api/src/main/proto/services/basic_types.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,11 @@ enum SubType {
871871
* for a topic with custom fees.
872872
*/
873873
SUBMIT_MESSAGE_WITH_CUSTOM_FEES = 7;
874+
875+
/**
876+
* The resource cost for the transaction type that includes a CryptoTransfer with hook invocations
877+
*/
878+
CRYPTO_TRANSFER_WITH_HOOKS = 8;
874879
}
875880

876881
/**

hedera-node/configuration/mainnet/upgrade/feeSchedules.json

Lines changed: 86 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"bpt": 10179648,
3737
"vpt": 25449119198,
3838
"rbh": 6786,
39-
"sbh": 509,
39+
"sbh": 10000000000000,
4040
"gas": 67864,
4141
"bpr": 10179648,
4242
"sbpr": 254491,
@@ -220,7 +220,7 @@
220220
"bpt": 521252,
221221
"vpt": 1303130322,
222222
"rbh": 348,
223-
"sbh": 26,
223+
"sbh": 10000000000000,
224224
"gas": 3475,
225225
"bpr": 521252,
226226
"sbpr": 13031,
@@ -274,6 +274,45 @@
274274
"max": 1000000000000000
275275
}
276276
},
277+
{
278+
"subType": "CRYPTO_TRANSFER_WITH_HOOKS",
279+
"nodedata": {
280+
"constant": 7574478,
281+
"bpt": 12109,
282+
"vpt": 30273301,
283+
"rbh": 8,
284+
"sbh": 1,
285+
"gas": 81,
286+
"bpr": 12109,
287+
"sbpr": 303,
288+
"min": 0,
289+
"max": 1000000000000000
290+
},
291+
"networkdata": {
292+
"constant": 151489557,
293+
"bpt": 242186,
294+
"vpt": 605466012,
295+
"rbh": 161,
296+
"sbh": 12,
297+
"gas": 1615,
298+
"bpr": 242186,
299+
"sbpr": 6055,
300+
"min": 0,
301+
"max": 1000000000000000
302+
},
303+
"servicedata": {
304+
"constant": 151489557,
305+
"bpt": 242186,
306+
"vpt": 605466012,
307+
"rbh": 161,
308+
"sbh": 500000000000,
309+
"gas": 852000,
310+
"bpr": 242186,
311+
"sbpr": 6055,
312+
"min": 0,
313+
"max": 1000000000000000
314+
}
315+
},
277316
{
278317
"subType": "TOKEN_FUNGIBLE_COMMON",
279318
"nodedata": {
@@ -2841,7 +2880,7 @@
28412880
"bpt": 0,
28422881
"vpt": 0,
28432882
"rbh": 0,
2844-
"sbh": 0,
2883+
"sbh": 10000000000000,
28452884
"gas": 852000,
28462885
"bpr": 0,
28472886
"sbpr": 0,
@@ -2889,6 +2928,7 @@
28892928
"rbh": 41575,
28902929
"sbh": 3118,
28912930
"gas": 415754,
2931+
"tv": 10000000000000,
28922932
"bpr": 62363050,
28932933
"sbpr": 1559076,
28942934
"min": 0,
@@ -3951,7 +3991,7 @@
39513991
"bpt": 10179648,
39523992
"vpt": 25449119198,
39533993
"rbh": 6786,
3954-
"sbh": 509,
3994+
"sbh": 10000000000000,
39553995
"gas": 67864,
39563996
"bpr": 10179648,
39573997
"sbpr": 254491,
@@ -4135,7 +4175,7 @@
41354175
"bpt": 521252,
41364176
"vpt": 1303130322,
41374177
"rbh": 348,
4138-
"sbh": 26,
4178+
"sbh": 10000000000000,
41394179
"gas": 3475,
41404180
"bpr": 521252,
41414181
"sbpr": 13031,
@@ -4189,6 +4229,45 @@
41894229
"max": 1000000000000000
41904230
}
41914231
},
4232+
{
4233+
"subType": "CRYPTO_TRANSFER_WITH_HOOKS",
4234+
"nodedata": {
4235+
"constant": 7574478,
4236+
"bpt": 12109,
4237+
"vpt": 30273301,
4238+
"rbh": 8,
4239+
"sbh": 1,
4240+
"gas": 81,
4241+
"bpr": 12109,
4242+
"sbpr": 303,
4243+
"min": 0,
4244+
"max": 1000000000000000
4245+
},
4246+
"networkdata": {
4247+
"constant": 151489557,
4248+
"bpt": 242186,
4249+
"vpt": 605466012,
4250+
"rbh": 161,
4251+
"sbh": 12,
4252+
"gas": 1615,
4253+
"bpr": 242186,
4254+
"sbpr": 6055,
4255+
"min": 0,
4256+
"max": 1000000000000000
4257+
},
4258+
"servicedata": {
4259+
"constant": 151489557,
4260+
"bpt": 242186,
4261+
"vpt": 605466012,
4262+
"rbh": 161,
4263+
"sbh": 500000000000,
4264+
"gas": 852000,
4265+
"bpr": 242186,
4266+
"sbpr": 6055,
4267+
"min": 0,
4268+
"max": 1000000000000000
4269+
}
4270+
},
41924271
{
41934272
"subType": "TOKEN_FUNGIBLE_COMMON",
41944273
"nodedata": {
@@ -6710,7 +6789,7 @@
67106789
"bpt": 0,
67116790
"vpt": 0,
67126791
"rbh": 0,
6713-
"sbh": 0,
6792+
"sbh": 10000000000000,
67146793
"gas": 852000,
67156794
"bpr": 0,
67166795
"sbpr": 0,
@@ -6758,6 +6837,7 @@
67586837
"rbh": 41575,
67596838
"sbh": 3118,
67606839
"gas": 415754,
6840+
"tv": 10000000000000,
67616841
"bpr": 62363050,
67626842
"sbpr": 1559076,
67636843
"min": 0,

hedera-node/configuration/previewnet/upgrade/feeSchedules.json

Lines changed: 86 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"bpt": 10179648,
3737
"vpt": 25449119198,
3838
"rbh": 6786,
39-
"sbh": 509,
39+
"sbh": 10000000000000,
4040
"gas": 67864,
4141
"bpr": 10179648,
4242
"sbpr": 254491,
@@ -220,7 +220,7 @@
220220
"bpt": 521252,
221221
"vpt": 1303130322,
222222
"rbh": 348,
223-
"sbh": 26,
223+
"sbh": 10000000000000,
224224
"gas": 3475,
225225
"bpr": 521252,
226226
"sbpr": 13031,
@@ -320,6 +320,45 @@
320320
"max": 1000000000000000
321321
}
322322
},
323+
{
324+
"subType": "CRYPTO_TRANSFER_WITH_HOOKS",
325+
"nodedata": {
326+
"constant": 7574478,
327+
"bpt": 12109,
328+
"vpt": 30273301,
329+
"rbh": 8,
330+
"sbh": 1,
331+
"gas": 81,
332+
"bpr": 12109,
333+
"sbpr": 303,
334+
"min": 0,
335+
"max": 1000000000000000
336+
},
337+
"networkdata": {
338+
"constant": 151489557,
339+
"bpt": 242186,
340+
"vpt": 605466012,
341+
"rbh": 161,
342+
"sbh": 12,
343+
"gas": 1615,
344+
"bpr": 242186,
345+
"sbpr": 6055,
346+
"min": 0,
347+
"max": 1000000000000000
348+
},
349+
"servicedata": {
350+
"constant": 151489557,
351+
"bpt": 242186,
352+
"vpt": 605466012,
353+
"rbh": 161,
354+
"sbh": 500000000000,
355+
"gas": 852000,
356+
"bpr": 242186,
357+
"sbpr": 6055,
358+
"min": 0,
359+
"max": 1000000000000000
360+
}
361+
},
323362
{
324363
"subType": "TOKEN_FUNGIBLE_COMMON",
325364
"nodedata": {
@@ -2795,7 +2834,7 @@
27952834
"bpt": 0,
27962835
"vpt": 0,
27972836
"rbh": 0,
2798-
"sbh": 0,
2837+
"sbh": 10000000000000,
27992838
"gas": 852000,
28002839
"bpr": 0,
28012840
"sbpr": 0,
@@ -2843,6 +2882,7 @@
28432882
"rbh": 41575,
28442883
"sbh": 3118,
28452884
"gas": 415754,
2885+
"tv": 10000000000000,
28462886
"bpr": 62363050,
28472887
"sbpr": 1559076,
28482888
"min": 0,
@@ -3905,7 +3945,7 @@
39053945
"bpt": 10179648,
39063946
"vpt": 25449119198,
39073947
"rbh": 6786,
3908-
"sbh": 509,
3948+
"sbh": 10000000000000,
39093949
"gas": 67864,
39103950
"bpr": 10179648,
39113951
"sbpr": 254491,
@@ -4089,7 +4129,7 @@
40894129
"bpt": 521252,
40904130
"vpt": 1303130322,
40914131
"rbh": 348,
4092-
"sbh": 26,
4132+
"sbh": 10000000000000,
40934133
"gas": 3475,
40944134
"bpr": 521252,
40954135
"sbpr": 13031,
@@ -4189,6 +4229,45 @@
41894229
"max": 1000000000000000
41904230
}
41914231
},
4232+
{
4233+
"subType": "CRYPTO_TRANSFER_WITH_HOOKS",
4234+
"nodedata": {
4235+
"constant": 7574478,
4236+
"bpt": 12109,
4237+
"vpt": 30273301,
4238+
"rbh": 8,
4239+
"sbh": 1,
4240+
"gas": 81,
4241+
"bpr": 12109,
4242+
"sbpr": 303,
4243+
"min": 0,
4244+
"max": 1000000000000000
4245+
},
4246+
"networkdata": {
4247+
"constant": 151489557,
4248+
"bpt": 242186,
4249+
"vpt": 605466012,
4250+
"rbh": 161,
4251+
"sbh": 12,
4252+
"gas": 1615,
4253+
"bpr": 242186,
4254+
"sbpr": 6055,
4255+
"min": 0,
4256+
"max": 1000000000000000
4257+
},
4258+
"servicedata": {
4259+
"constant": 151489557,
4260+
"bpt": 242186,
4261+
"vpt": 605466012,
4262+
"rbh": 161,
4263+
"sbh": 500000000000,
4264+
"gas": 852000,
4265+
"bpr": 242186,
4266+
"sbpr": 6055,
4267+
"min": 0,
4268+
"max": 1000000000000000
4269+
}
4270+
},
41924271
{
41934272
"subType": "TOKEN_FUNGIBLE_COMMON",
41944273
"nodedata": {
@@ -6664,7 +6743,7 @@
66646743
"bpt": 0,
66656744
"vpt": 0,
66666745
"rbh": 0,
6667-
"sbh": 0,
6746+
"sbh": 10000000000000,
66686747
"gas": 852000,
66696748
"bpr": 0,
66706749
"sbpr": 0,
@@ -6712,6 +6791,7 @@
67126791
"rbh": 41575,
67136792
"sbh": 3118,
67146793
"gas": 415754,
6794+
"tv": 10000000000000,
67156795
"bpr": 62363050,
67166796
"sbpr": 1559076,
67176797
"min": 0,

0 commit comments

Comments
 (0)