From 579a8f32f572a46e50063174b9666c78737463fa Mon Sep 17 00:00:00 2001 From: taiko-bot <160625009+taiko-kitty@users.noreply.github.com> Date: Thu, 8 Aug 2024 17:50:17 -0700 Subject: [PATCH 1/4] chore(main): release docs-site 1.11.8 (#17874) --- .release-please-manifest.json | 2 +- packages/docs-site/CHANGELOG.md | 7 +++++++ packages/docs-site/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8222357f5cc..56d53ec9409 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,6 +1,6 @@ { "packages/bridge-ui": "2.12.0", - "packages/docs-site": "1.11.7", + "packages/docs-site": "1.11.8", "packages/eventindexer": "0.13.0", "packages/fork-diff": "0.6.0", "packages/guardian-prover-health-check": "0.1.0", diff --git a/packages/docs-site/CHANGELOG.md b/packages/docs-site/CHANGELOG.md index f8e699007ee..73ea20e9a00 100644 --- a/packages/docs-site/CHANGELOG.md +++ b/packages/docs-site/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.11.8](https://github.com/taikoxyz/taiko-mono/compare/docs-site-v1.11.7...docs-site-v1.11.8) (2024-08-08) + + +### Documentation + +* **docs-site:** add more node troubleshooting ([#17872](https://github.com/taikoxyz/taiko-mono/issues/17872)) ([9c31ffc](https://github.com/taikoxyz/taiko-mono/commit/9c31ffc58b36a07286606e8e289504f49301d4df)) + ## [1.11.7](https://github.com/taikoxyz/taiko-mono/compare/docs-site-v1.11.6...docs-site-v1.11.7) (2024-07-20) diff --git a/packages/docs-site/package.json b/packages/docs-site/package.json index a98e64e3d26..4a9feefec17 100644 --- a/packages/docs-site/package.json +++ b/packages/docs-site/package.json @@ -1,7 +1,7 @@ { "name": "docs-site", "type": "module", - "version": "1.11.7", + "version": "1.11.8", "scripts": { "dev": "astro dev", "start": "astro dev", From d50eb7c1183ffbf432558807453c5c2ae0a8c8ef Mon Sep 17 00:00:00 2001 From: Daniel Wang Date: Fri, 9 Aug 2024 11:37:38 +0800 Subject: [PATCH 2/4] Update Lib1559Math.t.sol --- packages/protocol/test/L2/Lib1559Math.t.sol | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/packages/protocol/test/L2/Lib1559Math.t.sol b/packages/protocol/test/L2/Lib1559Math.t.sol index e05e9ddf104..7103f3bb84f 100644 --- a/packages/protocol/test/L2/Lib1559Math.t.sol +++ b/packages/protocol/test/L2/Lib1559Math.t.sol @@ -62,4 +62,23 @@ contract TestLib1559Math is TaikoTest { assertEq(baselineBasefee, basefee); } } + + function test_change_of_quotient_and_gips2() public { + uint64 excess = 1; + uint64 target = 60_000_000 * 8; + uint256 unit = 10_000_000; // 0.01 gwei + + // uint 0.01 gwei + uint256 baselineBasefee = Lib1559Math.basefee(excess, target) / unit; + console2.log("baseline basefee: ", baselineBasefee); + + console2.log("maintain basefee when target changes"); + uint64 newTarget = 5_000_000 * 8; + uint64 newExcess = Lib1559Math.adjustExcess(excess, target, newTarget); + uint256 basefee = Lib1559Math.basefee(newExcess, newTarget) / unit; + console2.log("old gas excess: ", excess); + console2.log("new gas excess: ", newExcess); + console2.log("basefee: ", basefee); + assertEq(baselineBasefee, basefee); + } } From 1c6aea8141d6d7ee8f456d7e11a388632efb0af8 Mon Sep 17 00:00:00 2001 From: Daniel Wang Date: Fri, 9 Aug 2024 12:06:26 +0800 Subject: [PATCH 3/4] fix bug in adjustExcess --- packages/protocol/contracts/L2/Lib1559Math.sol | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/protocol/contracts/L2/Lib1559Math.sol b/packages/protocol/contracts/L2/Lib1559Math.sol index 8c68091cae4..028c5d9004a 100644 --- a/packages/protocol/contracts/L2/Lib1559Math.sol +++ b/packages/protocol/contracts/L2/Lib1559Math.sol @@ -61,8 +61,15 @@ library Lib1559Math { int256 lnRatio = FixedPointMathLib.lnWad(int256(ratio)); // may be negative uint256 newGasExcess; + assembly { - newGasExcess := sdiv(add(mul(lnRatio, _newGasTarget), mul(ratio, _gasExcess)), f) + // x = (_newGasTarget * lnRatio + _gasExcess * ratio) + let x := add(mul(_newGasTarget, lnRatio), mul(_gasExcess, ratio)) + + // If x < 0, set newGasExcess to 0, otherwise calculate newGasExcess = x / f + switch slt(x, 0) + case 1 { newGasExcess := 0 } + default { newGasExcess := div(x, f) } } return uint64(newGasExcess.min(type(uint64).max)); From f1d3ee820f67003d7f9d10c8424069a0b83cfbb5 Mon Sep 17 00:00:00 2001 From: dantaik Date: Fri, 9 Aug 2024 04:11:26 +0000 Subject: [PATCH 4/4] forge fmt & update contract layout table --- packages/protocol/contracts/L2/TaikoL2.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/protocol/contracts/L2/TaikoL2.sol b/packages/protocol/contracts/L2/TaikoL2.sol index 9cc1ea635cb..12e4a16cffb 100644 --- a/packages/protocol/contracts/L2/TaikoL2.sol +++ b/packages/protocol/contracts/L2/TaikoL2.sol @@ -86,7 +86,8 @@ contract TaikoL2 is EssentialContract { if (block.number == 0) { // This is the case in real L2 genesis - } else if (block.number == 1) { + } + else if (block.number == 1) { // This is the case in tests uint256 parentHeight = block.number - 1; l2Hashes[parentHeight] = blockhash(parentHeight);