From c75b9964c6beadef48f2e67c762dd7bebe2d852e Mon Sep 17 00:00:00 2001 From: Austin Roberts Date: Wed, 14 Apr 2021 15:01:33 -0500 Subject: [PATCH 1/2] Add ARM builds to circleci --- .circleci/config.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 68d349e20d41..399e8b442142 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,12 +29,14 @@ jobs: - run: name: build image command: | - sudo apt install wget -y + sudo apt update + sudo apt install gcc-aarch64-linux-gnu libc6-dev-arm64-cross wget -y export GOPATH=$HOME/go export GOARCH=amd64 wget https://golang.org/dl/go1.15.5.linux-amd64.tar.gz tar -xzvf go1.15.5.linux-amd64.tar.gz - go/bin/go build ./cmd/geth + go/bin/go build -o geth-amd64 ./cmd/geth + CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOARCH=arm64 go/bin/go build -o geth-arm64 ./cmd/geth # - run: # name: build image # command: | @@ -46,7 +48,10 @@ jobs: aws-region: AWS_REGION - run: name: push to s3 - command: aws s3 cp ./geth s3://ethercattle-binaries/$CIRCLE_TAG/geth-linux-amd64 --acl=public-read + command: aws s3 cp ./geth-amd64 s3://ethercattle-binaries/$CIRCLE_TAG/geth-linux-amd64 --acl=public-read + - run: + name: push to s3 + command: aws s3 cp ./geth-arm64 s3://ethercattle-binaries/$CIRCLE_TAG/geth-linux-arm64 --acl=public-read - run: name: Message Slack command: | From da3e839065e356b6360566f0f44155a7c13f1579 Mon Sep 17 00:00:00 2001 From: Austin Roberts Date: Tue, 20 Apr 2021 11:10:24 -0500 Subject: [PATCH 2/2] Make reorg size configurable --- replica/kafka_events.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/replica/kafka_events.go b/replica/kafka_events.go index 978b12e56f6c..269ba7604b85 100644 --- a/replica/kafka_events.go +++ b/replica/kafka_events.go @@ -898,7 +898,7 @@ func (consumer *KafkaEventConsumer) Start() { } -func NewKafkaEventConsumerFromURLs(brokerURL, topic string, lastEmittedBlock common.Hash, offsets map[int32]int64, rollback int64, startingBlockNumber uint64) (EventConsumer, error) { +func NewKafkaEventConsumerFromURLs(brokerURL, topic string, lastEmittedBlock common.Hash, offsets map[int32]int64, rollback int64, startingBlockNumber uint64, finishedLimit int) (EventConsumer, error) { brokers, config := cdc.ParseKafkaURL(brokerURL) if err := cdc.CreateTopicIfDoesNotExist(brokerURL, topic, -1, nil); err != nil { return nil, err @@ -948,7 +948,7 @@ func NewKafkaEventConsumerFromURLs(brokerURL, topic string, lastEmittedBlock com finished: make(map[common.Hash]bool), oldFinished: make(map[common.Hash]bool), skipped: make(map[common.Hash]bool), - finishedLimit: 128, + finishedLimit: finishedLimit, lastEmittedBlock: lastEmittedBlock, pendingEmits: make(map[common.Hash]map[common.Hash]struct{}), pendingHashes: make(map[common.Hash]struct{}),