Skip to content

Commit

Permalink
Cleanup after cortina merge, reduce diff with avax (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
evlekht authored Jul 25, 2024
1 parent 5468c66 commit 6ddf0fe
Show file tree
Hide file tree
Showing 23 changed files with 55 additions and 36 deletions.
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.
//
// 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 @@ -162,6 +172,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 @@ -662,6 +673,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 @@ -78,7 +78,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 @@ -258,7 +258,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/api_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
// Copyright (C) 2024, 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) 2023, Ava Labs, Inc.
//
// This file is a derived work, based on the go-ethereum library whose original
Expand Down
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.
//
// 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
File renamed without changes.
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.
//
// 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 @@ -25,7 +25,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.
//
// 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

0 comments on commit 6ddf0fe

Please sign in to comment.