Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

feat(all): update client softwares based on the new protocol upgrade #185

Merged
merged 23 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3aa895c
chore: update bindings
davidtaikocha Mar 28, 2023
6e436d3
feat(proposer): update proposer using new inputs
davidtaikocha Mar 28, 2023
91584b9
feat(rpc): update rpc methods
davidtaikocha Mar 28, 2023
b09b021
feat(prover): using new inputs
davidtaikocha Mar 28, 2023
746f5fd
feat(driver): update chain syncer
davidtaikocha Mar 28, 2023
fbab357
feat: update protocol input encoding
davidtaikocha Apr 1, 2023
1a7dba1
feat(deps): upgrade go-ethereum && prysm
davidtaikocha Apr 2, 2023
8d6a31a
test(proposer): update proposer tests
davidtaikocha Apr 2, 2023
0e3d1e2
Merge branch 'main' into major-protocol-upgrade
davidtaikocha Apr 2, 2023
837baac
chore(version): bump version to 0.7.0
davidtaikocha Apr 2, 2023
1e361bf
fix(test): fix lint errors
davidtaikocha Apr 2, 2023
ac0b465
chore(ci): update workflow
davidtaikocha Apr 2, 2023
f6c23f3
chore(ci): update .golangci.yaml
davidtaikocha Apr 2, 2023
50ec13b
chore: update workflows
davidtaikocha Apr 2, 2023
d64c7d2
chore: update workflows
davidtaikocha Apr 2, 2023
98ab20d
feat: update driver
davidtaikocha Apr 3, 2023
fdbd8f7
feat(driver): updates based on new protocol upgrade
davidtaikocha Apr 3, 2023
5c6f37a
feat(prover): update prover
davidtaikocha Apr 4, 2023
b1bb248
chore: update workflows
davidtaikocha Apr 4, 2023
9f86295
chore: update workflows
davidtaikocha Apr 4, 2023
2e2ef68
chore: update workflows
davidtaikocha Apr 4, 2023
1ec20ef
chore: update workflows
davidtaikocha Apr 4, 2023
d775a93
chore: update workflows
davidtaikocha Apr 4, 2023
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
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
cache: true

- name: Lint
Expand Down Expand Up @@ -45,11 +45,15 @@ jobs:
with:
repository: taikoxyz/taiko-mono
path: ${{ env.TAIKO_MONO_DIR }}
ref: major_protocol_upgrade_rebase

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
cache: true
cache-dependency-path: ${{ env.CLIENT_DIR }}/go.sum

Expand Down Expand Up @@ -81,7 +85,7 @@ jobs:

- name: Install protocol dependencies
working-directory: ${{ env.TAIKO_MONO_DIR }}
run: cd ./packages/protocol && pnpm install && ./scripts/download_solc.sh
run: cd ./packages/protocol && pnpm install && ./script/download_solc.sh && forge install

- name: Build
working-directory: ${{ env.CLIENT_DIR }}
Expand Down
6 changes: 6 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ issues:
- path: bindings/encoding/custom_error.go
linters:
- errorlint
- path: pkg/tx_list_validator/tx_list_validator_test.go
linters:
- typecheck
- path: prover/proof_submitter/merkle_proof_test.go
linters:
- typecheck

linters:
disable-all: true
Expand Down
2 changes: 1 addition & 1 deletion bindings/.githead
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20fac4c7430c633c1b1418baf11be16ac342fb3d
f91185bbb3eb75cd8d3e36991c9a47cd51203f21
5 changes: 3 additions & 2 deletions bindings/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
var (
// Account address and private key of golden touch account, defined in protocol's LibAnchorSignature.
// ref: https://github.com/taikoxyz/taiko-mono/blob/main/packages/protocol/contracts/libs/LibAnchorSignature.sol
GoldenTouchAddress = common.HexToAddress("0x0000777735367b36bC9B61C50022d9D0700dB4Ec")
GoldenTouchPrivKey = "0x92954368afd3caa1f3ce3ead0069c1af414054aefe1ef9aeacc1bf426222ce38"
GoldenTouchAddress = common.HexToAddress("0x0000777735367b36bC9B61C50022d9D0700dB4Ec")
GoldenTouchPrivKey = "0x92954368afd3caa1f3ce3ead0069c1af414054aefe1ef9aeacc1bf426222ce38"
AnchorGasLimit uint64 = 250_000 // TODO: update this value
)
15 changes: 7 additions & 8 deletions bindings/encoding/custom_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,26 @@ import (

"github.com/ethereum/go-ethereum/common"
"github.com/stretchr/testify/require"
"github.com/taikoxyz/taiko-client/testutils"
)

type testJsonError struct{}

func (e *testJsonError) Error() string { return common.Bytes2Hex(testutils.RandomBytes(10)) }
func (e *testJsonError) Error() string { return common.Bytes2Hex(randomBytes(10)) }

func (e *testJsonError) ErrorData() interface{} { return "0xb6d363fd" }
func (e *testJsonError) ErrorData() interface{} { return "0x3b67b808" }

func TestTryParsingCustomError(t *testing.T) {
randomErr := common.Bytes2Hex(testutils.RandomBytes(10))
randomErr := common.Bytes2Hex(randomBytes(10))
require.Equal(t, randomErr, TryParsingCustomError(errors.New(randomErr)).Error())

err := TryParsingCustomError(errors.New(
// L1_COMMITTED
"VM Exception while processing transaction: reverted with an unrecognized custom error (return data: 0xb6d363fd)",
// L1_FORK_CHOICE_NOT_FOUND
"VM Exception while processing transaction: reverted with an unrecognized custom error (return data: 0x3b67b808)",
))

require.True(t, strings.HasPrefix(err.Error(), "L1_COMMITTED"))
require.True(t, strings.HasPrefix(err.Error(), "L1_FORK_CHOICE_NOT_FOUND"))

err = TryParsingCustomError(&testJsonError{})

require.True(t, strings.HasPrefix(err.Error(), "L1_COMMITTED"))
require.True(t, strings.HasPrefix(err.Error(), "L1_FORK_CHOICE_NOT_FOUND"))
}
Loading