Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
286f209
add initial CodecV6 and daBatchV6
jonastheis Dec 27, 2024
6767845
feat: add codecv5 and codecv6 for Euclid fork
omerfirmak Jan 7, 2025
cc9561b
implement blob encoding and decoding according to new blob layout
jonastheis Jan 21, 2025
8c2a5cc
rename to CodecV7
jonastheis Jan 21, 2025
9117170
add NewDABatchFromParams
jonastheis Jan 22, 2025
4ef7bfc
add DecodeBlob to Codec
jonastheis Jan 22, 2025
bf16156
Update da.go
omerfirmak Jan 27, 2025
2817674
Update interfaces.go
omerfirmak Jan 27, 2025
7a60b34
Merge remote-tracking branch 'origin/omerfirmak/euclid' into feat/cod…
jonastheis Jan 28, 2025
64133ef
fixes after merge
jonastheis Jan 28, 2025
1dde89a
address review comments
jonastheis Jan 29, 2025
c9c1a44
add sanity checks for blob payload generation
jonastheis Jan 30, 2025
e980b3d
fix few small bugs uncovered by unit tests
jonastheis Jan 31, 2025
0e930c6
upgrade to latest l2geth version and add correct getter for CodecV7 i…
jonastheis Jan 31, 2025
5d200f3
fix linter warnings
jonastheis Jan 31, 2025
5292e3c
add unit tests
jonastheis Jan 31, 2025
3cfed43
go mod tidy
jonastheis Jan 31, 2025
eed341f
fix linter warnings
jonastheis Jan 31, 2025
be6b422
add function MessageQueueV2ApplyL1MessagesFromBlocks to compute the L…
jonastheis Feb 3, 2025
d77916b
fix lint and unit test errors
Feb 3, 2025
b71c047
call checkCompressedDataCompatibility only once -> constructBlobPaylo…
jonastheis Feb 4, 2025
cbed8b2
address review comments
jonastheis Feb 4, 2025
392b6ff
update BlobEnvelopeV7 documentation
jonastheis Feb 4, 2025
edaf5d2
add CodecV7 to general util functions
jonastheis Feb 5, 2025
894a93b
add InitialL1MessageQueueHash and LastL1MessageQueueHash to encoding.…
jonastheis Feb 5, 2025
f3271d9
Merge remote-tracking branch 'origin/main' into feat/codec-v6
jonastheis Feb 7, 2025
2611ae1
go mod tidy
jonastheis Feb 7, 2025
4d46aad
upgrade go-ethereum dependency to latest develop
jonastheis Feb 7, 2025
f4b274c
implement estimate functions
jonastheis Feb 7, 2025
3c106a2
update TestMain and run go mod tidy
Thegaram Feb 7, 2025
538036b
add NewDAChunk to CodecV7 for easier use in relayer
jonastheis Feb 9, 2025
14d07e7
Merge branch 'feat/codec-v6' of github.com:scroll-tech/da-codec into …
jonastheis Feb 9, 2025
cfb316b
add daChunkV7 type to calculate chunk hash
jonastheis Feb 9, 2025
c6ae41e
allow batch.chunks but check consistency with batch.blocks
jonastheis Feb 10, 2025
d028c53
fix off-by-one error with L1 messages
jonastheis Feb 10, 2025
8fa5e27
Fix: rolling hash implementation (#42)
roynalnaruto Feb 14, 2025
4f13363
Apply suggestions from code review
jonastheis Feb 18, 2025
bcad556
rename initialL1MessageQueueHash -> prevL1MessageQueueHash and lastL1…
jonastheis Feb 18, 2025
7522931
address review comments
jonastheis Feb 18, 2025
32f5b49
address review comments
jonastheis Feb 18, 2025
0247443
add challenge digest computation for batch
jonastheis Feb 18, 2025
2043787
remove InitialL1MessageIndex from CodecV7
jonastheis Feb 19, 2025
de09af4
address review comments
jonastheis Feb 19, 2025
f9608ed
fix tests
jonastheis Feb 19, 2025
01bd9b5
refactoring to minimize duplicate code and increase maintainability
jonastheis Feb 20, 2025
fca406c
fix nil pointer
jonastheis Feb 20, 2025
836dd1e
feat: add setcode tx support
Feb 20, 2025
5b19a27
add AccessList and AuthList
Feb 20, 2025
05c0bbc
go mod tidy
Feb 20, 2025
6ab79d4
Merge branch 'main' into feat/set-code-tx-encoding
colinlyguo Feb 21, 2025
273e28e
fix conflict fix bugs
Feb 21, 2025
4749eff
update dependency
Feb 25, 2025
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
20 changes: 19 additions & 1 deletion encoding/da.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"math/big"
"slices"

"github.com/holiman/uint256"
"github.com/klauspost/compress/zstd"
"github.com/scroll-tech/go-ethereum/crypto"

Expand Down Expand Up @@ -261,7 +262,24 @@ func convertTxDataToRLPEncoding(txData *types.TransactionData) ([]byte, error) {
S: txData.S.ToInt(),
})

