Giter VIP home page Giter VIP logo

kcc-community / kcc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ethereum/go-ethereum

46.0 46.0 21.0 173.11 MB

Official KCC Golang Client based on the go-ethereum.

Home Page: https://kcc.io

License: GNU Lesser General Public License v3.0

Go 89.53% Java 0.23% Ruby 0.01% Shell 0.14% C 5.09% Makefile 0.06% M4 0.20% JavaScript 3.34% Assembly 0.72% NSIS 0.18% HTML 0.09% Python 0.08% Dockerfile 0.01% Solidity 0.12% Sage 0.23%

kcc's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kcc's Issues

Bad Block when use --syncmode full

System information

Geth version: v1.0.4
OS & Version: Windows/Linux/OSX

Expected behaviour

Sync normally

Actual behaviour

Stuck at 2509928 when use --syncmode full

Steps to reproduce the behaviour

Download kcc-geth v1.0.4, then ./geth --syncmode full, the sync will stuck at block 2509928.

Fast mode works, and v1.0.3 works as well.

So we can use v1.0.3 to continue sync, then use v1.0.4 after this height.

Backtrace

2451632067632_ pic_hd

Ethermine

Rationale

Why should this feature exist?
What are the use-cases?

Implementation

Do you have ideas regarding the implementation of this feature?
Are you willing to implement this feature?

Error when building v1.3.2-stable via `make all`

When attempting to build v1.3.2 using make all on an AlmaLinux 8 OS using go1.20.2, the following error is produced:

cmd/devp2p/nodesetcmd.go:235:42: undefined: params.SepoliaChainConfig
cmd/devp2p/nodesetcmd.go:235:69: undefined: params.SepoliaGenesisHash
util.go:48: exit status 1
exit status 1
make: *** [Makefile:17: all] Error 1

Build not working on master

System information

Geth version: geth version
OS & Version: Windows/Linux/OSX
Commit hash : (if develop)

Expected behaviour

Make geth is not working on master since dependabot update the latest "go.mod" file

Actual behaviour

env GO111MODULE=on go run build/ci.go install ./cmd/geth
go: downloading github.com/cespare/cp v0.1.0
go: downloading github.com/Azure/azure-storage-blob-go v0.15.0
go: downloading golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897
go: downloading github.com/google/uuid v1.2.0
go: downloading github.com/Azure/azure-pipeline-go v0.2.3
go: downloading github.com/mattn/go-ieproxy v0.0.1
# github.com/ethereum/go-ethereum/internal/build
internal/build/azure.go:68:99: not enough arguments in call to blockblob.Upload
	have (context.Context, *os.File, azblob.BlobHTTPHeaders, azblob.Metadata, azblob.BlobAccessConditions)
	want (context.Context, io.ReadSeeker, azblob.BlobHTTPHeaders, azblob.Metadata, azblob.BlobAccessConditions, azblob.AccessTierType, azblob.BlobTagsMap, azblob.ClientProvidedKeyOptions, azblob.ImmutabilityPolicyOptions)
internal/build/azure.go:73:64: undefined: azblob.BlobItem
internal/build/azure.go:87:24: undefined: azblob.BlobItem
internal/build/azure.go:107:71: undefined: azblob.BlobItem
make: *** [Makefile:16: geth] Error 2

Steps to reproduce the behaviour

Backtrace

[backtrace]

Grace men.com

System information

Geth version: geth version
OS & Version: Windows/Linux/OSX
Commit hash : (if develop)

Expected behaviour

Actual behaviour

Steps to reproduce the behaviour

Backtrace

[backtrace]

When submitting logs: please submit them as text and not screenshots.

Pending Tx Stream broken Over IPC using Rust

System information

Geth version: v1.4.1-stable (latest)
OS & Version: Windows 10

Expected behaviour

subscribes to a new stream of pending tx's

Actual behaviour

Error: JsonRpcClientError(JsonRpcError(JsonRpcError { code: -32602, message: "too many arguments, want at most 1", data: None }))
error: process didn't exit successfully: `target\debug\revm-playground-bz.exe` (exit code: 1)

Steps to reproduce the behaviour

use ethers::prelude::*;
use ethers::providers::{Provider, Ipc, Middleware};
use std::error::Error;

const IPCPATH: &str = "\\\\.\\pipe\\geth.ipc"; 

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    let ipc_provider: Provider<Ipc> = Provider::connect_ipc(IPCPATH).await.unwrap();


    let mut transactions: ethers::providers::SubscriptionStream<'_, Ipc, ethers::types::Transaction> = ipc_provider.subscribe_full_pending_txs().await.unwrap();
    while let Some(tx) = transactions.next().await {
        println!("--------------------------------------------------------------------------------------------------------------------------");
        println!("Tx Hash: {:?}", tx.hash);

        
    }   
    Ok(())
}

