Avalanche: a network composed of multiple blockchains

Related tags

Cryptography coreth
Overview

Coreth and the C-Chain

Avalanche 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) 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

The C-Chain runs in a separate process from the main AvalancheGo process and communicates with it over a local gRPC connection. AvalancheGo's build script downloads Coreth, compiles it, and places the binary into the avalanchego/build/plugins directory.

API

The C-Chain supports the following API namespaces:

  • eth
  • personal
  • txpool
  • debug

Only the eth namespace is enabled by default. To enable the other namespaces see the instructions for passing in the coreth-config parameter to AvalancheGo: https://docs.avax.network/build/references/command-line-interface#plugins. Full documentation for the C-Chain's API can be found here.

Compatibility

The C-Chain is compatible with almost all Ethereum tooling, including Remix, Metamask and Truffle.

Differences Between Avalanche C-Chain and Ethereum

Atomic Transactions

As a network composed of multiple blockchains, Avalanche uses atomic transactions to move assets between chains. Coreth modifies the Ethereum block format by adding an ExtraData field, which contains the atomic transactions.

Avalanche Native Tokens (ANTs)

The C-Chain supports Avalanche Native Tokens, which are created on the X-Chain using precompiled contracts. These precompiled contracts nativeAssetCall and nativeAssetBalance support the same interface for ANTs as CALL and BALANCE do for AVAX with the added parameter of assetID to specify the asset.

For the full documentation of precompiles for interacting with ANTs and using them in ARC-20s, see here.

Block Timing

Blocks are produced asynchronously in Snowman Consensus, so the timing assumptions that apply to Ethereum do not apply to Coreth. To support block production in an async environment, a block is permitted to have the same timestamp as its parent. Since there is no general assumption that a block will be produced every 10 seconds, smart contracts built on Avalanche should use the block timestamp instead of the block number for their timing assumptions.

A block with a timestamp more than 10 seconds in the future will not be considered valid. However, a block with a timestamp more than 10 seconds in the past will still be considered valid as long as its timestamp is greater than or equal to the timestamp of its parent block.

