Skip to content

Commit 68c0b54

Browse files
committed
Actually use the base fee from the block header for txn validity
1 parent bad55c9 commit 68c0b54

File tree

27 files changed

+1333
-1221
lines changed

27 files changed

+1333
-1221
lines changed

cmd/tealdbg/local.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ func (r *LocalRunner) RunAll() error {
536536
start := time.Now()
537537

538538
sep := logic.NewSigEvalParams(r.txnGroup, &r.proto, &logic.NoHeaderLedger{})
539-
aep := logic.NewAppEvalParams(txngroup, &r.proto, &transactions.SpecialAddresses{})
539+
aep := logic.NewAppEvalParams(txngroup, &r.proto, &transactions.SpecialAddresses{}, basics.MicroAlgos{Raw: r.proto.MinTxnFee})
540540
if r.debugger != nil {
541541
t := logic.MakeEvalTracerDebuggerAdaptor(r.debugger)
542542
sep.Tracer = t

cmd/tealdbg/localLedger_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ int 2
112112
a.NoError(err)
113113

114114
proto := config.Consensus[protocol.ConsensusCurrentVersion]
115-
ep := logic.NewAppEvalParams([]transactions.SignedTxnWithAD{{SignedTxn: txn}}, &proto, &transactions.SpecialAddresses{})
115+
ep := logic.NewAppEvalParams([]transactions.SignedTxnWithAD{{SignedTxn: txn}}, &proto, &transactions.SpecialAddresses{}, basics.MicroAlgos{Raw: proto.MinTxnFee})
116116
pass, delta, err := ba.StatefulEval(0, ep, appIdx, program)
117117
a.NoError(err)
118118
a.True(pass)

daemon/algod/api/algod.oas2.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@
371371
},
372372
"/v2/accounts/{address}/transactions/pending": {
373373
"get": {
374-
"description": "Get the list of pending transactions by address, sorted by priority, in decreasing order, truncated at the end at MAX. If MAX = 0, returns all pending transactions.\n",
374+
"description": "Get the list of pending transactions by address, sorted by priority, in decreasing order, truncated at the end at MAX. If MAX = 0, returns all pending transactions.",
375375
"tags": ["public", "participating"],
376376
"produces": ["application/json", "application/msgpack"],
377377
"schemes": ["http"],
@@ -1323,7 +1323,7 @@
13231323
},
13241324
"/v2/transactions/pending": {
13251325
"get": {
1326-
"description": "Get the list of pending transactions, sorted by priority, in decreasing order, truncated at the end at MAX. If MAX = 0, returns all pending transactions.\n",
1326+
"description": "Get the list of pending transactions, sorted by priority, in decreasing order, truncated at the end at MAX. If MAX = 0, returns all pending transactions.",
13271327
"tags": ["public", "participating"],
13281328
"produces": ["application/json", "application/msgpack"],
13291329
"schemes": ["http"],
@@ -1367,7 +1367,7 @@
13671367
},
13681368
"/v2/transactions/pending/{txid}": {
13691369
"get": {
1370-
"description": "Given a transaction ID of a recently submitted transaction, it returns information about it. There are several cases when this might succeed:\n- transaction committed (committed round \u003e 0)\n- transaction still in the pool (committed round = 0, pool error = \"\")\n- transaction removed from pool due to error (committed round = 0, pool error != \"\")\nOr the transaction may have happened sufficiently long ago that the node no longer remembers it, and this will return an error.\n",
1370+
"description": "Given a transaction ID of a recently submitted transaction, it returns information about it. There are several cases when this might succeed:\n- transaction committed (committed round \u003e 0)\n- transaction still in the pool (committed round = 0, pool error = \"\")\n- transaction removed from pool due to error (committed round = 0, pool error != \"\")\nOr the transaction may have happened sufficiently long ago that the node no longer remembers it, and this will return an error.",
13711371
"tags": ["public", "participating"],
13721372
"produces": ["application/json", "application/msgpack"],
13731373
"schemes": ["http"],
@@ -4710,7 +4710,7 @@
47104710
"type": "string"
47114711
},
47124712
"fee": {
4713-
"description": "Fee id deprecated. It used to express the per-byte fee escalation.",
4713+
"description": "Fee is deprecated. It used to express the per-byte fee escalation.",
47144714
"type": "integer",
47154715
"x-go-type": "uint64"
47164716
},
@@ -4729,12 +4729,12 @@
47294729
"x-go-type": "basics.Round"
47304730
},
47314731
"min-fee": {
4732-
"description": "The minimum transaction fee (not per byte) required for the\ntxn to validate for the current network protocol.",
4732+
"description": "The minimum transaction fee (not per byte) required for the txn to validate for the current network protocol.",
47334733
"type": "integer",
47344734
"x-go-type": "uint64"
47354735
},
47364736
"base-fee": {
4737-
"description": "The current base transaction fee (not per byte) required for the\ntxn to validate.",
4737+
"description": "The current base transaction fee (not per byte) required for the txn to validate with the current congestion conditions.",
47384738
"type": "integer",
47394739
"x-go-type": "uint64"
47404740
}

daemon/algod/api/algod.oas3.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@
923923
"description": "TransactionParams contains the parameters that help a client construct\na new transaction.",
924924
"properties": {
925925
"base-fee": {
926-
"description": "The current base transaction fee (not per byte) required for the\ntxn to validate.",
926+
"description": "The current base transaction fee (not per byte) required for the txn to validate with the current congestion conditions.",
927927
"type": "integer",
928928
"x-go-type": "uint64"
929929
},
@@ -932,7 +932,7 @@
932932
"type": "string"
933933
},
934934
"fee": {
935-
"description": "Fee id deprecated. It used to express the per-byte fee escalation.",
935+
"description": "Fee is deprecated. It used to express the per-byte fee escalation.",
936936
"type": "integer",
937937
"x-go-type": "uint64"
938938
},
@@ -952,7 +952,7 @@
952952
"x-go-type": "basics.Round"
953953
},
954954
"min-fee": {
955-
"description": "The minimum transaction fee (not per byte) required for the\ntxn to validate for the current network protocol.",
955+
"description": "The minimum transaction fee (not per byte) required for the txn to validate for the current network protocol.",
956956
"type": "integer",
957957
"x-go-type": "uint64"
958958
}
@@ -3609,7 +3609,7 @@
36093609
},
36103610
"/v2/accounts/{address}/transactions/pending": {
36113611
"get": {
3612-
"description": "Get the list of pending transactions by address, sorted by priority, in decreasing order, truncated at the end at MAX. If MAX = 0, returns all pending transactions.\n",
3612+
"description": "Get the list of pending transactions by address, sorted by priority, in decreasing order, truncated at the end at MAX. If MAX = 0, returns all pending transactions.",
36133613
"operationId": "GetPendingTransactionsByAddress",
36143614
"parameters": [
36153615
{
@@ -7263,7 +7263,7 @@
72637263
"description": "TransactionParams contains the parameters that help a client construct\na new transaction.",
72647264
"properties": {
72657265
"base-fee": {
7266-
"description": "The current base transaction fee (not per byte) required for the\ntxn to validate.",
7266+
"description": "The current base transaction fee (not per byte) required for the txn to validate with the current congestion conditions.",
72677267
"type": "integer",
72687268
"x-go-type": "uint64"
72697269
},
@@ -7272,7 +7272,7 @@
72727272
"type": "string"
72737273
},
72747274
"fee": {
7275-
"description": "Fee id deprecated. It used to express the per-byte fee escalation.",
7275+
"description": "Fee is deprecated. It used to express the per-byte fee escalation.",
72767276
"type": "integer",
72777277
"x-go-type": "uint64"
72787278
},
@@ -7292,7 +7292,7 @@
72927292
"x-go-type": "basics.Round"
72937293
},
72947294
"min-fee": {
7295-
"description": "The minimum transaction fee (not per byte) required for the\ntxn to validate for the current network protocol.",
7295+
"description": "The minimum transaction fee (not per byte) required for the txn to validate for the current network protocol.",
72967296
"type": "integer",
72977297
"x-go-type": "uint64"
72987298
}
@@ -7355,7 +7355,7 @@
73557355
},
73567356
"/v2/transactions/pending": {
73577357
"get": {
7358-
"description": "Get the list of pending transactions, sorted by priority, in decreasing order, truncated at the end at MAX. If MAX = 0, returns all pending transactions.\n",
7358+
"description": "Get the list of pending transactions, sorted by priority, in decreasing order, truncated at the end at MAX. If MAX = 0, returns all pending transactions.",
73597359
"operationId": "GetPendingTransactions",
73607360
"parameters": [
73617361
{
@@ -7496,7 +7496,7 @@
74967496
},
74977497
"/v2/transactions/pending/{txid}": {
74987498
"get": {
7499-
"description": "Given a transaction ID of a recently submitted transaction, it returns information about it. There are several cases when this might succeed:\n- transaction committed (committed round > 0)\n- transaction still in the pool (committed round = 0, pool error = \"\")\n- transaction removed from pool due to error (committed round = 0, pool error != \"\")\nOr the transaction may have happened sufficiently long ago that the node no longer remembers it, and this will return an error.\n",
7499+
"description": "Given a transaction ID of a recently submitted transaction, it returns information about it. There are several cases when this might succeed:\n- transaction committed (committed round > 0)\n- transaction still in the pool (committed round = 0, pool error = \"\")\n- transaction removed from pool due to error (committed round = 0, pool error != \"\")\nOr the transaction may have happened sufficiently long ago that the node no longer remembers it, and this will return an error.",
75007500
"operationId": "PendingTransactionInformation",
75017501
"parameters": [
75027502
{

daemon/algod/api/server/v2/dryrun.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ func doDryrunRequest(dr *DryrunRequest, response *model.DryrunResponse) {
433433
proto := config.Consensus[protocol.ConsensusVersion(dr.ProtocolVersion)]
434434
txgroup := transactions.WrapSignedTxnsWithAD(dr.Txns)
435435
specials := transactions.SpecialAddresses{}
436-
ep := logic.NewAppEvalParams(txgroup, &proto, &specials)
436+
ep := logic.NewAppEvalParams(txgroup, &proto, &specials, basics.MicroAlgos{Raw: uint64(proto.MinTxnFee)})
437437
sep := logic.NewSigEvalParams(dr.Txns, &proto, &dl)
438438

439439
origEnableAppCostPooling := proto.EnableAppCostPooling

0 commit comments

Comments
 (0)