Skip to content

Commit 8b7c056

Browse files
FletcherManfletcher.fanryanmorphl2
authored
Refactor module name(#134)
* first commit staged * refactor * miner works via pipeline * reset ccc before apply empty block * core/txpool, eth, miner: pre-filter dynamic fees during pending tx re… (#130) * refactor module name to morph * fix TestBuildBlockTimeout --------- Co-authored-by: fletcher.fan <[email protected]> Co-authored-by: Ryan He <[email protected]>
1 parent 45fb758 commit 8b7c056

File tree

895 files changed

+4304
-4580
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

895 files changed

+4304
-4580
lines changed

Dockerfile

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
ARG COMMIT=""
33
ARG VERSION=""
44
ARG BUILDNUM=""
5-
ARG SCROLL_LIB_PATH=/scroll/lib
5+
ARG MORPH_LIB_PATH=/morph/lib
66

77
# Build libzkp dependency
88
FROM scrolltech/go-rust-builder:go-1.21-rust-nightly-2023-12-03 as chef
@@ -26,14 +26,14 @@ FROM scrolltech/go-rust-builder:go-1.21-rust-nightly-2023-12-03 as builder
2626

2727
ADD . /go-ethereum
2828

29-
ARG SCROLL_LIB_PATH
29+
ARG MORPH_LIB_PATH
3030

31-
RUN mkdir -p $SCROLL_LIB_PATH
31+
RUN mkdir -p $MORPH_LIB_PATH
3232

33-
COPY --from=zkp-builder /app/target/release/libzkp.so $SCROLL_LIB_PATH
33+
COPY --from=zkp-builder /app/target/release/libzkp.so $MORPH_LIB_PATH
3434

35-
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCROLL_LIB_PATH
36-
ENV CGO_LDFLAGS="-L$SCROLL_LIB_PATH -Wl,-rpath,$SCROLL_LIB_PATH"
35+
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MORPH_LIB_PATH
36+
ENV CGO_LDFLAGS="-L$MORPH_LIB_PATH -Wl,-rpath,$MORPH_LIB_PATH"
3737

3838
RUN cd /go-ethereum && env GO111MODULE=on go run build/ci.go install -buildtags circuit_capacity_checker ./cmd/geth
3939

@@ -45,14 +45,14 @@ RUN apt-get -qq update \
4545

4646
COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/
4747

48-
ARG SCROLL_LIB_PATH
48+
ARG MORPH_LIB_PATH
4949

50-
RUN mkdir -p $SCROLL_LIB_PATH
50+
RUN mkdir -p $MORPH_LIB_PATH
5151

52-
COPY --from=zkp-builder /app/target/release/libzkp.so $SCROLL_LIB_PATH
52+
COPY --from=zkp-builder /app/target/release/libzkp.so $MORPH_LIB_PATH
5353

54-
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCROLL_LIB_PATH
55-
ENV CGO_LDFLAGS="-ldl -L$SCROLL_LIB_PATH -Wl,-rpath,$SCROLL_LIB_PATH"
54+
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MORPH_LIB_PATH
55+
ENV CGO_LDFLAGS="-ldl -L$MORPH_LIB_PATH -Wl,-rpath,$MORPH_LIB_PATH"
5656

5757
EXPOSE 8545 8546 30303 30303/udp
5858
ENTRYPOINT ["geth"]

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ image:
7979
docker build -f Dockerfile -t morph-geth:latest .
8080

8181
docker:
82-
docker build --platform linux/x86_64 -t scrolltech/l2geth:latest ./ -f Dockerfile
82+
docker build --platform linux/x86_64 -t morph/l2geth:latest ./ -f Dockerfile
8383

8484
mockccc_docker:
85-
docker build --platform linux/x86_64 -t scrolltech/l2geth:latest ./ -f Dockerfile.mockccc
85+
docker build --platform linux/x86_64 -t morph/l2geth:latest ./ -f Dockerfile.mockccc
8686

8787
mockccc_alpine_docker:
8888
docker build -t morph/l2geth:latest ./ -f Dockerfile.mockccc.alpine

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Morph Chain adapts the Go Ethereum to run as the execution layer. It starts its
1414

1515
### ZKTrie Storage
1616

17-
Another implement for storage trie, base on patricia merkle tree, has been induced. It is feasible to zk proving in the storage part. It is specified as a flag in gensis, set `config.scroll.useZktrie` to true for enabling it.
17+
Another implement for storage trie, base on patricia merkle tree, has been induced. It is feasible to zk proving in the storage part. It is specified as a flag in gensis, set `config.morph.useZktrie` to true for enabling it.
1818

1919
Notice that currently the snapshot would be disabled by the zktrie implement.
2020

SECURITY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Please see [Releases](https://github.com/morph-l2/go-ethereum/releases). We reco
66

77
## Audit reports
88

9-
Audit reports are published in the `docs` folder: https://github.com/morph-l2/go-ethereum/tree/master/docs/audits
9+
Audit reports are published in the `docs` folder: https://github.com/morph-l2/go-ethereum/tree/main/docs/audits
1010

1111
| Scope | Date | Report Link |
1212
| ------- | ------- | ----------- |

accounts/abi/abi.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import (
2323
"fmt"
2424
"io"
2525

26-
"github.com/scroll-tech/go-ethereum/common"
27-
"github.com/scroll-tech/go-ethereum/crypto"
26+
"github.com/morph-l2/go-ethereum/common"
27+
"github.com/morph-l2/go-ethereum/crypto"
2828
)
2929

3030
// The ABI holds information about a contract's context and available

accounts/abi/abi_test.go

+23-17
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ import (
2626
"strings"
2727
"testing"
2828

29-
"github.com/scroll-tech/go-ethereum/common"
30-
"github.com/scroll-tech/go-ethereum/common/math"
31-
"github.com/scroll-tech/go-ethereum/crypto"
29+
"github.com/morph-l2/go-ethereum/common"
30+
"github.com/morph-l2/go-ethereum/common/math"
31+
"github.com/morph-l2/go-ethereum/crypto"
3232
)
3333

3434
const jsondata = `
@@ -165,8 +165,9 @@ func TestInvalidABI(t *testing.T) {
165165

166166
// TestConstructor tests a constructor function.
167167
// The test is based on the following contract:
168-
// contract TestConstructor {
169-
// constructor(uint256 a, uint256 b) public{}
168+
//
169+
// contract TestConstructor {
170+
// constructor(uint256 a, uint256 b) public{}
170171
// }
171172
func TestConstructor(t *testing.T) {
172173
json := `[{ "inputs": [{"internalType": "uint256","name": "a","type": "uint256" },{ "internalType": "uint256","name": "b","type": "uint256"}],"stateMutability": "nonpayable","type": "constructor"}]`
@@ -724,16 +725,19 @@ func TestBareEvents(t *testing.T) {
724725
}
725726

726727
// TestUnpackEvent is based on this contract:
727-
// contract T {
728-
// event received(address sender, uint amount, bytes memo);
729-
// event receivedAddr(address sender);
730-
// function receive(bytes memo) external payable {
731-
// received(msg.sender, msg.value, memo);
732-
// receivedAddr(msg.sender);
733-
// }
734-
// }
728+
//
729+
// contract T {
730+
// event received(address sender, uint amount, bytes memo);
731+
// event receivedAddr(address sender);
732+
// function receive(bytes memo) external payable {
733+
// received(msg.sender, msg.value, memo);
734+
// receivedAddr(msg.sender);
735+
// }
736+
// }
737+
//
735738
// When receive("X") is called with sender 0x00... and value 1, it produces this tx receipt:
736-
// receipt{status=1 cgas=23949 bloom=00000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000040200000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 logs=[log: b6818c8064f645cd82d99b59a1a267d6d61117ef [75fd880d39c1daf53b6547ab6cb59451fc6452d27caa90e5b6649dd8293b9eed] 000000000000000000000000376c47978271565f56deb45495afa69e59c16ab200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000158 9ae378b6d4409eada347a5dc0c180f186cb62dc68fcc0f043425eb917335aa28 0 95d429d309bb9d753954195fe2d69bd140b4ae731b9b5b605c34323de162cf00 0]}
739+
//
740+
// receipt{status=1 cgas=23949 bloom=00000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000040200000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 logs=[log: b6818c8064f645cd82d99b59a1a267d6d61117ef [75fd880d39c1daf53b6547ab6cb59451fc6452d27caa90e5b6649dd8293b9eed] 000000000000000000000000376c47978271565f56deb45495afa69e59c16ab200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000158 9ae378b6d4409eada347a5dc0c180f186cb62dc68fcc0f043425eb917335aa28 0 95d429d309bb9d753954195fe2d69bd140b4ae731b9b5b605c34323de162cf00 0]}
737741
func TestUnpackEvent(t *testing.T) {
738742
const abiJSON = `[{"constant":false,"inputs":[{"name":"memo","type":"bytes"}],"name":"receive","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"sender","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"memo","type":"bytes"}],"name":"received","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"sender","type":"address"}],"name":"receivedAddr","type":"event"}]`
739743
abi, err := JSON(strings.NewReader(abiJSON))
@@ -1080,8 +1084,9 @@ func TestDoubleDuplicateMethodNames(t *testing.T) {
10801084
// TestDoubleDuplicateEventNames checks that if send0 already exists, there won't be a name
10811085
// conflict and that the second send event will be renamed send1.
10821086
// The test runs the abi of the following contract.
1083-
// contract DuplicateEvent {
1084-
// event send(uint256 a);
1087+
//
1088+
// contract DuplicateEvent {
1089+
// event send(uint256 a);
10851090
// event send0();
10861091
// event send();
10871092
// }
@@ -1108,7 +1113,8 @@ func TestDoubleDuplicateEventNames(t *testing.T) {
11081113
// TestUnnamedEventParam checks that an event with unnamed parameters is
11091114
// correctly handled.
11101115
// The test runs the abi of the following contract.
1111-
// contract TestEvent {
1116+
//
1117+
// contract TestEvent {
11121118
// event send(uint256, uint256);
11131119
// }
11141120
func TestUnnamedEventParam(t *testing.T) {

accounts/abi/bind/auth.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ import (
2424
"io/ioutil"
2525
"math/big"
2626

27-
"github.com/scroll-tech/go-ethereum/accounts"
28-
"github.com/scroll-tech/go-ethereum/accounts/external"
29-
"github.com/scroll-tech/go-ethereum/accounts/keystore"
30-
"github.com/scroll-tech/go-ethereum/common"
31-
"github.com/scroll-tech/go-ethereum/core/types"
32-
"github.com/scroll-tech/go-ethereum/crypto"
33-
"github.com/scroll-tech/go-ethereum/log"
27+
"github.com/morph-l2/go-ethereum/accounts"
28+
"github.com/morph-l2/go-ethereum/accounts/external"
29+
"github.com/morph-l2/go-ethereum/accounts/keystore"
30+
"github.com/morph-l2/go-ethereum/common"
31+
"github.com/morph-l2/go-ethereum/core/types"
32+
"github.com/morph-l2/go-ethereum/crypto"
33+
"github.com/morph-l2/go-ethereum/log"
3434
)
3535

3636
// ErrNoChainID is returned whenever the user failed to specify a chain id.

accounts/abi/bind/backend.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ import (
2121
"errors"
2222
"math/big"
2323

24-
"github.com/scroll-tech/go-ethereum"
25-
"github.com/scroll-tech/go-ethereum/common"
26-
"github.com/scroll-tech/go-ethereum/core/types"
24+
"github.com/morph-l2/go-ethereum"
25+
"github.com/morph-l2/go-ethereum/common"
26+
"github.com/morph-l2/go-ethereum/core/types"
2727
)
2828

2929
var (

accounts/abi/bind/backends/simulated.go

+21-21
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,27 @@ import (
2424
"sync"
2525
"time"
2626

27-
"github.com/scroll-tech/go-ethereum"
28-
"github.com/scroll-tech/go-ethereum/accounts/abi"
29-
"github.com/scroll-tech/go-ethereum/accounts/abi/bind"
30-
"github.com/scroll-tech/go-ethereum/common"
31-
"github.com/scroll-tech/go-ethereum/common/hexutil"
32-
"github.com/scroll-tech/go-ethereum/common/math"
33-
"github.com/scroll-tech/go-ethereum/consensus"
34-
"github.com/scroll-tech/go-ethereum/consensus/ethash"
35-
"github.com/scroll-tech/go-ethereum/core"
36-
"github.com/scroll-tech/go-ethereum/core/bloombits"
37-
"github.com/scroll-tech/go-ethereum/core/rawdb"
38-
"github.com/scroll-tech/go-ethereum/core/state"
39-
"github.com/scroll-tech/go-ethereum/core/types"
40-
"github.com/scroll-tech/go-ethereum/core/vm"
41-
"github.com/scroll-tech/go-ethereum/eth/filters"
42-
"github.com/scroll-tech/go-ethereum/ethdb"
43-
"github.com/scroll-tech/go-ethereum/event"
44-
"github.com/scroll-tech/go-ethereum/log"
45-
"github.com/scroll-tech/go-ethereum/params"
46-
"github.com/scroll-tech/go-ethereum/rollup/fees"
47-
"github.com/scroll-tech/go-ethereum/rpc"
27+
"github.com/morph-l2/go-ethereum"
28+
"github.com/morph-l2/go-ethereum/accounts/abi"
29+
"github.com/morph-l2/go-ethereum/accounts/abi/bind"
30+
"github.com/morph-l2/go-ethereum/common"
31+
"github.com/morph-l2/go-ethereum/common/hexutil"
32+
"github.com/morph-l2/go-ethereum/common/math"
33+
"github.com/morph-l2/go-ethereum/consensus"
34+
"github.com/morph-l2/go-ethereum/consensus/ethash"
35+
"github.com/morph-l2/go-ethereum/core"
36+
"github.com/morph-l2/go-ethereum/core/bloombits"
37+
"github.com/morph-l2/go-ethereum/core/rawdb"
38+
"github.com/morph-l2/go-ethereum/core/state"
39+
"github.com/morph-l2/go-ethereum/core/types"
40+
"github.com/morph-l2/go-ethereum/core/vm"
41+
"github.com/morph-l2/go-ethereum/eth/filters"
42+
"github.com/morph-l2/go-ethereum/ethdb"
43+
"github.com/morph-l2/go-ethereum/event"
44+
"github.com/morph-l2/go-ethereum/log"
45+
"github.com/morph-l2/go-ethereum/params"
46+
"github.com/morph-l2/go-ethereum/rollup/fees"
47+
"github.com/morph-l2/go-ethereum/rpc"
4848
)
4949

5050
// This nil assignment ensures at compile time that SimulatedBackend implements bind.ContractBackend.

0 commit comments

Comments
 (0)