Comments
  • upgrading geth to support Istanbul

    upgrading geth to support Istanbul

    The Istanbul release of Ethereum from last December had a number of important changes, including a new opcode (chainid) that is used by our contracts for layer 2 fork protection (though the net gas metering change is also really important for a lot of contracts now, and the adjustments to the various other costs make some use cases much more viable, including zkp and rollups). Is there any hope of getting geth upgraded to a newer version? (I am not a Go developer myself, but it looks like you might not have made any real extensive changes to geth, other than to systematically change the all of import paths to your GitHub organization?)

    https://medium.com/mycrypto/ethereums-istanbul-fork-technical-explanation-48a3aef718b0

    enhancement 
    opened by saurik 11
  • gas price should be set with some kind of market algorithm

    gas price should be set with some kind of market algorithm

    (I was asked by @danlaine to bring this issue, which I noted a few days ago and which has been coming up occasionally both from myself and from someone else I don't know who was looking at the economics of running their DEX on Avalanche, from Discord to GitHub.)

    The gas price on the various Avalanche EVM chains (C-chain, Athereum, etc.) is hardcoded; and I see #39, but in addition to only applying to other subnets, this is still just letting the subnet select a different genesis-hardcoded price, not resulting in a change of model. What makes this extremely problematic is that it means the transaction price of your network is thereby tied to your token price's volatility--which could fluctuate based on things like speculation and news/political cycles--as opposed to being any reasonable indicator of the cost of computation or bandwidth. In contrast, on Ethereum, if the price of ETH doubles, the cost of gas should quickly halve. With Avalanche, if the price of AVAX doubles, so does the cost of using the network, which has literally meant that I'm rooting for the value of the token to crash and stay depressed, so that the network is more usable... "awkward" ;P.

    To provide what is hopefully a useless example of the kind of discussion surrounding this, I work on a project (Orchid) that sells bandwidth, and having this hardcoded gas price concept would be akin to the naive assumption many people seem to have about our product: that bandwidth costs are somehow fixed in OXT at like, 1 OXT / GB, and so people then ask us "how will the volatility of your token affect the viability of payments" and the answer is "it won't, as this is all based on market economics: if the token goes up the price of bandwidth as measured in that token will go down, as in some real sense the price of bandwidth is fundamentally measured in something like the price of bread and other staples; the amount of value from the user required to get bandwidth should only change if the price of networking in the world changes". Only, for Avalanche, this naive model is in fact how it works and is in fact going to be a problem.

    As this value is currently hardcoded at 470 (a very recent change from 47 in https://github.com/ava-labs/coreth/commit/dd6b0315849e2383e715e9c0ade50aaca68435f0), the price of transactions on Avalanche are only 1/14.5th the cost of Ethereum right now; and it must be noted that the spread is actually only this high because the value of AVAX has been falling... if the value of AVAX were still closer to $6 (as it was for a while right after launch) the cost would be only around 1/9th. If the value of your token (awkwardly, "heaven forbid") goes up, that means that the usefulness of it over Ethereum will actually decline--and possibly quite quickly--if anyone deploys anything important that actually uses it (as opposed to merely encouraging people to start staking and running validators before you even have users, which is what you have been doing ;P).

    I mean, already, the prices of Avalanche are kind of ridiculous for a system claiming to be so much fundamentally more economically viable than Ethereum, as while <10x is still better than nothing--and I appreciate that a key property of Avalanche is that it will (supposedly) scale to a lot more users and keep that same price--the price of Ethereum is and was already way too high for a lot of people, so merely being more scalable but not actually being drastically cheaper is, at least in the short term, kind of a massive let down: there are numerous other systems out there that have been in production longer with real users and which are also Ethereum compatible but which are offering prices that are already 10-100x lower than Avalanche, and that's with so-far zero usage of Avalanche (as the C-chain hasn't actually launched yet) and a falling token price.

    FWIW, EIP-1559 has a mechanism proposed for Ethereum which is in many ways similar to the gas model used by Avalanche, which has people burning their fees rather than paying it to miners. In it, Vitalik et al discuss a model of shifting this fee based on the "percentage of the previous block" that is used. Now, I appreciate that Avalanche doesn't have blocks that work like this, but if you re-model gas target as "gas used per time" instead of "gas used per block" then you can probably use very a very similar algorithm to the one from EIP-1559 to auto-calibrate your gas price over time. (Not saying this is what you should do; I'm actually more a fan of the recently-released EIP-2593, which happens to be almost identical to the solution we had come up with for our layer 2 nanopayments--interestingly, ours is also in terms of time, while theirs is in terms of blocks ;P--but the current hardcoded concept and specific value are both unreasonable/concerning).

    https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md

    opened by saurik 8
  • How to use local build of coreth in avalanchego?

    How to use local build of coreth in avalanchego?

    I've downloaded and built avalanchego and coreth. I'm having trouble figuring out how to get avalanchego to use my local build of coreth - I've searched the avalanche docs and the docs for the two repos but haven't found instructions.

    How do I get a local build of avalanchego to use a local build of coreth? Do I have to place the coreth binary under avalanchego/build/plugins? If so, does the binary need to have a specific name?

    opened by paymog 6
  • `backends.SimulatedBackend` doesn't implement `ethclient.Client` interface

    `backends.SimulatedBackend` doesn't implement `ethclient.Client` interface

    backends.SimulatedBackend doesn't implement ethclient.Client interface

    To Reproduce:

    var _ ethclient.Client = (*backends.SimulatedBackend)(nil)
    

    Expected behavior No compiler error.

    bug 
    opened by kare 5
  • eth_gasPrice crash

    eth_gasPrice crash

    Using the default settings, eth_gasPrice crashes with the following trace

    ERROR[12-10|16:40:35.051] RPC method eth_gasPrice crashed: runtime error: invalid memory address or nil pointer dereference
    goroutine 139 [running]:
    github.com/ava-labs/coreth/rpc.(*callback).call.func1(0xc0015e0790, 0xc, 0xc001565cc0)
            /home/ubuntu/install/avalanche/go/pkg/mod/github.com/ava-labs/[email protected]/rpc/service.go:210 +0xbd
    panic(0xf3c840, 0x18b2c00)
            /home/ubuntu/install/go1.16.8/src/runtime/panic.go:965 +0x1b9
    math/big.(*Int).Cmp(0xc0015a2300, 0x0, 0xc001636440)
            /home/ubuntu/install/go1.16.8/src/math/big/int.go:328 +0x44
    github.com/ethereum/go-ethereum/common/math.BigMin(...)
            /home/ubuntu/install/avalanche/go/pkg/mod/github.com/ethereum/[email protected]/common/math/big.go:148
    github.com/ava-labs/coreth/eth/gasprice.(*Oracle).SuggestPrice(0xc00014c6c0, 0x1327c78, 0xc001636440, 0xc0012d58d0, 0x4c6e8b, 0xf6ba80)
            /home/ubuntu/install/avalanche/go/pkg/mod/github.com/ava-labs/[email protected]/eth/gasprice/gasprice.go:224 +0x1d1
    github.com/ava-labs/coreth/eth.(*EthAPIBackend).SuggestPrice(0xc001480558, 0x1327c78, 0xc001636440, 0x30, 0x7f11b380d5b8, 0x30)
            /home/ubuntu/install/avalanche/go/pkg/mod/github.com/ava-labs/[email protected]/eth/api_backend.go:357 +0x45
    github.com/ava-labs/coreth/internal/ethapi.(*PublicEthereumAPI).GasPrice(0xc0010fe910, 0x1327c78, 0xc001636440, 0x0, 0x0, 0x0)
            /home/ubuntu/install/avalanche/go/pkg/mod/github.com/ava-labs/[email protected]/internal/ethapi/api.go:71 +0x4e
    reflect.Value.call(0xc0014fe2a0, 0xc00009f850, 0x13, 0x1082042, 0x4, 0xc001654b70, 0x2, 0x2, 0xc0012d5b58, 0x46a08c, ...)
            /home/ubuntu/install/go1.16.8/src/reflect/value.go:476 +0x8e7
    reflect.Value.Call(0xc0014fe2a0, 0xc00009f850, 0x13, 0xc001654b70, 0x2, 0x2, 0x1312100, 0xc000032080, 0xc002420000)
            /home/ubuntu/install/go1.16.8/src/reflect/value.go:337 +0xb9
    github.com/ava-labs/coreth/rpc.(*callback).call(0xc0014fe420, 0x1327c78, 0xc001636440, 0xc0015e0790, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
            /home/ubuntu/install/avalanche/go/pkg/mod/github.com/ava-labs/[email protected]/rpc/service.go:216 +0x2c5
    github.com/ava-labs/coreth/rpc.(*handler).runMethod(0xc00055e640, 0x1327c78, 0xc001636440, 0xc0004f7260, 0xc0014fe420, 0x0, 0x0, 0x0, 0x0)
            /home/ubuntu/install/avalanche/go/pkg/mod/github.com/ava-labs/[email protected]/rpc/handler.go:486 +0x8a
    github.com/ava-labs/coreth/rpc.(*handler).handleCall(0xc00055e640, 0xc0015eb680, 0xc0004f7260, 0x1000000426d9b)
            /home/ubuntu/install/avalanche/go/pkg/mod/github.com/ava-labs/[email protected]/rpc/handler.go:434 +0x265
    github.com/ava-labs/coreth/rpc.(*handler).handleCallMsg(0xc00055e640, 0xc0015eb680, 0xc0004f7260, 0xc0015eb680)
            /home/ubuntu/install/avalanche/go/pkg/mod/github.com/ava-labs/[email protected]/rpc/handler.go:395 +0x212
    github.com/ava-labs/coreth/rpc.(*handler).handleMsg.func1(0xc0015eb680)
            /home/ubuntu/install/avalanche/go/pkg/mod/github.com/ava-labs/[email protected]/rpc/handler.go:167 +0x46
    github.com/ava-labs/coreth/rpc.(*handler).startCallProc.func1()
            /home/ubuntu/install/avalanche/go/pkg/mod/github.com/ava-labs/[email protected]/rpc/handler.go:307 +0x1e2
    created by github.com/ava-labs/coreth/rpc.(*handler).startCallProc
            /home/ubuntu/install/avalanche/go/pkg/mod/github.com/ava-labs/[email protected]/rpc/handler.go:311 +0xa5
    
    WARN [12-10|16:40:35.051] Served eth_gasPrice                      reqid=1 execTime="165.863µs" procTime="166.486µs" totalTime="166.77µs" err="method handler crashed"
    
    opened by lebdron 4
  • `no preimage found for hash` error when making `debug_getModifiedAccountsByNumber` call

    `no preimage found for hash` error when making `debug_getModifiedAccountsByNumber` call

    Issue

    I am unable to call debug_getModifiedAccountsByNumber. The response is always

    {
        "jsonrpc": "2.0",
        "id": 1,
        "error": {
            "code": -32000,
            "message": "no preimage found for hash 5a9331cb1d584bc0703e5252f4fccf19b3887d5a12e7edad074d585640a7ff57"
        }
    }
    

    Likely related to commit 5095d5b45a74781949329e120b7a9fb934438bc0

    +       Preimages bool // Whether to store preimage of trie key to the disk
    

    Version

    # avalanchego --version
    avalanche/1.4.12 [database=v1.4.5, commit=cae93d95c1bcdc02e1370d38ed1c9d87f1c8c814]
    

    Steps to Reproduce

    See: https://github.com/stevekunk/avalanche-testnet#issue-no-preimage-found-for-hash

    You should be able to docker-compose up and then ./curls/debug_getModifiedAccountsByNumber.sh to reproduce the issue

    opened by stevekunk 4
  • Broken functionality

    Broken functionality

    Version: v0.4.2

    NewLevelDBDatabaseWithFreezer
    

    is broken. It initialises function

    leveldb.New(file, cache, handles, namespace)
    

    but it expects

    leveldb.New(file, cache, handles, namespace, false) // 5th parameter is missing
    

    and in NewDatabaseWithCache

    return &cachingDB{
    		db:            trie.NewDatabaseWithCache(db, cache, journal),
    		codeSizeCache: csc,
    		codeCache:     fastcache.New(codeCacheSize),
    	}
    

    trie.NewDatabaseWithCache is missing

    opened by s4kibs4mi 4
  • eth_gasPrice starts correctly but goes to 0

    eth_gasPrice starts correctly but goes to 0

    Our gas limit logic fails because eth_gasPrice goes from its initial 225000000000 down to 0 after a block is produced, but the pool gas tip cap stays at 225000000000. The local test logic multiplies the supposed gas price by 2 and gets 0, which in the following transaction results in transaction underpriced: address 0x3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0 have gas tip cap (0) \u003c pool gas tip cap (225000000000). I added on a commit to https://github.com/AaronKutch/avalanchego_block_bug to exhibit this, run with bash run.sh. The logs have

    INFO [07-07|01:12:34.021] <C Chain> github.com/ava-labs/coreth/internal/ethapi/api.go:1745: Submitted transaction hash=0x1f9e4098f9a4717a9352b401ed1c220d56aba742fba319feeeff5771f49d9504 from=0x3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0 nonce=0 recipient=0x798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc value=1 type=0 gasFeeCap=321,000,000,000 gasTipCap=321,000,000,000 gasPrice=321,000,000,000
    INFO [07-07|01:12:34.031] <C Chain> github.com/ava-labs/coreth/internal/ethapi/api.go:1745: Submitted transaction hash=0x33fc41add96dba33bfd645c8fb473a649a6767c01437ea48a87e9b2d29277053 from=0x3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0 nonce=1 recipient=0x798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc value=1 type=0 gasFeeCap=321,000,000,000 gasTipCap=321,000,000,000 gasPrice=321,000,000,000
    INFO [07-07|01:12:37.023] <C Chain> github.com/ava-labs/coreth/miner/worker.go:343: Commit new mining work number=1 hash=3d5189..ef3b83 uncles=0 txs=2 gas=42000 fees=0.013482 elapsed="362.313µs"
    [07-07|01:12:37.023] INFO <C Chain> proposervm/pre_fork_block.go:163 built block U1JLTWLesCiRAKd9BL4waz2pmTSDK4eHXE4JtkiGxTBj5Mv2R - parent timestamp 1970-01-01 00:00:00 +0000 UTC
    WARN [07-07|01:12:41.042] <C Chain> github.com/ava-labs/coreth/rpc/handler.go:404: Served eth_sendRawTransaction conn=127.0.0.1:33074 reqid=0 execTime="479.554µs" procTime="505.093µs" totalTime="505.433µs" err="transaction underpriced: address 0x3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0 have gas tip cap (0) < pool gas tip cap (225000000000)"
    

    and the curl responses are

    {"jsonrpc":"2.0","id":0,"result":"0x34630b8a00"} // gas price
    {"jsonrpc":"2.0","id":0,"result":"0x1f9e4098f9a4717a9352b401ed1c220d56aba742fba319feeeff5771f49d9504"}
    {"jsonrpc":"2.0","id":0,"result":"0x34630b8a00"}
    {"jsonrpc":"2.0","id":0,"result":"0x33fc41add96dba33bfd645c8fb473a649a6767c01437ea48a87e9b2d29277053"}
    {"jsonrpc":"2.0","id":0,"result":"0x0"} // gas price is now zero after a block has been processed
    {"jsonrpc":"2.0","id":0,"error":{"code":-32000,"message":"transaction underpriced: address 0x3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0 have gas tip cap (0) \u003c pool gas tip cap (225000000000)"}}
    
    bug 
    opened by AaronKutch 3
  • Where exactly in the Avalanche codebase does the gRPC communication happen with EVM?

    Where exactly in the Avalanche codebase does the gRPC communication happen with EVM?

    The C-Chain runs in a separate process from the main AvalancheGo process and communicates with it over a local gRPC connection.

    Where exactly in the Avalanche codebase does the gRPC communication happen between Avalanche and EVM?

    opened by githubgitlabuser 3
  • EADDRINUSE

    EADDRINUSE

    Basically i was spamming the network with transactions and a few hundred of them were processed successfully but then suddenly that error start pop up and i had to restart the node. (edited) It's a random error, I'm having 2 more machines next to me running without any issues for couple hours already (edited)

    9/15/2020, 10:35:36 AM error: Send transaction error : {"reason":"missing response","code":"SERVER_ERROR","requestBody":"{\"method\":\"eth_getTransactionReceipt\",\"params\":[\"0x7fcef903203585d6e3386539ab083724b1177acc7bd77366d5aa36b9770f5a87\"],\"id\":34151,\"jsonrpc\":\"2.0\"}","requestMethod":"POST","serverError":{"errno":"EADDRINUSE","code":"EADDRINUSE","syscall":"connect","address":"127.0.0.1","port":9650},"url":"http://127.0.0.1:9650/ext/bc/C/rpc"}

    opened by AndonMitev 3
  • Blocks not being produced for transactions

    Blocks not being produced for transactions

    I have a repro here https://github.com/AaronKutch/avalanchego_block_bug . Run bash run.sh. What this does is start avalanchego with a genesis file that prefunds a 0xBf... account, and I want to make a transaction to send some of the funds fo a 0xb3 account. The log file has as its last line

    INFO [06-29|03:59:07.594] <C Chain> github.com/ava-labs/coreth/internal/ethapi/api.go:1745: Submitted transaction hash=0xc0ea83c5c1b2ba2b2d1ae9d3748b87625044acd4f562ae79bf02f49f77e0a763 from=0xBf660843528035a5A4921534E156a27e64B231fE nonce=0 recipient=0xb3d82b1367D362DE99aB59A658165AFf520CBd4d value=10,000,000,000,000,000,000,000,000 type=0 gasFeeCap=30,000,000,000 gasTipCap=30,000,000,000 gasPrice=30,000,000,000
    

    I expect that a block should be produced almost immediately to include the transaction, but the chain just sits there. After 20 seconds we check the account funds and block number and see that nothing has changed. Strangely, I do get blocks if contracts are submitted.

    bug 
    opened by AaronKutch 2
  • Bump github.com/urfave/cli/v2 from 2.10.2 to 2.23.6

    Bump github.com/urfave/cli/v2 from 2.10.2 to 2.23.6

    Bumps github.com/urfave/cli/v2 from 2.10.2 to 2.23.6.

    Release notes

    Sourced from github.com/urfave/cli/v2's releases.

    v2.23.6

    What's Changed

    Full Changelog: https://github.com/urfave/cli/compare/v2.23.5...v2.23.6

    v2.23.5

    What's Changed

    New Contributors

    Full Changelog: https://github.com/urfave/cli/compare/v2.23.4...v2.23.5

    v2.23.4

    What's Changed

    Full Changelog: https://github.com/urfave/cli/compare/v2.23.3...v2.23.4

    v2.23.3

    What's Changed

    New Contributors

    Full Changelog: https://github.com/urfave/cli/compare/v2.23.2...v2.23.3

    Note. This is considered a minor release even though it has a new "feature" i.e support for int64slice for alstrc flags. The int64slice is verbatim copy of existing code and doesnt include any new behaviour compared to other altsrc flags.

    v2.23.2

    What's Changed

    Full Changelog: https://github.com/urfave/cli/compare/v2.23.1...v2.23.2

    v2.23.1

    What's Changed

    ... (truncated)

    Commits
    • f9652e3 Merge pull request #1608 from dearchap/issue_1591
    • ab2bf3c Fix:(issue_1591) Use AppHelpTemplate instead of SubCommandHelpTemplate
    • 5f57616 Merge pull request #1588 from feedmeapples/disable-slice-flag-separator
    • 9b0812c Update godoc v2 spacing
    • ceb75a1 godoc
    • 377947f replace test hardcode with defaultSliceFlagSeparator
    • 0f8707a Allow disabling SliceFlag separator altogether
    • 600ef6e Merge pull request #1573 from urfave/v2-deps-up
    • e045d5a Merge branch 'v2-maint' into v2-deps-up
    • 107796a Merge pull request #1574 from urfave/v2-gha
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump github.com/hashicorp/go-bexpr from 0.1.10 to 0.1.11

    Bump github.com/hashicorp/go-bexpr from 0.1.10 to 0.1.11

    Bumps github.com/hashicorp/go-bexpr from 0.1.10 to 0.1.11.

    Commits
    • 9ef6478 Merge pull request #24 from hashicorp/feature/unknownval
    • 46883af WithUnknownValue to treat unknown values as a non-error
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump github.com/google/uuid from 1.2.0 to 1.3.0

    Bump github.com/google/uuid from 1.2.0 to 1.3.0

    Bumps github.com/google/uuid from 1.2.0 to 1.3.0.

    Release notes

    Sourced from github.com/google/uuid's releases.

    Add randomness pool mode for V4 UUID and NullUUID for SQL Scanners.

    From Andrey Pechkurov:

    Adds an optional randomness pool mode for Random (Version 4) UUID generation. The pool contains random bytes read from the random number generator on demand in batches. Enabling the pool may improve the UUID generation throughput significantly.

    Since the pool is stored on the Go heap, this feature may be a bad fit for security sensitive applications. That's why it's implemented as an opt-in feature.

    From Samuel Roth:

    Added support for NullUUID

    A NullUUID can be marked not valid (i.e., null) for use with JSON and the database/sql/driver.Scanner interfaces.

    Commits
    • 44b5fee Minor cleanup.
    • e28eb7b Remove TestConformance from null_test.go. It was useful to demonstrate
    • ae25fc6 feat(uuid): Added support for NullUUID (#76)
    • 655bf50 Add randomness pool mode for V4 UUID (#80)
    • 512b657 feat: add public matcher function for custom error type invalidLengthError (#78)
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump github.com/cespare/cp from 0.1.0 to 1.1.1

    Bump github.com/cespare/cp from 0.1.0 to 1.1.1

    Bumps github.com/cespare/cp from 0.1.0 to 1.1.1.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump github.com/tyler-smith/go-bip39 from 1.0.2 to 1.1.0

    Bump github.com/tyler-smith/go-bip39 from 1.0.2 to 1.1.0

    Bumps github.com/tyler-smith/go-bip39 from 1.0.2 to 1.1.0.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • deps: update uuid from v1.1.5 to v1.3.0

    deps: update uuid from v1.1.5 to v1.3.0

    Hi there!

    Coreth uses outdated version of github.com/google/uuid, which causes conflicts with other dependencies which depends on new uuid version. This PR updates github.com/google/uuid dependency from v1.1.5 to v1.3.0

    opened by g4s8 1
Releases(v0.11.4)
  • v0.11.4(Dec 7, 2022)

    v0.11.4

    • Add config option to perform database inspection on startup
    • Add configurable transaction indexing to reduce disk usage
    • Add special case to allow transactions using Nick's Method to bypass API level replay protection
    • Add counter metrics for number of accepted/processed logs
    • Improve header and logs caching using maximum accepted depth cache
    Source code(tar.gz)
    Source code(zip)
  • v0.11.3(Nov 18, 2022)

    v0.11.3

    • Add counter for number of processed and accepted transactions
    • Wait for state sync goroutines to complete on shutdown
    • Bump go-ethereum dependency to v1.10.26
    • Increase soft cap on transaction size limits
    • Add back isForkIncompatible checks for all existing forks
    • Clean up Apricot Phase 6 code
    Source code(tar.gz)
    Source code(zip)
  • v0.11.2(Nov 7, 2022)

    v0.11.2

    • Add trie clean cache journaling to disk to improve processing time on restart
    • Fix regression where snapshot could be marked as stale by async acceptor during block processing
    • Add fine-grained block processing metrics
    Source code(tar.gz)
    Source code(zip)
  • v0.11.1(Oct 28, 2022)

    • Add cache size config parameters for trie-clean-cache, trie-dirty-cache, trie-dirty-commit-target, and snapshot-cache
    • Increase default trie-clean-cache size from 256 MB to 512 MB
    • Increase default snapshot-cache size from 128 MB to 256 MB
    • Add optional flag to skip chain config upgrade check on startup (allows VM to start after missing a network upgrade)
    • Make Avalanche blockchainID (separate from EVM ChainID) available within the EVM
    • Record block height when performing state sync
    • Add support for VM-to-VM messaging
    • Move eth_getChainConfig under the BlockChainAPI
    • Remove block builder timer logic to rely on ProposerVM to meter block production
    Source code(tar.gz)
    Source code(zip)
  • v0.11.0(Oct 6, 2022)

    v0.11.0

    • Update Chain Config compatibility check to compare against last accepted block timestamp
    • Bump go-ethereum dependency to v1.10.25
    • Add Banff activation times for Mainnet and Fuji for October 18 4pm UTC and October 3 2pm UTC respectively
    • Banff cleanup
    Source code(tar.gz)
    Source code(zip)
  • v0.10.0(Sep 22, 2022)

  • v0.9.0(Sep 13, 2022)

  • v0.8.16(Aug 19, 2022)

    v0.8.16

    • Fix bug in codeToFetch database accessors that caused an error when starting/stopping state sync
    • Bump go-ethereum version to v1.10.21
    • Update gas price estimation to limit lookback window based on block timestamps
    • Add metrics for processed/accepted gas
    • Simplify syntactic block verification
    • Ensure statedb errors during block processing are logged
    • Remove deprecated gossiper/block building logic from pre-Apricot Phase 4
    • Add marshal function for duration to improve config output
    Source code(tar.gz)
    Source code(zip)
  • v0.8.15(Aug 10, 2022)

    v0.8.15

    • Add optional JSON logging
    • Bump minimum go version to v1.18.1
    • Add interface for suppporting stateful precompiles
    • Remove legacy code format from the database
    • Enable expensive metrics by default
    • Fix atomic trie sync bug that could result in storing incorrect metadata
    • Update state sync metrics to use counter for number of items received
    Source code(tar.gz)
    Source code(zip)
  • v0.8.14(Jul 25, 2022)

    v0.8.14

    • Bump go-ethereum dependency to v1.10.20
    • Update API names used to enable services in eth-api config flag. Prior names are supported but deprecated, please update your configuration accordingly
    • Optimizes state sync by parallelizing trie syncing
    • Adds eth_syncing API for compatibility. Note: This API is only accessible after bootstrapping and always returns "false", since the node will no longer be syncing at that point.
    • Adds metrics to atomic transaction mempool
    • Adds metrics for incoming/outgoing mempool gossip
    Source code(tar.gz)
    Source code(zip)
  • v0.8.13(Jul 2, 2022)

  • v0.8.12(Jun 9, 2022)

    v0.8.12

    • Add peer bandwidth tracking to optimize state sync message routing
    • Fix leaf request handler bug to ensure the handler delivers a valid range proof
    • Remove redundant proof keys from leafs response message format
    • Improve state sync request retry logic
    • Improve state sync handler metrics
    • Improve state sync ETA
    Source code(tar.gz)
    Source code(zip)
  • v0.8.11(Jun 4, 2022)

    v0.8.11

    • Improve state sync leaf request serving by optimistically reading leaves from snapshot
    • Add acceptor queue within core/blockchain.go
    • Cap size of TrieDB dirties cache during block acceptance to reduce commit size at 4096 block interval
    • Refactor state sync block fetching
    • Improve state sync metrics
    Source code(tar.gz)
    Source code(zip)
  • v0.8.10(May 25, 2022)

  • v0.8.9(Apr 13, 2022)

    v0.8.9

    • Fix deadlock bug on shutdown causing historical re-generation on restart
    • Add API endpoint to fetch running VM Config
    • Add AvalancheGo custom log formatting to C-Chain logs
    • Deprecate support for JS Tracer
    Source code(tar.gz)
    Source code(zip)
  • v0.8.8(Mar 21, 2022)

  • v0.8.7(Mar 10, 2022)

    v0.8.7

    • Optimize FeeHistory API
    • Add protection to prevent accidental corruption of archival node trie index
    • Add capability to restore complete trie index on best effort basis
    • Round up fastcache sizes to utilize all mmap'd memory in chunks of 64MB
    Source code(tar.gz)
    Source code(zip)
  • v0.8.6(Mar 2, 2022)

  • v0.8.5(Feb 10, 2022)

    v0.8.5

    • Added beta support for offline pruning.
    • Refactored peer networking layer.
    • Enabled cheap metrics by default.
    • Marked RPC call metrics as expensive.
    • Added Abigen support for native asset call precompile.
    • Fixed bug in BLOCKHASH opcode during traceBlock.
    • Fixed bug in handling updated chain config on startup.
    Source code(tar.gz)
    Source code(zip)
  • v0.8.4(Jan 19, 2022)

    • Added an index mapping height to the list of accepted atomic operations at that height in a trie. Generating this index will cause the node to take a few minutes longer to startup the C-Chain for the first restart.
    • Updated Geth dependency to v1.10.15.
    • Updated networkID to match chainID.
    • Updated API client utility to use a Context rather than an explicit timeout.
    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(Aug 17, 2021)

    This change is not backwards compatible with previous releases.

    The changes in this upgrade go into effect at 10 AM EDT, August 24th 2021 on Mainnet.

    Network Upgrades

    • Adds dynamic fees to the C-Chain
    • Adds London Hard Fork EIP-3198, EIP-3541, and a modified version of EIP-1559
    Source code(tar.gz)
    Source code(zip)
  • v0.5.7(Jul 30, 2021)

    This update is backwards compatible. It is optional, but encouraged.

    This release updates the avalanchego version to v1.4.12, which updates the GRPC format.

    Source code(tar.gz)
    Source code(zip)
  • v0.5.6(Jul 29, 2021)

    This update is backwards compatible. It is optional, but encouraged. The patch includes performance improvements.

    • This release enables snapshots by default. You should expect high CPU/disk usage for about an hour when you run v0.5.6 for the first time due to snapshot generation. (The actual amount of time depends on your computer.)
    • This release fixes edge cases around reprocessing blocks after restarts.
    Source code(tar.gz)
    Source code(zip)
  • v0.5.5(Jul 13, 2021)

    This update is backwards compatible. It is optional, but encouraged. The patch includes performance and UX improvements.

    • Enable pruning by default
    • Remove unused consensus engine callback functions
    • Slim down modified AvalancheGo Docker image
    • Improve transaction pool error messages
    • Fix unlikely re-org log
    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(May 6, 2021)

    Please note that this change is not backwards compatible with previous releases.

    This upgrade applies the Ethereum Berlin upgrade to the C-chain, adds new precompiled contracts to interact with Avalanche Native Tokens (ANTs), and includes various stability improvements.

    The changes in the upgrade go into effect at 10 AM EDT, May 5th 2021 on the Fuji testnet and 7 AM EDT, May 10th 2021 on mainnet.

    The primary components to this upgrade include:

    • Bump go-ethereum dependency to v1.10.2.
    • Applied the Ethereum Berlin upgrade. Specifically EIP-2565, EIP-2718, EIP-2929, and EIP-2930.
    • Added new stateful pre-compiled smart contracts to the C-chain to support ANT transfers and ARC-20 wrappers around ANTs.
    Source code(tar.gz)
    Source code(zip)
  • v0.4.2(Apr 13, 2021)

    This update is backwards compatible. It is optional, but encouraged. The patch includes security improvements, UI improvements, and new features.

    Security Improvements

    • Enforced a strict canonical format for C-chain blocks made prior to Apricot Phase 1. This ensures that modifications to the extra-data block field can not result in modifications to the chain state during bootstrapping.
    • Changed the Keystore to ensure only encrypted values are sent over the IPC between avalanchego and coreth

    UI Improvements

    • Bound results returned from GetLogs and GetFilterLogs to return only blocks that have been accepted by default
    • Add optional config to enable queries past the last accepted block

    New Features

    • Create an accepted head feed that will emit an event whenever a new block is accepted by the node
    Source code(tar.gz)
    Source code(zip)
  • v0.4.1(Apr 1, 2021)

    This update is backwards compatible. It is optional, but encouraged. The patch includes stability and minor bug fixes.

    The primary components to this upgrade include:

    • Fixed C-chain segfault when performing compression on arm64 CPUs
    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(Apr 1, 2021)

    Please note that this change is not backwards compatible with previous releases.

    This upgrade reduces C-chain gas fees, removes C-chain gas refunds, and includes various security improvements. We urge everyone in the community to update as soon as possible in order to ensure that their nodes remain healthy.

    The changes in the upgrade go into effect at 10 AM EST, March 25th 2021 on the Fuji testnet and 10 AM EST, March 31st 2021 on mainnet.

    The primary components to this upgrade include:

    • Reduced C-chain gas cost from 470 nAVAX to 225 nAVAX.
    • Removed C-chain gas refunds. This change adopts EIP-3298.
    • Refactored C-chain verification to be cleaner when performing network upgrades.
    Source code(tar.gz)
    Source code(zip)
  • v0.3.27(Mar 18, 2021)

  • v0.3.26(Mar 8, 2021)

Owner
Ava Labs
Ava Labs
a Golang sdk for working with DeFi protocols, and ethereum compatible blockchains

A golang sdk for working with DeFi protocols and general utilities for working with ethereum-compatible blockchains. packages bclient bindings cli con

bonedaddy 72 Nov 11, 2022
A blockchains platform with high throughput, and blazing fast transactions

Node implementation for the Avalanche network - a blockchains platform with high throughput, and blazing fast transactions. Installation Avalanche is

null 1 Oct 31, 2021
A Verifyable Chain Relay for Proof of Stake Blockchains

A Verifyable Chain Relay for Proof of Stake Blockchains This repository contains

null 6 Nov 11, 2022
A naive and simple implementation of blockchains.

naivechain A naive and simple implementation of blockchains. Build And Run Download and compile go get -v github.com/kofj/naivechain Start First Node

疯魔慕薇 324 Dec 5, 2022
A collection about awesome blockchains

A collection about awesome blockchains - open distributed public databases w/ crypto hashes incl. git ;-). Blockchains are the new tulips :tulip::tulip::tulip:. Distributed is the new centralized.

Blockchain! Blockchain! Blockchain! 3.6k Nov 30, 2022
Dijetsnetgo: a blockchains platform with high throughput, and blazing fast transactions

Node implementation for the Avalanche network - a blockchains platform with high

Dijets 0 Jan 18, 2022
Signing, Keystore and RLP encoding utilities for EVM / Ethereum / secp256k1 based blockchains

Signing, Keystore and RLP encoding utilities for EVM / Ethereum / secp256k1 based blockchains. Written in Go with an enterprise friendly Apache 2.0 license, and a runtime JSON/RPC proxy server. Part of the Hyperledger FireFly project

Hyperledger 3 Aug 9, 2022
Get any cryptocurrencies ticker and trade data in real time from multiple exchanges and then save it in multiple storage systems.

Cryptogalaxy is an app which will get any cryptocurrencies ticker and trade data in real time from multiple exchanges and then saves it in multiple storage systems.

Pavan Shetty 109 Dec 1, 2022
A multiformat-inspired go module for working with multiple kinds of keypairs.

A multiformat-inspired go module for working with multiple kinds of keypairs.

kubelt 24 Apr 4, 2022
Easy to use crypto library with multiple algorithms

crypka Crypka is library, which abstracts away crypto, so one can easily do: Swap cryptosystems by swapping algorithm object in one place Easily and s

null 1 Mar 6, 2022
Terra client in golang with multiple protocol implementation (anchor, astroport, prism, ...)

Terra A terra client with some protocol partial implementations (anchor, prism, terraswap type routers, ...) To be able to compile, you need to add th

null 3 Apr 11, 2022
Yet another Binance Smart Chain client based on TrustFi Network

TrustFi Smart Chain The goal of TrustFi Smart Chain is to bring programmability and interoperability to Binance Chain. In order to embrace the existin

TrustFi Network 19 Mar 27, 2021
Community-run technology powering the cryptocurrency, and decentralized applications on TrustFi Network

Go TrustFi-Ethereum Official Golang implementation of the TrustFi-Ethereum protocol. Automated builds are available for stable releases and the unstab

TrustFi Network 786 May 26, 2021
Split and distribute your private keys securely amongst untrusted network

cocert An experimental tool for splitting and distributing your private keys safely* cocert, generates ECDSA - P521 key and uses a technique known as

Furkan Türkal 189 Dec 5, 2022
LEO (Low Ethereum Orbit) is an Ethereum Portal Network client.

LEO LEO (Low Ethereum Orbit) is an Ethereum Portal Network client. What makes LEO different from other Portal Network clients is that it uses libp2p f

Valist, Inc. 10 Apr 19, 2022
An implementation of the Filecoin Distributed Storage Network

Project Lotus - 莲 Lotus is an implementation of the Filecoin Distributed Storage Network. For more details about Filecoin, check out the Filecoin Spec

null 0 Oct 27, 2021
Uniform interface for interacting with network hardware via telnet/ssh

jgivc/console This package provides a uniform interface for interacting with network hardware via telnet/ssh This package uses part of reiver/go-telne

null 0 Dec 9, 2021
Practicing network programming using Go. These are some fundamental APIs

Go Networking This repository is a collection of Network Programming APIs or sim

Srijan Srivastava 1 Apr 29, 2022
XDC.Network Rosetta API Implementation

Rosetta XDC.Network ROSETTA XDC.Network IS CONSIDERED ALPHA SOFTWARE. USE AT YOUR OWN RISK! COINBASE ASSUMES NO RESPONSIBILITY OR LIABILITY IF THERE I

null 3 Nov 28, 2022