Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
noumanmhd committed Oct 27, 2024
1 parent 67ea544 commit ddac19b
Show file tree
Hide file tree
Showing 343 changed files with 8,584 additions and 3,954 deletions.
22 changes: 0 additions & 22 deletions .github/CODEOWNERS

This file was deleted.

40 changes: 0 additions & 40 deletions .github/CONTRIBUTING.md

This file was deleted.

31 changes: 0 additions & 31 deletions .github/ISSUE_TEMPLATE/bug.md

This file was deleted.

17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/feature.md

This file was deleted.

9 changes: 0 additions & 9 deletions .github/ISSUE_TEMPLATE/question.md

This file was deleted.

11 changes: 0 additions & 11 deletions .github/no-response.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/stale.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/go.yml

This file was deleted.

43 changes: 18 additions & 25 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Support setting various labels on the final image
ARG COMMIT=""
ARG VERSION=""
ARG BUILDNUM=""

# Build Geth in a stock Go builder container
FROM golang:1.20-alpine as builder
FROM golang:1.21-alpine as builder

RUN apk add --no-cache gcc musl-dev linux-headers git

Expand All @@ -9,32 +14,20 @@ COPY go.sum /go-ethereum/
RUN cd /go-ethereum && go mod download

ADD . /go-ethereum
RUN cd /go-ethereum && go run build/ci.go install -static

# Pull all binaries into a second stage deploy alpine container
FROM ubuntu:latest

RUN echo 'Etc/UTC' > /etc/timezone && \
echo 'TZif2UTCTZif2UTC\nUTC0' > /etc/localtime && \
apt-get update && \
apt-get install -y ca-certificates ntp \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN cd /go-ethereum && go run build/ci.go install -static ./cmd/geth

# Pull Geth into a second stage deploy alpine container
FROM alpine:latest

COPY --from=builder /go-ethereum/build/bin/* /usr/local/bin/

RUN mkdir -p /app/ \
&& groupadd -g 1000 app \
&& useradd -r -s /bin/sh -d /app/ -u 1000 -g 1000 app \
&& chown -R app:app /app/ \
&& apt update \
&& apt install -y net-tools iputils-ping \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*
RUN apk add --no-cache ca-certificates
COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/

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

WORKDIR /app/
USER app
# Add some metadata labels to help programatic image consumption
ARG COMMIT=""
ARG VERSION=""
ARG BUILDNUM=""

EXPOSE 8545 8546 30303 30303/udp
LABEL commit="$COMMIT" version="$VERSION" buildnum="$BUILDNUM"
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,43 @@ GOBIN = ./build/bin
GO ?= latest
GORUN = go run

#? geth: Build geth
geth:
$(GORUN) build/ci.go install ./cmd/geth
@echo "Done building."
@echo "Run \"$(GOBIN)/geth\" to launch geth."

#? all: Build all packages and executables
all:
$(GORUN) build/ci.go install

#? test: Run the tests
test: all
$(GORUN) build/ci.go test

#? lint: Run certain pre-selected linters
lint: ## Run linters.
$(GORUN) build/ci.go lint

#? clean: Clean go cache, built executables, and the auto generated folder
clean:
go clean -cache
rm -fr build/_workspace/pkg/ $(GOBIN)/*

# The devtools target installs tools required for 'go generate'.
# You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'.

#? devtools: Install recommended developer tools
devtools:
env GOBIN= go install golang.org/x/tools/cmd/stringer@latest
env GOBIN= go install github.com/fjl/gencodec@latest
env GOBIN= go install github.com/golang/protobuf/protoc-gen-go@latest
env GOBIN= go install ./cmd/abigen
@type "solc" 2> /dev/null || echo 'Please install solc'
@type "protoc" 2> /dev/null || echo 'Please install protoc'

#? help: Get more info on make commands.
help: Makefile
@echo " Choose a command run in go-ethereum:"
@sed -n 's/^#?//p' $< | column -t -s ':' | sort | sed -e 's/^/ /'
.PHONY: help
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## Go Ethereum

Official Golang execution layer implementation of the Ethereum protocol.
Golang execution layer implementation of the Ethereum protocol.

[![API Reference](
https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667
https://pkg.go.dev/badge/github.com/ethereum/go-ethereum
)](https://pkg.go.dev/github.com/ethereum/go-ethereum?tab=doc)
[![Go Report Card](https://goreportcard.com/badge/github.com/ethereum/go-ethereum)](https://goreportcard.com/report/github.com/ethereum/go-ethereum)
[![Travis](https://travis-ci.com/ethereum/go-ethereum.svg?branch=master)](https://travis-ci.com/ethereum/go-ethereum)
[![Travis](https://app.travis-ci.com/ethereum/go-ethereum.svg?branch=master)](https://app.travis-ci.com/github/ethereum/go-ethereum)
[![Discord](https://img.shields.io/badge/discord-join%20chat-blue.svg)](https://discord.gg/nthXNEv)

Automated builds are available for stable releases and the unstable master branch. Binary
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
)

// The ABI holds information about a contract's context and available
// invokable methods. It will allow you to type check function calls and
// invocable methods. It will allow you to type check function calls and
// packs data accordingly.
type ABI struct {
Constructor Method
Expand Down
6 changes: 3 additions & 3 deletions accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethclient/simulated"
)

Expand All @@ -43,8 +43,8 @@ func (b *SimulatedBackend) Fork(ctx context.Context, parentHash common.Hash) err
//
// Deprecated: please use simulated.Backend from package
// github.com/ethereum/go-ethereum/ethclient/simulated instead.
func NewSimulatedBackend(alloc core.GenesisAlloc, gasLimit uint64) *SimulatedBackend {
b := simulated.New(alloc, gasLimit)
func NewSimulatedBackend(alloc types.GenesisAlloc, gasLimit uint64) *SimulatedBackend {
b := simulated.NewBackend(alloc, simulated.WithBlockGasLimit(gasLimit))
return &SimulatedBackend{
Backend: b,
Client: b.Client(),
Expand Down
Loading

0 comments on commit ddac19b

Please sign in to comment.