Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brczero rebranding #213

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ v Please also ensure that this is not a duplicate issue :)

## Version

<!-- git commit hash, output of `okbchaincli --version`, output of `okbchaind --version` -->
<!-- git commit hash, output of `brczerocli --version`, output of `brczerod --version` -->

## Steps to Reproduce

Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ mpt.db
/rocksdb/
dump.rdb
# Build
.okbchaind
.okbchaincli
.brczerod
.brczerocli
vendor*
build
tools/
Expand Down
26 changes: 13 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
- [Release Procedure](#release-procedure)
- [Point Release Procedure](#point-release-procedure)

Thank you for considering making contributions to okbchain and related
Thank you for considering making contributions to brczero and related
repositories!

Contributing to this repo can mean many things such as participated in
discussion or proposing code changes. To ensure a smooth workflow for all
contributors, the general procedure for contributing has been established:

1. Either [open](https://github.com/okx/okbchain/issues/new/choose) or
[find](https://github.com/okx/okbchain/issues) an issue you'd like to help with
1. Either [open](https://github.com/okx/brczero/issues/new/choose) or
[find](https://github.com/okx/brczero/issues) an issue you'd like to help with
2. Participate in thoughtful discussion on that issue
3. If you would like to contribute:
1. If a the issue is a proposal, ensure that the proposal has been accepted
Expand All @@ -33,7 +33,7 @@ contributors, the general procedure for contributing has been established:
to begin work
4. Follow standard Github best practices: fork the repo, branch from the
HEAD of `master`, make some commits, and submit a PR to `master`
- For core developers working within the okbchain repo, to ensure a clear
- For core developers working within the brczero repo, to ensure a clear
ownership of branches, branches must be named with the convention
`{moniker}/{issue#}-branch-name`
5. Be sure to submit the PR in `Draft` mode submit your PR early, even if
Expand All @@ -54,7 +54,7 @@ tools` for installing the linting tools.

Other notes:
- Looking for a good place to start contributing? How about checking out some
[good first issues](https://github.com/okx/okbchain/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
[good first issues](https://github.com/okx/brczero/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
- Please make sure to use `gofmt` before every commit - the easiest way to do
this is have your editor run it for you upon saving a file. Additionally
please ensure that your code is lint compliant by running `make lint`
Expand Down Expand Up @@ -92,20 +92,20 @@ If you open a PR on the Cosmos SDK, it is mandatory to update the relevant docum
## Forking

Please note that Go requires code to live under absolute paths, which complicates forking.
While my fork lives at `https://github.com/rigeyrigerige/okbchain`,
the code should never exist at `$GOPATH/src/github.com/rigeyrigerige/okbchain`.
While my fork lives at `https://github.com/rigeyrigerige/brczero`,
the code should never exist at `$GOPATH/src/github.com/rigeyrigerige/brczero`.
Instead, we use `git remote` to add the fork as a new remote for the original repo,
`$GOPATH/src/github.com/okx/okbchain `, and do all the work there.
`$GOPATH/src/github.com/okx/brczero `, and do all the work there.

For instance, to create a fork and work on a branch of it, I would:

- Create the fork on github, using the fork button.
- Go to the original repo checked out locally (i.e. `$GOPATH/src/github.com/okx/okbchain`)
- Go to the original repo checked out locally (i.e. `$GOPATH/src/github.com/okx/brczero`)
- `git remote rename origin upstream`
- `git remote add origin [email protected]:rigeyrigerige/okbchain.git`
- `git remote add origin [email protected]:rigeyrigerige/brczero.git`

Now `origin` refers to my fork and `upstream` refers to the okbchain version.
So I can `git push -u origin master` to update my fork, and make pull requests to okbchain from there.
Now `origin` refers to my fork and `upstream` refers to the brczero version.
So I can `git push -u origin master` to update my fork, and make pull requests to brczero from there.
Of course, replace `rigeyrigerige` with your git handle.

To pull in updates from the origin repo, run
Expand Down Expand Up @@ -180,7 +180,7 @@ only pull requests targeted directly against master.
- `master` must never fail `make test` or `make test_cli`
- `master` should not fail `make lint`
- no `--force` onto `master` (except when reverting a broken commit, which should seldom happen)
- create a development branch either on github.com/okx/okbchain, or your fork (using `git remote add origin`)
- create a development branch either on github.com/okx/brczero, or your fork (using `git remote add origin`)
- before submitting a pull request, begin `git rebase` on top of `master`

### Pull Merge Procedure
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Simple usage with a mounted data directory:
# > docker build -t okbchain .
# > docker run -it -p 36657:36657 -p 36656:36656 -v ~/.okbchaind:/root/.okbchaind -v ~/.okbchaincli:/root/.okbchaincli okbchain okbchaind init mynode
# > docker run -it -p 36657:36657 -p 36656:36656 -v ~/.okbchaind:/root/.okbchaind -v ~/.okbchaincli:/root/.okbchaincli okbchain okbchaind start
# > docker run -it -p 36657:36657 -p 36656:36656 -v ~/.brczerod:/root/.brczerod -v ~/.brczerocli:/root/.brczerocli okbchain brczerod init mynode
# > docker run -it -p 36657:36657 -p 36656:36656 -v ~/.brczerod:/root/.brczerod -v ~/.brczerocli:/root/.brczerocli okbchain brczerod start
FROM golang:1.20.2-alpine AS build-env

# Install minimum necessary dependencies, remove packages
Expand All @@ -27,5 +27,5 @@ WORKDIR /root
COPY --from=build-env /go/bin/okbchaind /usr/bin/okbchaind
COPY --from=build-env /go/bin/okbchaincli /usr/bin/okbchaincli

# Run okbchaind by default, omit entrypoint to ease using container with okbchaincli
# Run brczerod by default, omit entrypoint to ease using container with brczerocli
CMD ["okbchaind"]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
OKBChain
BRCZero
License: Apache2.0

Apache License
Expand Down
58 changes: 29 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Version=v0.1.7
CosmosSDK=v0.39.2
Tendermint=v0.33.9
Iavl=v0.14.3
Name=okbchain
ServerName=okbchaind
ClientName=okbchaincli
Name=brczero
ServerName=brczerod
ClientName=brczerocli

LINK_STATICALLY = false
cgo_flags=
Expand Down Expand Up @@ -72,32 +72,32 @@ endif
build_tags += $(BUILD_TAGS)
build_tags := $(strip $(build_tags))

ldflags = -X $(GithubTop)/okx/okbchain/libs/cosmos-sdk/version.Version=$(Version) \
-X $(GithubTop)/okx/okbchain/libs/cosmos-sdk/version.Name=$(Name) \
-X $(GithubTop)/okx/okbchain/libs/cosmos-sdk/version.ServerName=$(ServerName) \
-X $(GithubTop)/okx/okbchain/libs/cosmos-sdk/version.ClientName=$(ClientName) \
-X $(GithubTop)/okx/okbchain/libs/cosmos-sdk/version.Commit=$(COMMIT) \
-X $(GithubTop)/okx/okbchain/libs/cosmos-sdk/version.CosmosSDK=$(CosmosSDK) \
-X $(GithubTop)/okx/okbchain/libs/cosmos-sdk/version.Tendermint=$(Tendermint) \
-X "$(GithubTop)/okx/okbchain/libs/cosmos-sdk/version.BuildTags=$(build_tags)" \
ldflags = -X $(GithubTop)/okx/brczero/libs/cosmos-sdk/version.Version=$(Version) \
-X $(GithubTop)/okx/brczero/libs/cosmos-sdk/version.Name=$(Name) \
-X $(GithubTop)/okx/brczero/libs/cosmos-sdk/version.ServerName=$(ServerName) \
-X $(GithubTop)/okx/brczero/libs/cosmos-sdk/version.ClientName=$(ClientName) \
-X $(GithubTop)/okx/brczero/libs/cosmos-sdk/version.Commit=$(COMMIT) \
-X $(GithubTop)/okx/brczero/libs/cosmos-sdk/version.CosmosSDK=$(CosmosSDK) \
-X $(GithubTop)/okx/brczero/libs/cosmos-sdk/version.Tendermint=$(Tendermint) \
-X "$(GithubTop)/okx/brczero/libs/cosmos-sdk/version.BuildTags=$(build_tags)" \

ifeq ($(WITH_ROCKSDB),true)
ldflags += -X github.com/okx/okbchain/libs/tendermint/types.DBBackend=rocksdb
ldflags += -X github.com/okx/brczero/libs/tendermint/types.DBBackend=rocksdb
endif

ifeq ($(MAKECMDGOALS),testnet)
ldflags += -X github.com/okx/okbchain/libs/cosmos-sdk/server.ChainID=okbchaintest-195
ldflags += -X github.com/okx/brczero/libs/cosmos-sdk/server.ChainID=brczerotest-195
endif

ifeq ($(LINK_STATICALLY),true)
ldflags += -linkmode=external -extldflags "-Wl,-z,muldefs -static"
endif

ifeq ($(OKBCMALLOC),tcmalloc)
ifeq ($(BRCZEROMALLOC),tcmalloc)
ldflags += -extldflags "-ltcmalloc_minimal"
endif

ifeq ($(OKBCMALLOC),jemalloc)
ifeq ($(BRCZEROMALLOC),jemalloc)
ldflags += -extldflags "-ljemalloc"
endif

Expand All @@ -113,19 +113,19 @@ endif

all: install

install: okbchain
install: brczero


okbchain: check_version
$(cgo_flags) go install $(PGO_AUTO) -v $(BUILD_FLAGS) -tags "$(build_tags)" ./cmd/okbchaind
$(cgo_flags) go install $(PGO_AUTO) -v $(BUILD_FLAGS) -tags "$(build_tags)" ./cmd/okbchaincli
brczero: check_version
$(cgo_flags) go install $(PGO_AUTO) -v $(BUILD_FLAGS) -tags "$(build_tags)" ./cmd/brczerod
$(cgo_flags) go install $(PGO_AUTO) -v $(BUILD_FLAGS) -tags "$(build_tags)" ./cmd/brczerocli

check_version:
@sh $(shell pwd)/libs/check/check-version.sh $(GO_VERSION) $(ROCKSDB_VERSION)

mainnet: okbchain
mainnet: brczero

testnet: okbchain
testnet: brczero

test-unit:
@VERSION=$(VERSION) go test -mod=readonly -tags='ledger test_ledger_mock' ./app/...
Expand Down Expand Up @@ -159,21 +159,21 @@ go.sum: go.mod
@go mod tidy

cli:
go install -v $(BUILD_FLAGS) -tags "$(build_tags)" ./cmd/okbchaincli
go install -v $(BUILD_FLAGS) -tags "$(build_tags)" ./cmd/brczerocli

server:
go install -v $(BUILD_FLAGS) -tags "$(build_tags)" ./cmd/okbchaind
go install -v $(BUILD_FLAGS) -tags "$(build_tags)" ./cmd/brczerod

format:
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs gofmt -w -s

build:
ifeq ($(OS),Windows_NT)
go build $(PGO_AUTO) $(BUILD_FLAGS) -tags "$(build_tags)" -o build/okbchaind.exe ./cmd/okbchaind
go build $(PGO_AUTO) $(BUILD_FLAGS) -tags "$(build_tags)" -o build/okbchaincli.exe ./cmd/okbchaincli
go build $(PGO_AUTO) $(BUILD_FLAGS) -tags "$(build_tags)" -o build/brczerod.exe ./cmd/brczerod
go build $(PGO_AUTO) $(BUILD_FLAGS) -tags "$(build_tags)" -o build/brczerocli.exe ./cmd/brczerocli
else
go build $(PGO_AUTO) $(BUILD_FLAGS) -tags "$(build_tags)" -o build/okbchaind ./cmd/okbchaind
go build $(PGO_AUTO) $(BUILD_FLAGS) -tags "$(build_tags)" -o build/okbchaincli ./cmd/okbchaincli
go build $(PGO_AUTO) $(BUILD_FLAGS) -tags "$(build_tags)" -o build/brczerod ./cmd/brczerod
go build $(PGO_AUTO) $(BUILD_FLAGS) -tags "$(build_tags)" -o build/brczerocli ./cmd/brczerocli
endif


Expand Down Expand Up @@ -205,12 +205,12 @@ testibc:
build-linux:
LEDGER_ENABLED=false GOOS=linux GOARCH=amd64 $(MAKE) build

build-docker-okbchainnode:
build-docker-brczeronode:
$(MAKE) -C networks/local

# Run a 4-node testnet locally
localnet-start: localnet-stop
@if ! [ -f build/node0/okbchaind/config/genesis.json ]; then docker run --rm -v $(CURDIR)/build:/okbchaind:Z okbchain/node testnet --v 4 -o . --starting-ip-address 192.168.10.2 --keyring-backend=test ; fi
@if ! [ -f build/node0/brczerod/config/genesis.json ]; then docker run --rm -v $(CURDIR)/build:/brczerod:Z brczero/node testnet --v 4 -o . --starting-ip-address 192.168.10.2 --keyring-backend=test ; fi
docker-compose up -d

# Stop testnet
Expand Down
6 changes: 3 additions & 3 deletions app/ante/AccountBlockedVerificationDecorator.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package ante

import (
sdk "github.com/okx/okbchain/libs/cosmos-sdk/types"
sdkerrors "github.com/okx/okbchain/libs/cosmos-sdk/types/errors"
evmtypes "github.com/okx/okbchain/x/evm/types"
sdk "github.com/okx/brczero/libs/cosmos-sdk/types"
sdkerrors "github.com/okx/brczero/libs/cosmos-sdk/types/errors"
evmtypes "github.com/okx/brczero/x/evm/types"
)

// AccountBlockedVerificationDecorator check whether signer is blocked.
Expand Down
8 changes: 4 additions & 4 deletions app/ante/AccountVerificationDecorator.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package ante

import (
sdk "github.com/okx/okbchain/libs/cosmos-sdk/types"
sdkerrors "github.com/okx/okbchain/libs/cosmos-sdk/types/errors"
"github.com/okx/okbchain/libs/cosmos-sdk/x/auth"
evmtypes "github.com/okx/okbchain/x/evm/types"
sdk "github.com/okx/brczero/libs/cosmos-sdk/types"
sdkerrors "github.com/okx/brczero/libs/cosmos-sdk/types/errors"
"github.com/okx/brczero/libs/cosmos-sdk/x/auth"
evmtypes "github.com/okx/brczero/x/evm/types"
)

// AccountVerificationDecorator validates an account balance checks
Expand Down
10 changes: 5 additions & 5 deletions app/ante/EthGasConsumeDecorator.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"github.com/ethereum/go-ethereum/common"
ethcore "github.com/ethereum/go-ethereum/core"
ethtypes "github.com/ethereum/go-ethereum/core/types"
sdk "github.com/okx/okbchain/libs/cosmos-sdk/types"
sdkerrors "github.com/okx/okbchain/libs/cosmos-sdk/types/errors"
"github.com/okx/okbchain/libs/cosmos-sdk/x/auth"
"github.com/okx/okbchain/libs/cosmos-sdk/x/auth/types"
evmtypes "github.com/okx/okbchain/x/evm/types"
sdk "github.com/okx/brczero/libs/cosmos-sdk/types"
sdkerrors "github.com/okx/brczero/libs/cosmos-sdk/types/errors"
"github.com/okx/brczero/libs/cosmos-sdk/x/auth"
"github.com/okx/brczero/libs/cosmos-sdk/x/auth/types"
evmtypes "github.com/okx/brczero/x/evm/types"
)

// EthGasConsumeDecorator validates enough intrinsic gas for the transaction and
Expand Down
6 changes: 3 additions & 3 deletions app/ante/EthMempoolFeeDecorator.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package ante

import (
"fmt"
sdk "github.com/okx/okbchain/libs/cosmos-sdk/types"
sdkerrors "github.com/okx/okbchain/libs/cosmos-sdk/types/errors"
evmtypes "github.com/okx/okbchain/x/evm/types"
sdk "github.com/okx/brczero/libs/cosmos-sdk/types"
sdkerrors "github.com/okx/brczero/libs/cosmos-sdk/types/errors"
evmtypes "github.com/okx/brczero/x/evm/types"
"math/big"
"sync"
)
Expand Down
4 changes: 2 additions & 2 deletions app/ante/EthSetupContextDecorator.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package ante

import (
"fmt"
sdk "github.com/okx/okbchain/libs/cosmos-sdk/types"
sdkerrors "github.com/okx/okbchain/libs/cosmos-sdk/types/errors"
sdk "github.com/okx/brczero/libs/cosmos-sdk/types"
sdkerrors "github.com/okx/brczero/libs/cosmos-sdk/types/errors"
)

// EthSetupContextDecorator sets the infinite GasMeter in the Context and wraps
Expand Down
8 changes: 4 additions & 4 deletions app/ante/EthSigVerificationDecorator.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package ante

import (
ethermint "github.com/okx/okbchain/app/types"
sdk "github.com/okx/okbchain/libs/cosmos-sdk/types"
sdkerrors "github.com/okx/okbchain/libs/cosmos-sdk/types/errors"
evmtypes "github.com/okx/okbchain/x/evm/types"
ethermint "github.com/okx/brczero/app/types"
sdk "github.com/okx/brczero/libs/cosmos-sdk/types"
sdkerrors "github.com/okx/brczero/libs/cosmos-sdk/types/errors"
evmtypes "github.com/okx/brczero/x/evm/types"
)

// EthSigVerificationDecorator validates an ethereum signature
Expand Down
10 changes: 5 additions & 5 deletions app/ante/GasLimitDecorator.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package ante

import (
sdk "github.com/okx/okbchain/libs/cosmos-sdk/types"
sdkerrors "github.com/okx/okbchain/libs/cosmos-sdk/types/errors"
"github.com/okx/okbchain/libs/cosmos-sdk/types/innertx"
types2 "github.com/okx/okbchain/libs/tendermint/types"
evmtypes "github.com/okx/okbchain/x/evm/types"
sdk "github.com/okx/brczero/libs/cosmos-sdk/types"
sdkerrors "github.com/okx/brczero/libs/cosmos-sdk/types/errors"
"github.com/okx/brczero/libs/cosmos-sdk/types/innertx"
types2 "github.com/okx/brczero/libs/tendermint/types"
evmtypes "github.com/okx/brczero/x/evm/types"
)

// EVMKeeper defines the expected keeper interface used on the Eth AnteHandler
Expand Down
10 changes: 5 additions & 5 deletions app/ante/IncrementSeqDecorator.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package ante

import (
"github.com/okx/okbchain/libs/cosmos-sdk/baseapp"
sdk "github.com/okx/okbchain/libs/cosmos-sdk/types"
sdkerrors "github.com/okx/okbchain/libs/cosmos-sdk/types/errors"
"github.com/okx/okbchain/libs/cosmos-sdk/x/auth"
evmtypes "github.com/okx/okbchain/x/evm/types"
"github.com/okx/brczero/libs/cosmos-sdk/baseapp"
sdk "github.com/okx/brczero/libs/cosmos-sdk/types"
sdkerrors "github.com/okx/brczero/libs/cosmos-sdk/types/errors"
"github.com/okx/brczero/libs/cosmos-sdk/x/auth"
evmtypes "github.com/okx/brczero/x/evm/types"
)

// IncrementSenderSequenceDecorator increments the sequence of the signers. The
Expand Down
10 changes: 5 additions & 5 deletions app/ante/NonceVerificationDecorator.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package ante

import (
"github.com/ethereum/go-ethereum/common"
"github.com/okx/okbchain/libs/cosmos-sdk/baseapp"
sdk "github.com/okx/okbchain/libs/cosmos-sdk/types"
sdkerrors "github.com/okx/okbchain/libs/cosmos-sdk/types/errors"
"github.com/okx/okbchain/libs/cosmos-sdk/x/auth"
evmtypes "github.com/okx/okbchain/x/evm/types"
"github.com/okx/brczero/libs/cosmos-sdk/baseapp"
sdk "github.com/okx/brczero/libs/cosmos-sdk/types"
sdkerrors "github.com/okx/brczero/libs/cosmos-sdk/types/errors"
"github.com/okx/brczero/libs/cosmos-sdk/x/auth"
evmtypes "github.com/okx/brczero/x/evm/types"
)

// NonceVerificationDecorator checks that the account nonce from the transaction matches
Expand Down
Loading
Loading