Skip to content
Open
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
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ updates:
schedule:
interval: "daily"
open-pull-requests-limit: 0 # Disable non-security version updates
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/graft/coreth" # Location of package manifests
schedule:
interval: "daily"
open-pull-requests-limit: 0 # Disable non-security version updates
- package-ecosystem: github-actions
directory: "/"
schedule:
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module github.com/ava-labs/avalanchego
// - go.mod (here)
// - nix/go/default.nix (update version and sha256 for supported arches)
// - tools/go.mod
// - graft/**/go.mod (e.g. coreth)
//
// - If updating between minor versions (e.g. 1.24.x -> 1.25.x):
// - Consider updating the version of golangci-lint (see tools/go.mod)
Expand Down
9 changes: 0 additions & 9 deletions graft/coreth/.dockerignore

This file was deleted.

12 changes: 0 additions & 12 deletions graft/coreth/.github/CODEOWNERS

This file was deleted.

85 changes: 0 additions & 85 deletions graft/coreth/.github/CONTRIBUTING.md

This file was deleted.

34 changes: 0 additions & 34 deletions graft/coreth/.github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

20 changes: 0 additions & 20 deletions graft/coreth/.github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

17 changes: 0 additions & 17 deletions graft/coreth/.github/dependabot.yml

This file was deleted.

10 changes: 0 additions & 10 deletions graft/coreth/.github/pull_request_template.md

This file was deleted.

72 changes: 0 additions & 72 deletions graft/coreth/.github/workflows/codeql-analysis.yml

This file was deleted.

55 changes: 0 additions & 55 deletions graft/coreth/.gitignore

This file was deleted.

36 changes: 4 additions & 32 deletions graft/coreth/README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,17 @@
# Coreth and the C-Chain

[Avalanche](https://www.avax.network/) is a network composed of multiple blockchains.
Each blockchain is an instance of a Virtual Machine (VM), much like an object in an object-oriented language is an instance of a class.
That is, the VM defines the behavior of the blockchain.
Coreth (from core Ethereum) is the [Virtual Machine (VM)](https://docs.avax.network/learn/virtual-machines) that defines the Contract Chain (C-Chain).
This chain implements the Ethereum Virtual Machine and supports Solidity smart contracts as well as most other Ethereum client functionality.
Each blockchain is an instance of a Virtual Machine (VM), much like an object in an object-oriented language is an instance of a class. That is, the VM defines the behavior of the blockchain. Coreth (from core Ethereum) is the [Virtual Machine (VM)](https://docs.avax.network/learn/virtual-machines) that defines the Contract Chain (C-Chain). This chain implements the Ethereum Virtual Machine and supports Solidity smart contracts as well as most other Ethereum client functionality.

## Building

Coreth is a dependency of AvalancheGo which is used to implement the EVM based Virtual Machine for the Avalanche C-Chain. In order to run with a local version of Coreth, users must update their Coreth dependency within AvalancheGo to point to their local Coreth directory. If Coreth and AvalancheGo are at the standard location within your GOPATH, this will look like the following:

```bash
cd $GOPATH/src/github.com/ava-labs/avalanchego
go mod edit -replace github.com/ava-labs/coreth=../coreth
```

Now that AvalancheGo depends on the local version of Coreth, we can build with the normal build script:

```bash
./scripts/build.sh
./build/avalanchego
```

Note: the C-Chain originally ran in a separate process from the main AvalancheGo process and communicated with it over a local gRPC connection. When this was the case, AvalancheGo's build script would download Coreth, compile it, and place the binary into the `avalanchego/build/plugins` directory.
Coreth is a dependency of AvalancheGo which is used to implement the EVM based Virtual Machine for the Avalanche C-Chain. In order to run with a local version of Coreth, users can simply build AvalancheGo from source.

### Optional Dev Shell

Some activities, such as collecting metrics and logs from the nodes targeted by an e2e
test run, require binary dependencies. One way of making these dependencies available is
to use a nix shell which will give access to the dependencies expected by the test
tooling:

- Install [nix](https://nixos.org/). The [determinate systems
installer](https://github.com/DeterminateSystems/nix-installer?tab=readme-ov-file#install-nix)
is recommended.
- Use `./scripts/dev_shell.sh` to start a nix shell
- Execute the dependency-requiring command (e.g. `./scripts/tests.e2e.sh --start-collectors`)
Some activities, such as collecting metrics and logs from the nodes targeted by an e2e test run, require binary dependencies. One way of making these dependencies available is to use a nix shell which will give access to the dependencies expected by the test tooling. See [flake.nix](../../flake.nix) for how to start.

This repo also defines a `.envrc` file to configure [devenv](https://direnv.net/). With
`devenv` and `nix` installed, a shell at the root of the repo will automatically start a nix
dev shell.
This repo also defines a `.envrc` file to configure [devenv](https://direnv.net/). With `devenv` and `nix` installed, a shell at the root of the repo will automatically start a nix dev shell.

## API

Expand Down
2 changes: 1 addition & 1 deletion graft/coreth/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Please refer to the [Bug Bounty Page](https://immunefi.com/bug-bounty/avalabs/in

## Supported Versions

Please use the [most recently released version](https://github.com/ava-labs/coreth/releases/latest) to perform testing and to validate security issues.
Please use the [most recently released version](https://github.com/ava-labs/avalanchego/releases/latest) to perform testing and to validate security issues.
Loading