I can't make geth

root@ubuntu20:~/kcc# make geth

env GO111MODULE=on go run build/ci.go install ./cmd/geth

build github.com/Azure/azure-sdk-for-go/sdk/azcore: cannot load github.com/Azure/azure-sdk-for-go/sdk/azcore: no Go source files
make: *** [Makefile:12: geth] Error 1

debug_traceChain return error

in websoket:

{"id": 1, "method": "debug_subscribe", "params": ["traceChain", "0xcdb15c", "0xcdb15d", {"tracer":"callTracer", "timeout": "200s"}]}

node return :

{
    "jsonrpc": "2.0",
    "method": "debug_subscription",
    "params": {
        "subscription": "0x54c78f84f76ea97d99d537732d3d1b0c",
        "result": {
            "block": "0xcdb15d",
            "hash": "0xd2c4993d166b14e59a038d5d02a96b01865346b714e5c5cfce2aa5323e0edd43",
            "traces": [
                {
                    "error": "execution timeout"
                }
            ]
        }
    }
}

This result is different from debug_traceBlockByNumber.

debug_traceBlockByNumber return like this:

{
    "jsonrpc": "2.0",
    "method": "debug_traceBlockByNumber",
    "params": [
        "0xcdb15d",
         {"tracer": "callTracer", "timeout": "200s"}
    ],
    "id": 1
}
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": [
        {
            "result": {
                "type": "CALL",
                "from": "0x3a9c5e0c405b039eeb6f2f7ccca5bfccb2bc69a3",
                "to": "0xfdfce767add9dcf032cbd0de35f0e57b04495324",
                "value": "0x0",
                "gas": "0xbe134",
                "gasUsed": "0x2070e",
                "input": "0xe2bbb15800000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000003c0eca9fb0293aa3e2a",
                "output": "0x",
                "time": "139.752927ms",
                "calls": [
                    {
                        "type": "STATICCALL",
                        "from": "0xfdfce767add9dcf032cbd0de35f0e57b04495324",
                        "to": "0xa232918ca4064667f9230eb30cd593c7c03959d7",
                        "gas": "0xb780d",
                        "gasUsed": "0x9c6",
                        "input": "0x70a08231000000000000000000000000fdfce767add9dcf032cbd0de35f0e57b04495324",
                        "output": "0x000000000000000000000000000000000000000000005f3f23c2b68b7c6cf8b5"
                    },
                    {
                        "type": "CALL",
                        "from": "0xfdfce767add9dcf032cbd0de35f0e57b04495324",
                        "to": "0x2ca48b4eea5a731c2b54e7c3944dbdb87c0cfb6f",
                        "value": "0x0",
                        "gas": "0xb12a0",
                        "gasUsed": "0x4c63",
                        "input": "0x40c10f19000000000000000000000000fdfce767add9dcf032cbd0de35f0e57b04495324000000000000000000000000000000000000000000000003c51c70de4220ec06",
                        "output": "0x"
                    },
                    {
                        "type": "CALL",
                        "from": "0xfdfce767add9dcf032cbd0de35f0e57b04495324",
                        "to": "0xa232918ca4064667f9230eb30cd593c7c03959d7",
                        "value": "0x0",
                        "gas": "0xa9a61",
                        "gasUsed": "0x32ec",
                        "input": "0x23b872dd0000000000000000000000003a9c5e0c405b039eeb6f2f7ccca5bfccb2bc69a3000000000000000000000000fdfce767add9dcf032cbd0de35f0e57b044953240000000000000000000000000000000000000000000003c0eca9fb0293aa3e2a",
                        "output": "0x"
                    }
                ]
            }
        }
    ]
}

Network_id of Mainnet is not 321

System information

Geth version: v1.0.4
OS & Version: Windows/Linux/OSX

Expected behaviour

network_id = chain_id = 321

Actual behaviour

network_id = 1

DoS via malicious p2p message, upstream CVE-2022-29177

Describe the bug
KCC's implementation of the p2p disc message deserialization is vulnerable to the same CVE as reported upstream in CVE-2022-29177

The fix is quite simple, please take the time to cherrypick ethereum#24507

If you are so kind as to provide a bug bounty for this heads up, feel free to donate some tokens to 0xD736B7c9eB18EaE030fA229DD0EC32694De36eA8

I do use Kucoin so some Kucoin tokens would be VERY much appreciated, thank you!

Much appreciated and hope you cherrypick the fix.

I deploy the node through docker, and when it reaches a certain height(2509228), the node cannot be synchronized, please help

System information

Geth version: geth version
Geth
Version: 1.0.5-stable
Git Commit: 0886aaa
Architecture: amd64
Go Version: go1.13.8
Operating System: linux
GOPATH=
GOROOT=go

