Code Monkey home page Code Monkey logo

kaia's Introduction

Kaia

Official golang implementation of the Kaia blockchain. Please visit our Docs for more details on Kaia design, node operation guides and application development resources.

Building from Sources

Building the Kaia node binaries as well as utility tools, such as kcn, kpn, ken, kbn, kscn, kspn, ksen, kgen, homi and abigen requires both a Go and a C compiler. You can install them using your favorite package manager. Once the dependencies are installed, run

make all (or make {kcn, kpn, ken, kbn, kscn, kspn, ksen, kgen, homi, abigen})

Executables

After successful build, executable binaries are installed at build/bin/.

Command Description
kcn The CLI client for Kaia Consensus Node. Run kcn --help for command-line flags.
kpn The CLI client for Kaia Proxy Node. Run kpn --help for command-line flags.
ken The CLI client for Kaia Endpoint Node, which is the entry point into the Kaia network (main-, test- or private net). It can be used by other processes as a gateway into the Kaia network via JSON RPC endpoints exposed on top of HTTP, WebSocket, gRPC, and/or IPC transports. Run ken --help for command-line flags.
kscn The CLI client for Kaia ServiceChain Consensus Node. Run kscn --help for command-line flags.
kspn The CLI client for Kaia ServiceChain Proxy Node. Run kspn --help for command-line flags.
ksen The CLI client for Kaia ServiceChain Endpoint Node. Run ksen --help for command-line flags.
kbn The CLI client for Kaia Bootnode. Run kbn --help for command-line flags.
kgen The CLI client for Kaia Nodekey Generation Tool. Run kgen --help for command-line flags.
homi The CLI client for Kaia Helper Tool to generate initialization files. Run homi --help for command-line flags.
abigen Source code generator to convert Kaia contract definitions into easy to use, compile-time type-safe Go packages.

Both kcn and ken are capable of running as a full node (default) or an archive node (retaining all historical state).

Running a Core Cell

Core Cell (CC) is a set of one consensus node (CN) and one or more proxy nodes (PNs). Core Cell plays a role of generating blocks in the Kaia network. We recommend to visit the CC Operation Guide for the details of CC bootstrapping process.

Running an Endpoint Node

Endpoint Node (EN) is an entry point from the outside of the network in order to interact with the Kaia network. Currently, two official networks are available: Kairos and Mainnet (legacy names: Baobab and Cypress). Please visit the official EN Operation Guide.

Running a Service Chain Node

Service chain node is a node for Service Chain which is an auxiliary blockchain independent from the main chain tailored for individual service requiring special node configurations, customized security levels, and scalability for high throughput services. Service Chain expands and augments Kaia by providing a data integrity mechanism and supporting token transfers between different chains. Although the service chain feature is under development, we provide the operation guide for testing purposes. Please visit the official document Service Chain Operation Guide. Furthermore, for those who are interested in the Kaia Service Chain, please check out Scaling Solutions.

License

The Kaia library (i.e. all code outside of the cmd directory) is licensed under the GNU Lesser General Public License v3.0, also included in our repository in the COPYING.LESSER file.

The Kaia binaries (i.e. all code inside of the cmd directory) is licensed under the GNU General Public License v3.0, also included in our repository in the COPYING file.

Contributing

As an open source project, Kaia always welcomes your contribution. Please read our CONTRIBUTING.md for a walk-through of the contribution process.

kaia's People

Contributors

blukat29 avatar kimkyungup avatar hyunsooda avatar aidan-kwon avatar ian0371 avatar joowon-byun avatar ehnuje avatar jeongkyun-oh avatar yoomee1313 avatar hqjang-pepper avatar aeharvlee avatar jaychoi1736 avatar hyeonlewis avatar kjhman21 avatar sjnam avatar 2dvorak avatar jimni1222 avatar kjeom avatar whoisxx avatar andybclee avatar mckim19 avatar jeonghonah avatar hyochan-brown avatar sotatek-tinnnguyen avatar jiseongnoh avatar iv0rish avatar laggu avatar dependabot[bot] avatar 0xxlegolas avatar ethan-kr avatar

Stargazers

Junho Yeo avatar lopld avatar probe avatar Song Li avatar Woojin Lee(Jared) avatar Tain avatar Miles avatar XETA avatar 블록첸 avatar Shogo Hyodo avatar  avatar dukedev avatar

Watchers

Torao Takami avatar Rei avatar zemyblue avatar  avatar  avatar  avatar Lim SangHyun(Blue) avatar  avatar cybermong avatar  avatar  avatar  avatar starniah avatar  avatar

kaia's Issues

