Skip to content

Commit 1114f79

Browse files
authored
Rename to cdk-erigon (#20)
1 parent 38178cf commit 1114f79

File tree

14 files changed

+29
-25
lines changed

14 files changed

+29
-25
lines changed

.github/workflows/docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
env:
1010
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
1111
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
12-
IMAGE_NAME: gatewayfm/zkevm-erigon
12+
IMAGE_NAME: gatewayfm/cdk-erigon
1313
jobs:
1414
build-and-push:
1515
runs-on: ubuntu-latest

Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ COPY --from=tools-builder /app/build/bin/mdbx_stat /usr/local/bin/mdbx_stat
6161
## then give each binary its own layer
6262
COPY --from=builder /app/build/bin/devnet /usr/local/bin/devnet
6363
COPY --from=builder /app/build/bin/downloader /usr/local/bin/downloader
64-
COPY --from=builder /app/build/bin/zkevm-erigon /usr/local/bin/zkevm-erigon
64+
COPY --from=builder /app/build/bin/cdk-erigon /usr/local/bin/cdk-erigon
6565
COPY --from=builder /app/build/bin/erigon-cl /usr/local/bin/erigon-cl
6666
COPY --from=builder /app/build/bin/evm /usr/local/bin/evm
6767
COPY --from=builder /app/build/bin/hack /usr/local/bin/hack
@@ -100,8 +100,8 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
100100
org.label-schema.schema-version="1.0" \
101101
org.label-schema.url="https://torquem.ch" \
102102
org.label-schema.vcs-ref=$VCS_REF \
103-
org.label-schema.vcs-url="https://github.com/gateway-fm/zkevm-erigon.git" \
103+
org.label-schema.vcs-url="https://github.com/0xPolygonHermez/cdk-erigon.git" \
104104
org.label-schema.vendor="Torquem" \
105105
org.label-schema.version=$VERSION
106106

107-
ENTRYPOINT ["zkevm-erigon"]
107+
ENTRYPOINT ["cdk-erigon"]

Dockerfile.debian

+3-3
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ COPY --from=tools-builder /app/build/bin/mdbx_stat /usr/local/bin/mdbx_stat
6060
## then give each binary its own layer
6161
COPY --from=builder /app/build/bin/devnet /usr/local/bin/devnet
6262
COPY --from=builder /app/build/bin/downloader /usr/local/bin/downloader
63-
COPY --from=builder /app/build/bin/zkevm-erigon /usr/local/bin/zkevm-erigon
63+
COPY --from=builder /app/build/bin/cdk-erigon /usr/local/bin/cdk-erigon
6464
COPY --from=builder /app/build/bin/erigon-cl /usr/local/bin/erigon-cl
6565
COPY --from=builder /app/build/bin/evm /usr/local/bin/evm
6666
COPY --from=builder /app/build/bin/hack /usr/local/bin/hack
@@ -97,8 +97,8 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
9797
org.label-schema.schema-version="1.0" \
9898
org.label-schema.url="https://torquem.ch" \
9999
org.label-schema.vcs-ref=$VCS_REF \
100-
org.label-schema.vcs-url="https://github.com/gateway-fm/zkevm-erigon.git" \
100+
org.label-schema.vcs-url="https://github.com/0xPolygonHermez/cdk-erigon.git" \
101101
org.label-schema.vendor="Torquem" \
102102
org.label-schema.version=$VERSION
103103

104-
ENTRYPOINT ["zkevm-erigon"]
104+
ENTRYPOINT ["cdk-erigon"]

Dockerfile.release

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ RUN apk add --no-cache ca-certificates && \
55
COPY erigon /usr/local/bin/
66

77
EXPOSE 8545 8551 8546 30303 30303/udp 42069 42069/udp 8080 9090 6060
8-
ENTRYPOINT ["zkevm-erigon"]
8+
ENTRYPOINT ["cdk-erigon"]

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ dbg:
9999
@echo "Run \"$(GOBIN)/$*\" to launch $*."
100100

101101
## erigon: build erigon
102-
zkevm-erigon: go-version zkevm-erigon.cmd
102+
cdk-erigon: go-version cdk-erigon.cmd
103103
@rm -f $(GOBIN)/tg # Remove old binary to prevent confusion where users still use it because of the scripts
104104

105105
COMMANDS += devnet
@@ -125,7 +125,7 @@ COMMANDS += erigon-el
125125
$(COMMANDS): %: %.cmd
126126

127127
## all: run erigon with all commands
128-
all: zkevm-erigon $(COMMANDS)
128+
all: cdk-erigon $(COMMANDS)
129129

130130
## db-tools: build db tools
131131
db-tools:
@@ -211,7 +211,7 @@ git-submodules:
211211
@git submodule sync --quiet --recursive || true
212212
@git submodule update --quiet --init --recursive --force || true
213213

214-
PACKAGE_NAME := github.com/gateway-fm/zkevm-erigon
214+
PACKAGE_NAME := github.com/0xPolygonHermez/cdk-erigon
215215
GOLANG_CROSS_VERSION ?= v1.20.2
216216

217217
.PHONY: release-dry-run

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# zkEVM-Erigon
1+
# cdk-erigon
22

3-
zkEVM-Erigon is a fork of Erigon, currently in Alpha, optimized for syncing with the Polygon Hermez zkEVM network.
3+
cdk-erigon is a fork of Erigon, currently in Alpha, optimized for syncing with the Polygon Hermez zkEVM network.
44

55
***
66

@@ -48,7 +48,7 @@ In order to enable the zkevm_ namespace, please add 'zkevm' to the http.api flag
4848
***
4949

5050
## Configuration Files
51-
Config files are the easiest way to configure zKEVM-Erigon, there are examples in the repository for each network e.g. `hermezconfig-testnet.yaml.example`.
51+
Config files are the easiest way to configure cdk-erigon, there are examples in the repository for each network e.g. `hermezconfig-testnet.yaml.example`.
5252

5353
Depending on the RPC provider you are using, you may wish to alter `zkevm.rpc-ratelimit`.
5454

@@ -77,9 +77,9 @@ http.api : ["eth","debug","net","trace","web3","erigon", "zkevm"]
7777
***
7878
7979
## Running zKEVM Erigon
80-
- Build using `make zkevm-erigon`
80+
- Build using `make cdk-erigon`
8181
- Set up your config file (copy an example and edit as required)
82-
- run `./build/bin/zkevm-erigon --config="./hermezconfig-{network}.yaml"` (complete the name of your config file as required)
82+
- run `./build/bin/cdk-erigon --config="./hermezconfig-{network}.yaml"` (complete the name of your config file as required)
8383

8484
NB: `--externalcl` flag is removed in upstream erigon so beware of re-using commands/config
8585

File renamed without changes.

cmd/erigon-el/stages/stages.go

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ func NewStagedSync(ctx context.Context,
117117
cfg.Genesis,
118118
cfg.Sync,
119119
agg,
120+
nil,
120121
),
121122
stagedsync.StageHashStateCfg(db, dirs, cfg.HistoryV3, agg),
122123
stagedsync.StageTrieCfg(db, true, true, false, dirs.Tmp, blockReader, controlServer.Hd, cfg.HistoryV3, agg),

cmd/integration/commands/stages.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ func stageExec(db kv.RwDB, ctx context.Context) error {
765765
genesis := core.GenesisBlockByChainName(chain)
766766
cfg := stagedsync.StageExecuteBlocksCfg(db, pm, batchSize, nil, chainConfig, engine, vmConfig, nil,
767767
/*stateStream=*/ false,
768-
/*badBlockHalt=*/ false, historyV3, dirs, getBlockReader(db), nil, genesis, syncCfg, agg)
768+
/*badBlockHalt=*/ false, historyV3, dirs, getBlockReader(db), nil, genesis, syncCfg, agg, nil)
769769
if unwind > 0 {
770770
u := sync.NewUnwindState(sync_stages.Execution, s.BlockNumber-unwind, s.BlockNumber)
771771
err := stagedsync.UnwindExecutionStage(u, s, nil, ctx, cfg, true)

cmd/integration/commands/state_stages.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func syncBySmallSteps(db kv.RwDB, miningConfig params.MiningConfig, ctx context.
200200
syncCfg.ExecWorkerCount = int(workers)
201201
syncCfg.ReconWorkerCount = int(reconWorkers)
202202

203-
execCfg := stagedsync.StageExecuteBlocksCfg(db, pm, batchSize, changeSetHook, chainConfig, engine, vmConfig, changesAcc, false, false, historyV3, dirs, getBlockReader(db), nil, genesis, syncCfg, agg)
203+
execCfg := stagedsync.StageExecuteBlocksCfg(db, pm, batchSize, changeSetHook, chainConfig, engine, vmConfig, changesAcc, false, false, historyV3, dirs, getBlockReader(db), nil, genesis, syncCfg, agg, nil)
204204

205205
execUntilFunc := func(execToBlock uint64) func(firstCycle bool, badBlockUnwind bool, stageState *sync_stages.StageState, unwinder sync_stages.Unwinder, tx kv.RwTx, quiet bool) error {
206206
return func(firstCycle bool, badBlockUnwind bool, s *sync_stages.StageState, unwinder sync_stages.Unwinder, tx kv.RwTx, quiet bool) error {
@@ -533,7 +533,7 @@ func loopExec(db kv.RwDB, ctx context.Context, unwind uint64) error {
533533
initialCycle := false
534534
cfg := stagedsync.StageExecuteBlocksCfg(db, pm, batchSize, nil, chainConfig, engine, vmConfig, nil,
535535
/*stateStream=*/ false,
536-
/*badBlockHalt=*/ false, historyV3, dirs, getBlockReader(db), nil, genesis, syncCfg, agg)
536+
/*badBlockHalt=*/ false, historyV3, dirs, getBlockReader(db), nil, genesis, syncCfg, agg, nil)
537537

538538
// set block limit of execute stage
539539
sync.MockExecFunc(sync_stages.Execution, func(firstCycle bool, badBlockUnwind bool, stageState *sync_stages.StageState, unwinder sync_stages.Unwinder, tx kv.RwTx, quiet bool) error {

cmd/state/commands/erigon4.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import (
4343
"github.com/ledgerwatch/erigon/turbo/logging"
4444
"github.com/ledgerwatch/erigon/turbo/services"
4545
"github.com/ledgerwatch/erigon/turbo/snapshotsync"
46+
zktypes "github.com/ledgerwatch/erigon/zk/types"
4647
)
4748

4849
func init() {
@@ -418,7 +419,7 @@ func processBlock23(startTxNum uint64, trace bool, txNumStart uint64, rw *StateR
418419
ibs.Prepare(tx.Hash(), block.Hash(), i)
419420
ct := exec3.NewCallTracer()
420421
vmConfig.Tracer = ct
421-
receipt, _, err := core.ApplyTransaction(chainConfig, getHashFn, engine, nil, gp, ibs, ww, header, tx, usedGas, vmConfig, excessDataGas)
422+
receipt, _, err := core.ApplyTransaction(chainConfig, getHashFn, engine, nil, gp, ibs, ww, header, tx, usedGas, vmConfig, excessDataGas, zktypes.EFFECTIVE_GAS_PRICE_PERCENTAGE_DISABLED)
422423
if err != nil {
423424
return 0, nil, fmt.Errorf("could not apply tx %d [%x] failed: %w", i, tx.Hash(), err)
424425
}

cmd/state/commands/history22.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import (
3232
"github.com/ledgerwatch/erigon/eth/ethconfig"
3333
"github.com/ledgerwatch/erigon/turbo/services"
3434
"github.com/ledgerwatch/erigon/turbo/snapshotsync"
35+
zktypes "github.com/ledgerwatch/erigon/zk/types"
3536
)
3637

3738
var (
@@ -257,7 +258,7 @@ func runHistory22(trace bool, blockNum, txNumStart uint64, hw *state.HistoryRead
257258
hw.SetTxNum(txNum)
258259
ibs := state.New(hw)
259260
ibs.Prepare(tx.Hash(), block.Hash(), i)
260-
receipt, _, err := core.ApplyTransaction(chainConfig, core.GetHashFn(header, getHeader), engine, nil, gp, ibs, ww, header, tx, usedGas, vmConfig, excessDataGas)
261+
receipt, _, err := core.ApplyTransaction(chainConfig, core.GetHashFn(header, getHeader), engine, nil, gp, ibs, ww, header, tx, usedGas, vmConfig, excessDataGas, zktypes.EFFECTIVE_GAS_PRICE_PERCENTAGE_DISABLED)
261262
if err != nil {
262263
return 0, nil, fmt.Errorf("could not apply tx %d [%x] failed: %w", i, tx.Hash(), err)
263264
}

cmd/state/commands/opcode_tracer.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import (
3232
"github.com/ledgerwatch/erigon/core/systemcontracts"
3333
"github.com/ledgerwatch/erigon/core/types"
3434
"github.com/ledgerwatch/erigon/core/vm"
35+
zktypes "github.com/ledgerwatch/erigon/zk/types"
3536
)
3637

3738
var (
@@ -715,7 +716,7 @@ func runBlock(engine consensus.Engine, ibs *state.IntraBlockState, txnWriter sta
715716
rules := chainConfig.Rules(block.NumberU64(), block.Time())
716717
for i, tx := range block.Transactions() {
717718
ibs.Prepare(tx.Hash(), block.Hash(), i)
718-
receipt, _, err := core.ApplyTransaction(chainConfig, core.GetHashFn(header, getHeader), engine, nil, gp, ibs, txnWriter, header, tx, usedGas, vmConfig, excessDataGas)
719+
receipt, _, err := core.ApplyTransaction(chainConfig, core.GetHashFn(header, getHeader), engine, nil, gp, ibs, txnWriter, header, tx, usedGas, vmConfig, excessDataGas, zktypes.EFFECTIVE_GAS_PRICE_PERCENTAGE_DISABLED)
719720
if err != nil {
720721
return nil, fmt.Errorf("could not apply tx %d [%x] failed: %w", i, tx.Hash(), err)
721722
}

debug.Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ RUN mkdir -p ~/.local/share/erigon
4949
## then give each binary its own layer
5050
COPY --from=builder /app/build/bin/devnet /usr/local/bin/devnet
5151
COPY --from=builder /app/build/bin/downloader /usr/local/bin/downloader
52-
COPY --from=builder /app/build/bin/zkevm-erigon /usr/local/bin/zkevm-erigon
52+
COPY --from=builder /app/build/bin/cdk-erigon /usr/local/bin/cdk-erigon
5353
COPY --from=builder /app/build/bin/erigon-cl /usr/local/bin/erigon-cl
5454
COPY --from=builder /app/build/bin/evm /usr/local/bin/evm
5555
COPY --from=builder /app/build/bin/hack /usr/local/bin/hack
@@ -87,8 +87,8 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
8787
org.label-schema.schema-version="1.0" \
8888
org.label-schema.url="https://torquem.ch" \
8989
org.label-schema.vcs-ref=$VCS_REF \
90-
org.label-schema.vcs-url="https://github.com/gateway-fm/zkevm-erigon.git" \
90+
org.label-schema.vcs-url="https://github.com/0xPolygonHermez/cdk-erigon.git" \
9191
org.label-schema.vendor="Torquem" \
9292
org.label-schema.version=$VERSION
9393

94-
ENTRYPOINT ["zkevm-erigon"]
94+
ENTRYPOINT ["cdk-erigon"]

0 commit comments

Comments
 (0)