mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Temporary Setup with docker
This commit is contained in:
parent
1381099eaf
commit
7a2099c8d8
4 changed files with 41 additions and 0 deletions
17
Dockerfile.dev
Normal file
17
Dockerfile.dev
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
FROM golang:1.20-alpine
|
||||
|
||||
# Set up dependencies
|
||||
# bash, jq, curl for debugging
|
||||
# git, make for installation
|
||||
# libc-dev, gcc, linux-headers, eudev-dev are used for cgo and ledger installation
|
||||
# RUN apk add bash git make libc-dev gcc linux-headers eudev-dev jq curl
|
||||
RUN apk add make curl bash
|
||||
|
||||
RUN mkdir -p $GOPATH/src/github.com/Kava-Labs/go-ethereum
|
||||
WORKDIR $GOPATH/src/github.com/Kava-Labs/go-ethereum
|
||||
|
||||
COPY . .
|
||||
RUN make geth
|
||||
RUN cp ./build/bin/geth /go/bin/
|
||||
|
||||
CMD ["geth","--dev","--http"]
|
||||
6
build-docker.sh
Executable file
6
build-docker.sh
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
docker build -t go-ethereum-dev -f Dockerfile.dev .
|
||||
|
||||
# RUN
|
||||
# docker run -it go-ethereum-dev sh
|
||||
|
|
@ -105,6 +105,7 @@ var PrecompiledContractsCancun = map[common.Address]PrecompiledContract{
|
|||
common.BytesToAddress([]byte{8}): &bn256PairingIstanbul{},
|
||||
common.BytesToAddress([]byte{9}): &blake2F{},
|
||||
common.BytesToAddress([]byte{0x0a}): &kzgPointEvaluation{},
|
||||
//common.BytesToAddress([]byte{0x0b}): &sum3{},
|
||||
}
|
||||
|
||||
// PrecompiledContractsBLS contains the set of pre-compiled Ethereum
|
||||
|
|
@ -231,6 +232,19 @@ func (c *sha256hash) Run(input []byte) ([]byte, error) {
|
|||
return h[:], nil
|
||||
}
|
||||
|
||||
type sum3 struct{}
|
||||
|
||||
// RequiredGas returns the gas required to execute the pre-compiled contract.
|
||||
//
|
||||
// This method does not require any overflow checking as the input size gas costs
|
||||
// required for anything significant is so high it's impossible to pay for.
|
||||
func (c *sum3) RequiredGas(input []byte) uint64 {
|
||||
return 1
|
||||
}
|
||||
func (c *sum3) Run(input []byte) ([]byte, error) {
|
||||
return input, nil
|
||||
}
|
||||
|
||||
// RIPEMD160 implemented as a native contract.
|
||||
type ripemd160hash struct{}
|
||||
|
||||
|
|
|
|||
4
curl.sh
Executable file
4
curl.sh
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
curl -X POST \
|
||||
--data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":83}' \
|
||||
-H "Content-Type: application/json" \
|
||||
http://localhost:8545
|
||||
Loading…
Reference in a new issue