•  


GitHub - btcsuite/btcsim
Skip to content

btcsuite/btcsim

Repository files navigation

btcsim

Build Status ISC License GoDoc

btcsim implements a simulation test driver using the simnet network provided by btcd . It launches the required nodes, manages them, runs the simulation and cleans up when done, all by itself, so there's no manual setup/teardown involved. btcsim uses btcrpcclient to interface with the RPC servers.

The input is read from a CSV file with the following headers:

| block height | minimum utxos required | transactions required |

Example:

20000,40000,20000
20001,60000,30000

Based on the input, the minimum required number of utxos are generated by creating transactions using the existing utxos and dividing them until the required number is reached.

The required number of transactions are generated by simulating transactions between multiple actors and using the utxos generated previously.

Mining is controlled using the RPC clients to ensure that the blocks are generated only when required i.e. when the minimum required number of utxos and transactions are created.

Components

Node

This is the first btcd node that is launched. It acts as the server for all Actors and as a peer for the miner.

Actor

An Actor simulates a wallet "Agent" by launching a btcwallet instance which connects to the node server. It is responsible for generating transactions among itself as well as other actors. Multiple actors can be launched simultaneously to simulate a large load due to a heavy multi-user system.

Miner

The Miner launches a btcd instance and simulates a mining node. It is connected to the node server using the addnode RPC call. It is responsible for collecting transactions and mining them when required.

Installation

btcsim depends on btcd and btcwallet , so install those first

$ go get github.com/btcsuite/btcd
$ go get github.com/btcsuite/btcwallet

Now install btcsim

$ go get github.com/btcsuite/btcsim

Usage

Invoking the command btcsim without any flags initializes a single actor simulation, using a default linear curve of 0-10,000 transactions per block:

$ btcsim

For more options, see:

$ btcsim --help

Debugging

To debug btcsim itself, you can turn on profiling using the --profile flag. To debug the processes spawned by btcsim i.e. btcd and btcwallet , you can check the logs written to ~/.btcsim/ .

License

Package btcsim is licensed under the copyfree ISC License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본