Skip to content
Merged
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
3 changes: 1 addition & 2 deletions packages/api-http/test/fixtures/node_configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"block": {
"version": 1,
"maxPayload": 2097152,
"maxGasLimit": 10000000,
"maxTransactions": 150
"maxGasLimit": 10000000
},
"epoch": "2024-05-31T00:00:00.000Z",
"evmSpec": "Shanghai",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe<{
milestones: [
{
address: { bech32m: "ark" },
block: { maxGasLimit: 30_000_000, maxPayload: 2_097_152, maxTransactions: 150, version: 1 },
block: { maxGasLimit: 30_000_000, maxPayload: 2_097_152, version: 1 },
blockTime: 8000,
evmSpec: Contracts.Evm.SpecId.SHANGHAI,
// @ts-ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ describe<{
block: {
maxGasLimit: 1000,
maxPayload: 2000,
maxTransactions: 100,
version: 1,
},
epoch: date.toISOString().slice(0, 11) + "00:00:00.000Z",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export class MilestonesGenerator {
block: {
maxGasLimit: options.maxBlockGasLimit,
maxPayload: options.maxBlockPayload,
maxTransactions: options.maxTxPerBlock,
version: 1,
},
epoch: options.epoch.toISOString().slice(0, 11) + "00:00:00.000Z",
Expand Down
1 change: 0 additions & 1 deletion packages/contracts/source/contracts/crypto/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export type Network = {
export type MilestoneBlock = {
maxPayload: number;
maxGasLimit: number;
maxTransactions: number;
version: number;
};
export type MilestoneSatoshi = {
Expand Down
1 change: 0 additions & 1 deletion packages/core/bin/config/devnet/core/crypto.json
Original file line number Diff line number Diff line change
Expand Up @@ -2576,7 +2576,6 @@
"block": {
"maxGasLimit": 10000000,
"maxPayload": 2097152,
"maxTransactions": 150,
"version": 1
},
"epoch": "2025-06-11T00:00:00.000Z",
Expand Down
6 changes: 3 additions & 3 deletions packages/crypto-config/source/configuration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe<{
assert.equal(configManager.getMilestones(), [
{
roundValidators: 0,
block: { maxPayload: 2_097_152, maxGasLimit: 10_000_000, maxTransactions: 150, version: 1 },
block: { maxPayload: 2_097_152, maxGasLimit: 10_000_000, version: 1 },
gas: cryptoJson.milestones[0].gas,
epoch: cryptoJson.milestones[0].epoch,
evmSpec: cryptoJson.milestones[0].evmSpec,
Expand All @@ -53,7 +53,7 @@ describe<{
},
{
roundValidators: 53,
block: { maxPayload: 2_097_152, maxGasLimit: 10_000_000, maxTransactions: 150, version: 1 },
block: { maxPayload: 2_097_152, maxGasLimit: 10_000_000, version: 1 },
gas: cryptoJson.milestones[0].gas,
epoch: cryptoJson.milestones[0].epoch,
evmSpec: cryptoJson.milestones[0].evmSpec,
Expand All @@ -71,7 +71,7 @@ describe<{
},
{
roundValidators: 53,
block: { maxPayload: 2_097_152, maxGasLimit: 10_000_000, maxTransactions: 150, version: 1 },
block: { maxPayload: 2_097_152, maxGasLimit: 10_000_000, version: 1 },
gas: cryptoJson.milestones[0].gas,
epoch: cryptoJson.milestones[0].epoch,
evmSpec: cryptoJson.milestones[0].evmSpec,
Expand Down
2 changes: 0 additions & 2 deletions packages/kernel/test/stubs/config-with-crypto/crypto.json
Original file line number Diff line number Diff line change
Expand Up @@ -1824,7 +1824,6 @@
},
"block": {
"maxPayload": 2097152,
"maxTransactions": 150,
"version": 1
},
"blockTime": 8000,
Expand All @@ -1844,7 +1843,6 @@
},
"block": {
"maxPayload": 2097152,
"maxTransactions": 150,
"version": 1
},
"blockTime": 8000,
Expand Down
13 changes: 0 additions & 13 deletions packages/processor/source/verifiers/transaction-length-verifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,11 @@ export class TransactionLengthVerifier implements Contracts.Processor.Handler {
@inject(Identifiers.Application.Instance)
protected readonly app!: Contracts.Kernel.Application;

@inject(Identifiers.Cryptography.Configuration)
private readonly configuration!: Contracts.Crypto.Configuration;

public async execute(unit: Contracts.Processor.ProcessableUnit): Promise<void> {
const block = unit.getBlock();

if (block.transactions.length !== block.data.transactionsCount) {
throw new Exceptions.InvalidTransactionsLength(block);
}

if (block.data.number === this.configuration.getGenesisHeight()) {
return;
}

const maxTransactions = this.configuration.getMilestone().block.maxTransactions;

if (block.data.transactionsCount > maxTransactions) {
throw new Exceptions.MaxTransactionsExceeded(block);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ export class GetTransactionsHandler {

const candidateTransactions: Contracts.Crypto.Transaction[] = [];
for (const transaction of await this.poolQuery.getFromHighestPriority().all()) {
if (candidateTransactions.length === milestone.block.maxTransactions) {
break;
}

if (bytesLeft - 4 - transaction.serialized.length < 0) {
break;
}
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/clients/config/core/crypto.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@
"block": {
"maxGasLimit": 10000000,
"maxPayload": 2097152,
"maxTransactions": 150,
"version": 1
},
"epoch": "2025-06-11T00:00:00.000Z",
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/consensus/nodes/api-node/core/crypto.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@
"block": {
"maxGasLimit": 10000000,
"maxPayload": 2097152,
"maxTransactions": 150,
"version": 1
},
"epoch": "2025-06-11T00:00:00.000Z",
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/consensus/nodes/node0/core/crypto.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@
"block": {
"maxGasLimit": 10000000,
"maxPayload": 2097152,
"maxTransactions": 150,
"version": 1
},
"epoch": "2025-06-11T00:00:00.000Z",
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/consensus/nodes/node1/core/crypto.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@
"block": {
"maxGasLimit": 10000000,
"maxPayload": 2097152,
"maxTransactions": 150,
"version": 1
},
"epoch": "2025-06-11T00:00:00.000Z",
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/consensus/nodes/node2/core/crypto.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@
"block": {
"maxGasLimit": 10000000,
"maxPayload": 2097152,
"maxTransactions": 150,
"version": 1
},
"epoch": "2025-06-11T00:00:00.000Z",
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/consensus/nodes/node3/core/crypto.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@
"block": {
"maxGasLimit": 10000000,
"maxPayload": 2097152,
"maxTransactions": 150,
"version": 1
},
"epoch": "2025-06-11T00:00:00.000Z",
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/consensus/nodes/node4/core/crypto.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@
"block": {
"maxGasLimit": 10000000,
"maxPayload": 2097152,
"maxTransactions": 150,
"version": 1
},
"epoch": "2025-06-11T00:00:00.000Z",
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/snapshot/nodes/node0/core/crypto.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"block": {
"maxGasLimit": 10000000,
"maxPayload": 2097152,
"maxTransactions": 150,
"version": 1
},
"epoch": "2025-06-11T00:00:00.000Z",
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/snapshot/nodes/node1/core/crypto.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"block": {
"maxGasLimit": 10000000,
"maxPayload": 2097152,
"maxTransactions": 150,
"version": 1
},
"epoch": "2025-06-11T00:00:00.000Z",
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/snapshot/nodes/node2/core/crypto.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"block": {
"maxGasLimit": 10000000,
"maxPayload": 2097152,
"maxTransactions": 150,
"version": 1
},
"epoch": "2025-06-11T00:00:00.000Z",
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/snapshot/nodes/node3/core/crypto.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"block": {
"maxGasLimit": 10000000,
"maxPayload": 2097152,
"maxTransactions": 150,
"version": 1
},
"epoch": "2025-06-11T00:00:00.000Z",
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/snapshot/nodes/node4/core/crypto.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"block": {
"maxGasLimit": 10000000,
"maxPayload": 2097152,
"maxTransactions": 150,
"version": 1
},
"epoch": "2025-06-11T00:00:00.000Z",
Expand Down
1 change: 0 additions & 1 deletion tests/functional/consensus/config/crypto.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@
"block": {
"maxGasLimit": 10000000,
"maxPayload": 2097152,
"maxTransactions": 150,
"version": 1
},
"epoch": "2025-03-17T00:00:00.000Z",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2576,7 +2576,6 @@
"block": {
"maxGasLimit": 10000000,
"maxPayload": 2097152,
"maxTransactions": 150,
"version": 1
},
"epoch": "2025-06-11T00:00:00.000Z",
Expand Down
Loading