default: // BlobTxType, SetCodeTxType, L1MessageTxType
case types.SetCodeTxType:
tx = types.NewTx(&types.SetCodeTx{
ChainID: uint256.MustFromBig(txData.ChainId.ToInt()),
Nonce: txData.Nonce,
To: *txData.To,
Value: uint256.MustFromBig(txData.Value.ToInt()),
Gas: txData.Gas,
GasTipCap: uint256.MustFromBig(txData.GasTipCap.ToInt()),
GasFeeCap: uint256.MustFromBig(txData.GasFeeCap.ToInt()),
Data: data,
AccessList: txData.AccessList,
AuthList: txData.AuthorizationList,
V: uint256.MustFromBig(txData.V.ToInt()),
R: uint256.MustFromBig(txData.R.ToInt()),
S: uint256.MustFromBig(txData.S.ToInt()),
})

default: // BlobTxType, L1MessageTxType
return nil, fmt.Errorf("unsupported tx type: %d", txData.Type)
}

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21

require (
github.com/agiledragon/gomonkey/v2 v2.12.0
github.com/scroll-tech/go-ethereum v1.10.14-0.20250206083728-ea43834c198f
github.com/scroll-tech/go-ethereum v1.10.14-0.20250225152658-bcfdb48dd939
github.com/stretchr/testify v1.9.0
)

Expand All @@ -18,7 +18,7 @@ require (
github.com/ethereum/c-kzg-4844/bindings/go v0.0.0-20230126171313-363c7d7593b4 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/holiman/uint256 v1.2.4
github.com/iden3/go-iden3-crypto v0.0.15 // indirect
github.com/klauspost/compress v1.17.9
github.com/kr/text v0.2.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
github.com/scroll-tech/go-ethereum v1.10.14-0.20250206083728-ea43834c198f h1:WgIRuMWa7Q/xD1LHPEbQ9PpltasNiYR04qFzatiP/R0=
github.com/scroll-tech/go-ethereum v1.10.14-0.20250206083728-ea43834c198f/go.mod h1:Ik3OBLl7cJxPC+CFyCBYNXBPek4wpdzkWehn/y5qLM8=
github.com/scroll-tech/go-ethereum v1.10.14-0.20250225152658-bcfdb48dd939 h1:KODmYD4s4BY/SBheCHqGbATnGPLQKzTJVuAElA8Eh+0=
github.com/scroll-tech/go-ethereum v1.10.14-0.20250225152658-bcfdb48dd939/go.mod h1:AgU8JJxC7+nfs7R7ma35AU7dMAGW7wCw3dRZRefIKyQ=
github.com/scroll-tech/zktrie v0.8.4 h1:UagmnZ4Z3ITCk+aUq9NQZJNAwnWl4gSxsLb2Nl7IgRE=
github.com/scroll-tech/zktrie v0.8.4/go.mod h1:XvNo7vAk8yxNyTjBDj5WIiFzYW4bx/gJ78+NK6Zn6Uk=
github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
Expand Down