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

Cleanup after cortina merge, reduce diff with avax #111

Merged
merged 1 commit into from
Aug 7, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
// Copyright (C) 2023-2024, Chain4Travel AG. All rights reserved.
mo-c4t marked this conversation as resolved.
Show resolved Hide resolved
//
// This file is a derived work, based on ava-labs code whose
// original notices appear below.
//
// It is distributed under the same license conditions as the
// original code from which it is derived.
//
// Much love to the original authors for their work.
// **********************************************************
// (c) 2019-2020, Ava Labs, Inc.
//
// This file is a derived work, based on the go-ethereum library whose original
Expand Down Expand Up @@ -160,6 +170,7 @@ func NewSimulatedBackendWithDatabase(database ethdb.Database, alloc core.Genesis
}
cacheConfig := &core.CacheConfig{}
blockchain, _ := core.NewBlockChain(database, cacheConfig, &genesis, dummy.NewFaker(), vm.Config{}, common.Hash{}, false)

backend := &SimulatedBackend{
database: database,
blockchain: blockchain,
Expand Down Expand Up @@ -654,6 +665,7 @@ func (b *SimulatedBackend) EstimateGas(ctx context.Context, call interfaces.Call
for lo+1 < hi {
mid := (hi + lo) / 2
failed, _, err := executable(mid)

// If the error is not nil(consensus error), it means the provided message
// call or transaction will never be accepted no matter how much gas it is
// assigned. Return the error directly, don't struggle any more
Expand Down
1 change: 0 additions & 1 deletion consensus/dummy/dynamic_fees.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ func CalcBaseFee(config *params.ChainConfig, ctrl admin.AdminController, parent
if uint64(len(parent.Extra)) != params.ApricotPhase3ExtraDataSize {
return nil, nil, fmt.Errorf("expected length of parent extra data to be %d, but found %d", params.ApricotPhase3ExtraDataSize, len(parent.Extra))
}

roll := timestamp - parent.Time

// roll the window over by the difference between the timestamps to generate
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion contracts/admin.sol → contracts/camino_admin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity ^0.8.0;

import "./access.sol";
import "./camino_access.sol";

interface IProxy {
function setImplementation(address newImplementation) external;
Expand All @@ -25,6 +25,7 @@ contract CaminoAdmin is SimpleAccessControlImpl {

uint256 internal constant KYC_APPROVED = 1 << 0;
uint256 internal constant KYC_EXPIRED = 1 << 1;
// uint256 internal constant KYB_APPROVED = 1 << 3;

// Slot2
mapping(address => uint256) private kyc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity ^0.8.0;

import "./access.sol";
import "./camino_access.sol";

interface IProxy {
function setImplementation(address newImplementation) external;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 0 additions & 10 deletions core/error.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
// Copyright (C) 2022, Chain4Travel AG. All rights reserved.
//
// This file is a derived work, based on ava-labs code whose
// original notices appear below.
//
// It is distributed under the same license conditions as the
// original code from which it is derived.
//
// Much love to the original authors for their work.
// **********************************************************
// (c) 2019-2020, Ava Labs, Inc.
//
// This file is a derived work, based on the go-ethereum library whose original
Expand Down
10 changes: 0 additions & 10 deletions core/genesis_test.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
// Copyright (C) 2022, Chain4Travel AG. All rights reserved.
//
// This file is a derived work, based on ava-labs code whose
// original notices appear below.
//
// It is distributed under the same license conditions as the
// original code from which it is derived.
//
// Much love to the original authors for their work.
// **********************************************************
// (c) 2019-2021, Ava Labs, Inc.
//
// This file is a derived work, based on the go-ethereum library whose original
Expand Down
1 change: 0 additions & 1 deletion eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ func New(
if config.AllowUnprotectedTxs {
log.Info("Unprotected transactions allowed")
}

gpoParams := config.GPO
eth.APIBackend.gpo, err = gasprice.NewOracle(eth.APIBackend, gpoParams)
if err != nil {
Expand Down
File renamed without changes.
10 changes: 10 additions & 0 deletions internal/ethapi/backend.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
// Copyright (C) 2024, Chain4Travel AG. All rights reserved.
mo-c4t marked this conversation as resolved.
Show resolved Hide resolved
//
// This file is a derived work, based on ava-labs code whose
// original notices appear below.
//
// It is distributed under the same license conditions as the
// original code from which it is derived.
//
// Much love to the original authors for their work.
// **********************************************************
// (c) 2019-2020, Ava Labs, Inc.
//
// This file is a derived work, based on the go-ethereum library whose original
Expand Down
11 changes: 10 additions & 1 deletion plugin/evm/codec.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
// Copyright (C) 2023-2024, Chain4Travel AG. All rights reserved.
mo-c4t marked this conversation as resolved.
Show resolved Hide resolved
//
// This file is a derived work, based on ava-labs code whose
// original notices appear below.
//
// It is distributed under the same license conditions as the
// original code from which it is derived.
//
// Much love to the original authors for their work.
// **********************************************************
// (c) 2019-2021, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

Expand Down Expand Up @@ -44,7 +54,6 @@ func init() {
c.RegisterCustomType(&secp256k1fx.CrossTransferOutput{}),
Codec.RegisterCodec(codecVersion, c),
)

if errs.Errored() {
panic(errs.Err)
}
Expand Down
10 changes: 0 additions & 10 deletions plugin/evm/gossiper_eth_gossiping_test.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
// Copyright (C) 2022, Chain4Travel AG. All rights reserved.
//
// This file is a derived work, based on ava-labs code whose
// original notices appear below.
//
// It is distributed under the same license conditions as the
// original code from which it is derived.
//
// Much love to the original authors for their work.
// **********************************************************
// (c) 2019-2021, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

Expand Down
1 change: 0 additions & 1 deletion plugin/evm/import_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"github.com/ava-labs/avalanchego/vms/components/avax"
"github.com/ava-labs/avalanchego/vms/components/verify"
"github.com/ava-labs/avalanchego/vms/secp256k1fx"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
)
Expand Down
10 changes: 10 additions & 0 deletions plugin/evm/service.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
// Copyright (C) 2023-2024, Chain4Travel AG. All rights reserved.
mo-c4t marked this conversation as resolved.
Show resolved Hide resolved
//
// This file is a derived work, based on ava-labs code whose
// original notices appear below.
//
// It is distributed under the same license conditions as the
// original code from which it is derived.
//
// Much love to the original authors for their work.
// **********************************************************
// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

Expand Down