diff --git a/cicd/devnet/genesis.json b/cicd/devnet/genesis.json index cdaf282409..ee67134682 100644 --- a/cicd/devnet/genesis.json +++ b/cicd/devnet/genesis.json @@ -7,7 +7,7 @@ "eip155Block": 0, "eip158Block": 0, "byzantiumBlock": 0, - "eip1559Block": 0, + "eip1559Block": 32400, "XDPoS": { "period": 2, "epoch": 900, diff --git a/common/constants.devnet.go b/common/constants.devnet.go index cb59b2b382..53467df93c 100644 --- a/common/constants.devnet.go +++ b/common/constants.devnet.go @@ -16,18 +16,18 @@ var DevnetConstant = constant{ tipXDCX: big.NewInt(0), tipXDCXLending: big.NewInt(0), tipXDCXCancellationFee: big.NewInt(0), - tipTRC21Fee: big.NewInt(13523400), + tipTRC21Fee: big.NewInt(10800), tipIncreaseMasternodes: big.NewInt(0), berlinBlock: big.NewInt(0), londonBlock: big.NewInt(0), mergeBlock: big.NewInt(0), shanghaiBlock: big.NewInt(0), - blockNumberGas50x: big.NewInt(0), + blockNumberGas50x: big.NewInt(21600), TIPV2SwitchBlock: big.NewInt(0), tipXDCXMinerDisable: big.NewInt(0), tipXDCXReceiverDisable: big.NewInt(0), - eip1559Block: big.NewInt(0), - cancunBlock: big.NewInt(1702800), + eip1559Block: big.NewInt(32400), + cancunBlock: big.NewInt(43200), tipUpgradeReward: big.NewInt(1773000), tipEpochHalving: big.NewInt(9999999999), diff --git a/common/constants.testnet.go b/common/constants.testnet.go index da65895996..80b5622123 100644 --- a/common/constants.testnet.go +++ b/common/constants.testnet.go @@ -27,7 +27,7 @@ var TestnetConstant = constant{ tipXDCXMinerDisable: big.NewInt(61290000), // Target 31st March 2024 tipXDCXReceiverDisable: big.NewInt(66825000), // Target 26 Aug 2024 eip1559Block: big.NewInt(71550000), // Target 14th Feb 2025 - cancunBlock: big.NewInt(73425600), + cancunBlock: big.NewInt(71550000), tipUpgradeReward: big.NewInt(9999999999), tipEpochHalving: big.NewInt(9999999999), diff --git a/core/types/hashing_test.go b/core/types/hashing_test.go index 302c1f3bf3..22176a1601 100644 --- a/core/types/hashing_test.go +++ b/core/types/hashing_test.go @@ -43,7 +43,7 @@ func TestEIP2718DeriveSha(t *testing.T) { }{ { rlpData: "0xb8a701f8a486796f6c6f763380843b9aca008262d4948a8eafb1cf62bfbeb1741769dae1a9dd479961928080f838f7940000000000000000000000000000000000001337e1a0000000000000000000000000000000000000000000000000000000000000000080a0775101f92dcca278a56bfe4d613428624a1ebfc3cd9e0bcc1de80c41455b9021a06c9deac205afe7b124907d4ba54a9f46161498bd3990b90d175aac12c9a40ee9", - exp: "01 b8a701f8a486796f6c6f763380843b9aca008262d4948a8eafb1cf62bfbeb1741769dae1a9dd479961928080f838f7940000000000000000000000000000000000001337e1a0000000000000000000000000000000000000000000000000000000000000000080a0775101f92dcca278a56bfe4d613428624a1ebfc3cd9e0bcc1de80c41455b9021a06c9deac205afe7b124907d4ba54a9f46161498bd3990b90d175aac12c9a40ee9\n80 b8a701f8a486796f6c6f763380843b9aca008262d4948a8eafb1cf62bfbeb1741769dae1a9dd479961928080f838f7940000000000000000000000000000000000001337e1a0000000000000000000000000000000000000000000000000000000000000000080a0775101f92dcca278a56bfe4d613428624a1ebfc3cd9e0bcc1de80c41455b9021a06c9deac205afe7b124907d4ba54a9f46161498bd3990b90d175aac12c9a40ee9\n", + exp: "01 01f8a486796f6c6f763380843b9aca008262d4948a8eafb1cf62bfbeb1741769dae1a9dd479961928080f838f7940000000000000000000000000000000000001337e1a0000000000000000000000000000000000000000000000000000000000000000080a0775101f92dcca278a56bfe4d613428624a1ebfc3cd9e0bcc1de80c41455b9021a06c9deac205afe7b124907d4ba54a9f46161498bd3990b90d175aac12c9a40ee9\n80 01f8a486796f6c6f763380843b9aca008262d4948a8eafb1cf62bfbeb1741769dae1a9dd479961928080f838f7940000000000000000000000000000000000001337e1a0000000000000000000000000000000000000000000000000000000000000000080a0775101f92dcca278a56bfe4d613428624a1ebfc3cd9e0bcc1de80c41455b9021a06c9deac205afe7b124907d4ba54a9f46161498bd3990b90d175aac12c9a40ee9\n", }, } { d := &hashToHumanReadable{} diff --git a/core/types/receipt.go b/core/types/receipt.go index 3884a14897..4eb929fa5c 100644 --- a/core/types/receipt.go +++ b/core/types/receipt.go @@ -382,11 +382,19 @@ func (rs Receipts) Len() int { return len(rs) } // EncodeIndex encodes the i'th receipt to w. func (rs Receipts) EncodeIndex(i int, w *bytes.Buffer) { r := rs[i] + data := &receiptRLP{r.statusEncoding(), r.CumulativeGasUsed, r.Bloom, r.Logs} if r.Type == LegacyTxType { - data := &receiptRLP{r.statusEncoding(), r.CumulativeGasUsed, r.Bloom, r.Logs} rlp.Encode(w, data) - } else { - rlp.Encode(w, r) + return + } + w.WriteByte(r.Type) + switch r.Type { + case AccessListTxType, DynamicFeeTxType: + rlp.Encode(w, data) + default: + // For unsupported types, write nothing. Since this is for + // DeriveSha, the error will be caught matching the derived hash + // to the block. } } diff --git a/core/types/transaction.go b/core/types/transaction.go index dd5b505224..0a6daf07fa 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -640,7 +640,7 @@ func (s Transactions) EncodeIndex(i int, w *bytes.Buffer) { if tx.Type() == LegacyTxType { rlp.Encode(w, tx.inner) } else { - rlp.Encode(w, tx) + tx.encodeTyped(w) } } diff --git a/genesis/devnet.json b/genesis/devnet.json index cdaf282409..ee67134682 100644 --- a/genesis/devnet.json +++ b/genesis/devnet.json @@ -7,7 +7,7 @@ "eip155Block": 0, "eip158Block": 0, "byzantiumBlock": 0, - "eip1559Block": 0, + "eip1559Block": 32400, "XDPoS": { "period": 2, "epoch": 900, diff --git a/params/config.go b/params/config.go index bc74e4b5e6..94aaeff9f9 100644 --- a/params/config.go +++ b/params/config.go @@ -35,7 +35,7 @@ const ( var ( MainnetGenesisHash = common.HexToHash("0x4a9d748bd78a8d0385b67788c2435dcdb914f98a96250b68863a1f8b7642d6b1") // XDC Mainnet genesis hash to enforce below configs on TestnetGenesisHash = common.HexToHash("0xbdea512b4f12ff1135ec92c00dc047ffb93890c2ea1aa0eefe9b013d80640075") // XDC Testnet genesis hash to enforce below configs on - DevnetGenesisHash = common.HexToHash("0x977c7a1b4ecbc40acc3963c1778666b62a95940a7fba6fec5867f78702835daf") // XDC Devnet genesis hash to enforce below configs on + DevnetGenesisHash = common.HexToHash("0x3c636c841ebee9121374fa76bd5480d17a23e1ba61d425dde21d7b3caba864f4") // XDC Devnet genesis hash to enforce below configs on ) var ( diff --git a/params/version.go b/params/version.go index 6dad864576..92dd888b0d 100644 --- a/params/version.go +++ b/params/version.go @@ -21,10 +21,10 @@ import ( ) const ( - VersionMajor = 2 // Major version component of the current release - VersionMinor = 4 // Minor version component of the current release - VersionPatch = 6 // Patch version component of the current release - VersionMeta = "beta1" // Version metadata to append to the version string + VersionMajor = 2 // Major version component of the current release + VersionMinor = 6 // Minor version component of the current release + VersionPatch = 1 // Patch version component of the current release + VersionMeta = "beta" // Version metadata to append to the version string ) // Version holds the textual version string.