QA for v1.0.0

  • Regular tests
  • Kaia hardfork tests
    • KIP-160 RebalanceV2 test on private chain @ian0371
      • Test system.RebalanceTreasury routine at hardfork
      • Submit memo and see getTotalSupply works
    • KIP-162 Priority Fee tx processing @hyeonLewis #1 (comment)
      • Test various tx types (type 0, 2, 0xa)
      • Test various gas price fields (gasPrice, maxFeePerGas, maxPriorityFeePerGas, with respect to baseFeePerGas)
      • Validate results (proposer&sender balance changes, getTransactionReceipt, getRewards APIs, block tx ordering)
    • KIP-162 Priority Fee GASPRICE opcode @hyeonLewis #1 (comment)
    • KIP-163 Public Delegation and 1-block staking interval @ian0371
      • getCommittee reacts quickly after a validator staking amount falls below / goes above minStaking
    • Ending credit @yoomee1313 #1 (comment)
      • The result is retrievable via console and curl
  • RPC API changes

en memory increase

Describe the bug
There's an issue reported that EN memory is keep increasing.
image

How to reproduce
Call debug_traceBlockByNumberRange for the latest 10 blocks once every 10 seconds.
But it seems that debug_traceBlockByNumber also can reproduce the problem.

Expected memory usage
The memory usage should be stable. The binary version of the next screenshot is kaia-v1.0.2 + #73, #74.
image

Trying to start a pruned archive node

Per the conversation in #69 I'm trying to start an archive node with pruning enabled. I started my node in archive mode, with the following parameters: --state.live-pruning --state.live-pruning-retention 1209600 looking to keep about two weeks worth of blocks. It starts great, but starts at block 0. Not wanting to sync the entire chain, I tried to add the parameter --start-block-num with a block that was two weeks ago, hiping it would start there. It didn't, it again started at 0. So I pulled down the chaindata from https://packages.klaytn.net/cypress/chaindata/ and loaded that (grabbed one from a couple weeks ago, figuring a couple weeks of sync'ing won't be bad and then I'd have the full two weeks worth of data when it was done in a couple days. However, doing that, I now get the following error:

Fatal: Error starting protocol stack: cannot enable live pruning after chain has advanced

So, how is the best way to start an archive node with live pruning enabled?

Thanks

Store state tries longer than default

I'm running a full node (--gcmode full). I'm querying a block that's 15 hours old, and while the block exists on my node, I get "missing trie node" for various other methods (eth_getBalance, eth_call, etc). How can I retain states for longer than the default (which seems to only be a few hours).

I've found --db.num-statetrie-shards as well as a few other various parameters that seem like they may be related.

v1.0.0 does not provide kend binary

kaia v1.0.0 does not provide the kend binary. Will the kend binary no longer be provided in the future? We are currently using kend to run the fullnode

QA for v1.0.1

  • Regular tests except sync test and load test @yoomee1313
    • ok
  • The Go RPC client supports type-2 transactions #29 #36 @yoomee1313 #14 (comment)
    • From a fresh Go project, go get github.com/kaiachain/kaia works.
    • Client can send type-2 transactions with custom gas price & tip
  • RPC changes
  • CallTracer (formerly InternalTxTracer) changes @blukat29
    • API debug.trace* output is correct #15
    • ChainDataFetcher InternalTrace output is correct #16 #47
    • State regen in full mode nodes #43
  • CI packaging pipeline #37 @blukat29 #14 (comment)
    • rc.1 rpm packages are available under packages.kaia.io
    • rc.1 tgz packages are available under packages.kaia.io
  • Istanbul snapshot regeneration #46 @blukat29 #14 (comment)
    • no 'failed to update kaia stakingInfo' error during node startup
    • staking info related APIs for historic blocks
    • chaindatafetcher blockgroup topic

Sign-Off PR: #40

QA for v1.0.2

  • Regular tests except sync test and load test @yoomee1313 #61 (comment)
  • PebbleDB support #42, #56 @hyeonLewis
    • block sync without problem
    • leveldb-like metrics measured
    • RPC service without problem
  • kaia_getTotalSupply fixes #58 #62 #65 #67 #68 @ian0371
    • The showPartial flag works as expected
    • Pruning EN falls back to Upstream Archive EN
    • Archive EN can serve any block
    • Correct result after debug_setHead or --start-block-num
  • kaia_recoverFromTransaction fix #71 @ian0371
    • Works with Eth tx types

recoverFromTransaction API bug

Describe the bug
tx.From() cannot cover the legacy transaction in the recoverFromTransaction API.

  • option 1 : tx.From() --> types.Sender(signer, tx)

How to reproduce
Steps to reproduce the behavior:

  1. Make a ethereum legacy transaction signed by legacy account
  2. Call the recoverFromTransaction(tx)

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.