Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ generate: deps
msgp: $(patsubst %,%/msgp_gen.go,$(MSGP_GENERATE))

api:
make -C daemon/algod/api
$(MAKE) -j7 -C daemon/algod/api
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doubles the speed of make api


logic:
make -C data/transactions/logic
$(MAKE) -C data/transactions/logic


%/msgp_gen.go: deps ALWAYS
Expand Down
586 changes: 362 additions & 224 deletions agreement/msgp_gen.go

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions agreement/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ func verifyProposer(p unauthenticatedProposal, ledger LedgerReader) error {
if err != nil {
return fmt.Errorf("failed to determine incentive eligibility %w", err)
}
if !eligible && p.ProposerPayout().Raw > 0 {
return fmt.Errorf("proposer payout (%d) for ineligible Proposer %v",
p.ProposerPayout().Raw, p.Proposer())
if !eligible && !p.ProposerPayout().IsZero() {
return fmt.Errorf("proposer payout (%s) for ineligible Proposer %v",
p.ProposerPayout(), p.Proposer())
}

var alpha crypto.Digest
Expand Down
1 change: 0 additions & 1 deletion cmd/algod/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ var startupConfigCheckFields = []string{
"OutgoingMessageFilterBucketSize",
"ProposalAssemblyTime",
"ReservedFDs",
"TxPoolExponentialIncreaseFactor",
"TxPoolSize",
"VerifiedTranscationsCacheSize",
"EnableP2P",
Expand Down
2 changes: 1 addition & 1 deletion cmd/goal/clerk.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ var sendCmd = &cobra.Command{

// ConstructPayment fills in the suggested fee when fee=0. But if the user actually used --fee=0 on the
// commandline, we ought to do what they asked (especially now that zero or low fees make sense in
// combination with other txns that cover the groups's fee.
// combination with other txns that cover the groups's fee).
explicitFee := cmd.Flags().Changed("fee")
if explicitFee {
payment.Fee = basics.MicroAlgos{Raw: fee}
Expand Down
2 changes: 1 addition & 1 deletion cmd/tealdbg/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ func (r *LocalRunner) RunAll() error {
start := time.Now()

sep := logic.NewSigEvalParams(r.txnGroup, &r.proto, &logic.NoHeaderLedger{})
aep := logic.NewAppEvalParams(txngroup, &r.proto, &transactions.SpecialAddresses{})
aep := logic.NewAppEvalParams(txngroup, &r.proto, &transactions.SpecialAddresses{}, basics.MicroAlgos{Raw: r.proto.MinTxnFee})
if r.debugger != nil {
t := logic.MakeEvalTracerDebuggerAdaptor(r.debugger)
sep.Tracer = t
Expand Down
2 changes: 1 addition & 1 deletion cmd/tealdbg/localLedger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ int 2
a.NoError(err)

proto := config.Consensus[protocol.ConsensusCurrentVersion]
ep := logic.NewAppEvalParams([]transactions.SignedTxnWithAD{{SignedTxn: txn}}, &proto, &transactions.SpecialAddresses{})
ep := logic.NewAppEvalParams([]transactions.SignedTxnWithAD{{SignedTxn: txn}}, &proto, &transactions.SpecialAddresses{}, basics.MicroAlgos{Raw: proto.MinTxnFee})
pass, delta, err := ba.StatefulEval(0, ep, appIdx, program)
a.NoError(err)
a.True(pass)
Expand Down
11 changes: 5 additions & 6 deletions config/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,6 @@ type ConsensusParams struct {
// a way of making the spender subsidize the cost of storing this transaction.
MinTxnFee uint64

// EnableFeePooling specifies that the sum of the fees in a
// group must exceed one MinTxnFee per Txn, rather than check that
// each Txn has a MinFee.
EnableFeePooling bool

Comment on lines -105 to -109
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this any more, so I removed it for clarity. It enabled strictly more permissive fee handling, so we can pretend it was always true.

// EnableAppCostPooling specifies that the sum of fees for application calls
// in a group is checked against the sum of the budget for application calls,
// rather than check each individual app call is within the budget.
Expand Down Expand Up @@ -577,6 +572,10 @@ type ConsensusParams struct {
// available. This parameters can be removed and assumed true after the
// first consensus release in which it is set true.
EnableInnerClawbackWithoutSenderHolding bool

// CongestionFees enables header values that track Load and a running
// CongestionFee that grows/shrinks when blocks are more/less than half full
CongestionFees bool
}

// ProposerPayoutRules puts several related consensus parameters in one place. The same
Expand Down Expand Up @@ -1181,7 +1180,6 @@ func initConsensusProtocols() {
// "reachability" between accounts and creatables, so we
// retain 4 x 4 as worst case.

v28.EnableFeePooling = true
v28.EnableKeyregCoherencyCheck = true

Consensus[protocol.ConsensusV28] = v28
Expand Down Expand Up @@ -1461,6 +1459,7 @@ func initConsensusProtocols() {
vFuture.ApprovedUpgrades = map[protocol.ConsensusVersion]uint64{}

vFuture.LogicSigVersion = 13 // When moving this to a release, put a new higher LogicSigVersion here
vFuture.CongestionFees = true

Consensus[protocol.ConsensusFuture] = vFuture

Expand Down
2 changes: 1 addition & 1 deletion config/localTemplate.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ type Local struct {
// FallbackDNSResolverAddress defines the fallback DNS resolver address that would be used if the system resolver would fail to retrieve SRV records.
FallbackDNSResolverAddress string `version[0]:""`

// TxPoolExponentialIncreaseFactor exponential increase factor of transaction pool's fee threshold, should always be 2 in production.
// TxPoolExponentialIncreaseFactor is deprecated and unused.
TxPoolExponentialIncreaseFactor uint64 `version[0]:"2"`

// SuggestedFeeBlockHistory is deprecated and unused.
Expand Down
21 changes: 12 additions & 9 deletions daemon/algod/api/algod.oas2.json
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@
},
"/v2/accounts/{address}/transactions/pending": {
"get": {
"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",
"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.",
"tags": ["public", "participating"],
"produces": ["application/json", "application/msgpack"],
"schemes": ["http"],
Expand Down Expand Up @@ -1323,7 +1323,7 @@
},
"/v2/transactions/pending": {
"get": {
"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",
"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.",
"tags": ["public", "participating"],
"produces": ["application/json", "application/msgpack"],
"schemes": ["http"],
Expand Down Expand Up @@ -1367,7 +1367,7 @@
},
"/v2/transactions/pending/{txid}": {
"get": {
"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",
"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.",
"tags": ["public", "participating"],
"produces": ["application/json", "application/msgpack"],
"schemes": ["http"],
Expand Down Expand Up @@ -3403,7 +3403,7 @@
"Box": {
"description": "Box name and its content.",
"type": "object",
"required": ["round","name","value"],
"required": ["round", "name", "value"],
"properties": {
"round": {
"description": "The round for which this information is relevant",
Expand All @@ -3425,9 +3425,7 @@
"BoxDescriptor": {
"description": "Box descriptor describes a Box.",
"type": "object",
"required": [
"name"
],
"required": ["name"],
"properties": {
"name": {
"description": "Base64 encoded box name",
Expand Down Expand Up @@ -4712,7 +4710,7 @@
"type": "string"
},
"fee": {
"description": "Fee is the suggested transaction fee\nFee is in units of micro-Algos per byte.\nFee may fall to zero but transactions must still have a fee of\nat least MinTxnFee for the current network protocol.",
"description": "Fee is deprecated. It used to express the per-byte fee escalation.",
"type": "integer",
"x-go-type": "uint64"
},
Expand All @@ -4731,7 +4729,12 @@
"x-go-type": "basics.Round"
},
"min-fee": {
"description": "The minimum transaction fee (not per byte) required for the\ntxn to validate for the current network protocol.",
"description": "The minimum transaction fee (not per byte) required for the txn to validate for the current network protocol.",
"type": "integer",
"x-go-type": "uint64"
},
"congestion-fee": {
"description": "The current extra fee beyond min-fee required for the txn to validate with the current congestion conditions.",
"type": "integer",
"x-go-type": "uint64"
}
Expand Down
24 changes: 17 additions & 7 deletions daemon/algod/api/algod.oas3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -922,12 +922,17 @@
"schema": {
"description": "TransactionParams contains the parameters that help a client construct\na new transaction.",
"properties": {
"congestion-fee": {
"description": "The current extra fee beyond min-fee required for the txn to validate with the current congestion conditions.",
"type": "integer",
"x-go-type": "uint64"
},
"consensus-version": {
"description": "ConsensusVersion indicates the consensus protocol version\nas of LastRound.",
"type": "string"
},
"fee": {
"description": "Fee is the suggested transaction fee\nFee is in units of micro-Algos per byte.\nFee may fall to zero but transactions must still have a fee of\nat least MinTxnFee for the current network protocol.",
"description": "Fee is deprecated. It used to express the per-byte fee escalation.",
"type": "integer",
"x-go-type": "uint64"
},
Expand All @@ -947,7 +952,7 @@
"x-go-type": "basics.Round"
},
"min-fee": {
"description": "The minimum transaction fee (not per byte) required for the\ntxn to validate for the current network protocol.",
"description": "The minimum transaction fee (not per byte) required for the txn to validate for the current network protocol.",
"type": "integer",
"x-go-type": "uint64"
}
Expand Down Expand Up @@ -3604,7 +3609,7 @@
},
"/v2/accounts/{address}/transactions/pending": {
"get": {
"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",
"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.",
"operationId": "GetPendingTransactionsByAddress",
"parameters": [
{
Expand Down Expand Up @@ -7257,12 +7262,17 @@
"schema": {
"description": "TransactionParams contains the parameters that help a client construct\na new transaction.",
"properties": {
"congestion-fee": {
"description": "The current extra fee beyond min-fee required for the txn to validate with the current congestion conditions.",
"type": "integer",
"x-go-type": "uint64"
},
"consensus-version": {
"description": "ConsensusVersion indicates the consensus protocol version\nas of LastRound.",
"type": "string"
},
"fee": {
"description": "Fee is the suggested transaction fee\nFee is in units of micro-Algos per byte.\nFee may fall to zero but transactions must still have a fee of\nat least MinTxnFee for the current network protocol.",
"description": "Fee is deprecated. It used to express the per-byte fee escalation.",
"type": "integer",
"x-go-type": "uint64"
},
Expand All @@ -7282,7 +7292,7 @@
"x-go-type": "basics.Round"
},
"min-fee": {
"description": "The minimum transaction fee (not per byte) required for the\ntxn to validate for the current network protocol.",
"description": "The minimum transaction fee (not per byte) required for the txn to validate for the current network protocol.",
"type": "integer",
"x-go-type": "uint64"
}
Expand Down Expand Up @@ -7345,7 +7355,7 @@
},
"/v2/transactions/pending": {
"get": {
"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",
"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.",
"operationId": "GetPendingTransactions",
"parameters": [
{
Expand Down Expand Up @@ -7486,7 +7496,7 @@
},
"/v2/transactions/pending/{txid}": {
"get": {
"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",
"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.",
"operationId": "PendingTransactionInformation",
"parameters": [
{
Expand Down
2 changes: 1 addition & 1 deletion daemon/algod/api/server/v2/dryrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ func doDryrunRequest(dr *DryrunRequest, response *model.DryrunResponse) {
proto := config.Consensus[protocol.ConsensusVersion(dr.ProtocolVersion)]
txgroup := transactions.WrapSignedTxnsWithAD(dr.Txns)
specials := transactions.SpecialAddresses{}
ep := logic.NewAppEvalParams(txgroup, &proto, &specials)
ep := logic.NewAppEvalParams(txgroup, &proto, &specials, basics.MicroAlgos{Raw: uint64(proto.MinTxnFee)})
sep := logic.NewSigEvalParams(dr.Txns, &proto, &dl)

origEnableAppCostPooling := proto.EnableAppCostPooling
Expand Down
Loading
Loading