OS & Version:Linux
Commit hash : v1.0.5

Backtrace

[06-19|11:57:51.411] Downloader queue stats receiptTasks=0 blockTasks=65 itemSize=1.01KiB throttle=8192
INFO [06-19|11:57:51.412] Skip duplicated bad block number=2509228 hash="e164a7…d137e7"
ERROR[06-19|11:57:51.412]
########## BAD BLOCK #########
Chain config: {ChainID: 321 Homestead: 0 DAO: DAOSupport: true EIP150: 0 EIP155: 0 EIP158: 0 Byzantium: 0 Constantinople: 0 Petersburg: 0 Istanbul: 0, Muir Glacier: 0, Berlin: 0, YOLO v3: , Engine: posa}

Number: 2509228
Hash: 0xe164a7e1c9d5301ba4757657da9e69453b0d2621cb47250f04c093160cd137e7
0: cumulative: 144061 gas: 144061 contract: 0x0000000000000000000000000000000000000000 status: 1 tx: 0xee187652c539c4ed94baa053cfc0be7e0f826c663f31a2f52324a27e4d03c3c1 logs: [] bloom: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 state:
1: cumulative: 210394 gas: 66333 contract: 0xbbc06930c6296bf12Ef40E9BB4c519D9d8Ca9084 status: 1 tx: 0xe42c11a8a31f3c0a990a8264b23bf4e936b9d97f3242cfbc21e63b2b0abd09f0 logs: [] bloom: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 state:

Error: invalid merkle root (remote: 7aacf3a296614e10d528e544072bc12580ed456d3d307c0e585d9ef5904a2d70 local: 5bdf3322b26b136c888a0a170ddca784bb344112208e4637ac62741f2ee55eed)
##############################

WARN [06-19|11:57:51.412] Synchronisation failed, dropping peer peer=5274a03e6d468a811021d186b7cca561ae3595b91586254aa7c8b0f0f1fa8347 err="retrieved hash chain is invalid: invalid merkle root (remote: 7aacf3a296614e10d528e544072bc12580ed456d3d307c0e585d9ef5904a2d70 local: 5bdf3322b26b136c888a0a170ddca784bb344112208e4637ac62741f2ee55eed)"
ERROR[06-19|11:57:51.412] Ethereum peer removal failed peer=5274a03e err="peer not registered"
INFO [06-19|11:58:00.006] Looking for peers peercount=1 tried=95 static=0
ERROR[06-19|11:58:07.284] Snapshot extension registration failed peer=3ce52055 err="peer connected on snap without compatible eth support"
INFO [06-19|11:58:10.007] Looking for peers peercount=1 tried=184 static=0
ERROR[06-19|11:58:15.332] Snapshot extension registration failed peer=af5dfeb7 err="peer connected on snap without compatible eth support"
INFO [06-19|11:58:20.042] Looking for peers peercount=1 tried=104 static=0
ERROR[06-19|11:58:22.022] Snapshot extension registration failed peer=cb5b9771 err="peer connected on snap without compatible eth support"
ERROR[06-19|11:58:22.264] Snapshot extension registration failed peer=cbd3f861 err="peer connected on snap without compatible eth support"
INFO [06-19|11:58:30.064] Looking for peers peercount=0 tried=107 static=0
ERROR[06-19|11:58:38.265] Snapshot extension registration failed peer=33f03161 err="peer connected on snap without compatible eth support"
INFO [06-19|11:58:50.157] Looking for peers peercount=0 tried=101 static=0
INFO [06-19|11:59:10.179] Looking for peers peercount=0 tried=65 static=0
INFO [06-19|11:59:20.432] Looking for peers peercount=0 tried=143 static=0
ERROR[06-19|11:59:25.334] Snapshot extension registration failed peer=88f932f1 err="peer connected on snap without compatible eth support"
INFO [06-19|11:59:30.469] Looking for peers peercount=0 tried=127 static=0
INFO [06-19|11:59:40.527] Looking for peers peercount=0 tried=105 static=0
ERROR[06-19|11:59:40.862] Snapshot extension registration failed peer=7bcee16b err="peer connected on snap without compatible eth support"
ERROR[06-19|11:59:48.787] Snapshot extension registration failed peer=c2340321 err="peer connected on snap without compatible eth support"
INFO [06-19|11:59:50.577] Looking for peers peercount=0 tried=211 static=0

[backtrace]
I deploy the node through docker, and when it reaches a certain height(2509228), the node cannot be synchronized, please help

debug_traceTransaction Error: "tracing failed: insufficient funds for transfer: address"

KCC off commit: 1c1715b sees the following error when attempting to call debug_traceTransaction on certain hashes: tracing failed: insufficient funds for transfer: address

Example:

