From 0b791ae0f6d2ccb5913f00a613427db72abdef73 Mon Sep 17 00:00:00 2001 From: Ji Qiren Date: Sun, 17 Dec 2023 22:04:26 +0800 Subject: [PATCH] v3.11.4: hard limit tps --- CHANGELOG.md | 5 +++++ Makefile | 2 +- verifier/executor.go | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 859c1cce0..c825043a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## v3.11.4 +Sun Dec 17 22:03:09 CST 2023 + +- hard limit tps to protect system temporarily + ## v3.11.3 Sun Dec 17 21:32:41 CST 2023 diff --git a/Makefile b/Makefile index c780ff466..a51aae3b3 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ GO_INSTALL := $(GO) install PROJECT_NAME := $(shell basename "$(PWD)") BUILDER_VERSION = 3.11.0 -VERSION = 3.11.3 +VERSION = 3.11.4 COMMIT = $(shell git rev-parse --short HEAD) PROJECT = github.com/iost-official/go-iost DOCKER_IMAGE = iostio/iost-node:$(VERSION)-$(COMMIT) diff --git a/verifier/executor.go b/verifier/executor.go index 47c3f4736..26f1066fd 100644 --- a/verifier/executor.go +++ b/verifier/executor.go @@ -194,6 +194,9 @@ L: isolator.Commit() blk.Txs = append(blk.Txs, t) blk.Receipts = append(blk.Receipts, r) + if len(blk.Txs) >= 50 { + break L + } blockGasLimit -= r.GasUsage } blk.Head.Info = []byte(`{}`) // for legacy reasons. remove it in later version