curl -X POST --data '{"jsonrpc":"2.0","method":"debug_traceTransaction","params":["0x934e3a7564d57dcf8880d8f7c2fc013512edc6027e157cc3352037f650c5c9c8", {"tracer": "callTracer"}],"id":1}' -H "Content-Type: application/json" http://127.0.0.1:8545

{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"tracing failed: insufficient funds for transfer: address 0x02C8B0d968e8f60cF5A079eC0c9b443fa6C53e24"}}

I need Gas fee

In order to send a transaction on the KCC network, I need to have the gas fee, but no matter how much I search, it is not available anywhere.

Export and Import not work

System information

Geth version: v1.0.4
OS & Version: Windows/Linux/OSX

Expected behaviour

Export and Import works.

Actual behaviour

Import not works.

Steps to reproduce the behaviour

geth export 20210920.gz --syncmode full

geth import 20210920.gz --syncmode full --gcmode archive

Backtrace

INFO [09-20|13:43:13.782] Maximum peer count                       ETH=50 LES=0 total=50
INFO [09-20|13:43:13.782] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
INFO [09-20|13:43:13.783] Set global gas cap                       cap=25000000
INFO [09-20|13:43:13.783] Allocated cache and file handles         database=/home/ubuntu/.ethereum/geth/chaindata cache=512.00MiB handles=524288
INFO [09-20|13:43:13.796] Opened ancient database                  database=/home/ubuntu/.ethereum/geth/chaindata/ancient
INFO [09-20|13:43:13.797] Disk storage enabled for ethash caches   dir=/home/ubuntu/.ethereum/geth/ethash count=3
INFO [09-20|13:43:13.797] Disk storage enabled for ethash DAGs     dir=/home/ubuntu/.ethash               count=2
INFO [09-20|13:43:13.797] Loaded most recent local header          number=0 hash="d179bc…6ca3fc" td=1 age=3mo3w6h
INFO [09-20|13:43:13.797] Loaded most recent local full block      number=0 hash="d179bc…6ca3fc" td=1 age=3mo3w6h
INFO [09-20|13:43:13.797] Loaded most recent local fast block      number=0 hash="d179bc…6ca3fc" td=1 age=3mo3w6h
INFO [09-20|13:43:13.798] Importing blockchain                     file=20210920.gz
INFO [09-20|13:43:13.820] Skip duplicated bad block                number=1 hash="6b5cb4…635f25"
ERROR[09-20|13:43:13.820] 
########## BAD BLOCK #########
Chain config: {ChainID: 321 Homestead: 0 DAO: <nil> DAOSupport: true EIP150: 0 EIP155: 0 EIP158: 0 Byzantium: 0 Constantinople: 0 Petersburg: 0 Istanbul: 0, Muir Glacier: 0, Berlin: 0, YOLO v3: <nil>, Engine: posa}

Number: 1
Hash: 0x6b5cb41e5dc9c94edd55b8aa958bbde2ee1d01a9d1485273c1fc9c506e635f25


Error: extra-data too long: 97 > 32
##############################
 
ERROR[09-20|13:43:13.820] Import error                             err="invalid block 2500: extra-data too long: 97 > 32"
INFO [09-20|13:43:13.820] Writing snapshot state to disk           root="8357c6…4c2c89"
INFO [09-20|13:43:13.820] Persisted trie from memory database      nodes=0 size=0.00B time="3.742µs" gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [09-20|13:43:13.820] Blockchain stopped 
Import done in 22.505486ms.

Compactions
 Level |   Tables   |    Size(MB)   |    Time(sec)  |    Read(MB)   |   Write(MB)
-------+------------+---------------+---------------+---------------+---------------
   1   |          1 |       0.01634 |       0.00000 |       0.00000 |       0.00000
-------+------------+---------------+---------------+---------------+---------------
 Total |          1 |       0.01634 |       0.00000 |       0.00000 |       0.00000

Read(MB):0.01343 Write(MB):0.00068
Object memory: 135.800 MB current, 130.539 MB peak
System memory: 279.841 MB current, 279.591 MB peak
Allocations:   0.098 million
GC pause:      301.152µs

Compacting entire database...
Compaction done in 10.860836ms.

Compactions
 Level |   Tables   |    Size(MB)   |    Time(sec)  |    Read(MB)   |   Write(MB)
-------+------------+---------------+---------------+---------------+---------------
   0   |          0 |       0.00000 |       0.00406 |       0.00000 |       0.00049
   1   |          1 |       0.01634 |       0.00384 |       0.01683 |       0.01634
-------+------------+---------------+---------------+---------------+---------------
 Total |          1 |       0.01634 |       0.00790 |       0.01683 |       0.01683

Read(MB):0.01724 Write(MB):0.01776
invalid block 2500: extra-data too long: 97 > 32

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.