노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.

모네로(XMR, monero) 채굴용 Pool 구축하기



- 모네로 채굴, 저렴한 수수료, 자체 구축


- 1 CPU로 시작해서, 4 CPU로 확장을 고려(방문자가 많아지면,)


- 채굴장에서 전용풀도 필요하다면, 원격 구축 대행 가능(?)




채굴 실행 / 채굴 접속 


- 이미지 : 채굴중 진행 표시

- Mining Program 마이닝 프로그램 : xmr-stak-cpu.exe


- 설정 : config.txt

-- "cpu_threads_conf":

-- "pool_address" : 

-- "wallet_address" :

-- "pool_password" :



사전 준비


1. VPS (가상 사설 서버, 최소 1CPU/1GB/20GB HDD, 권장 4 CPU/8GB/80GB HDD )


2. Ubuntu 14.04 x64 (최소)


3. Putty / Winscp등의 ssh /sftp 지원툴




Ubuntu 설정


1. Update Ubuntu


2. Setup SWAP


3. 필요한 패키지 설치




Monero 데몬 설정(Wallet)



1. 폴더 생성 : mkdir monero

2. 다운로드 & unzip : https://downloads.getmonero.org/monero.linux.x64.v0-10-1-0.tar.bz2

3. monerd실행 (동기화)




채굴풀 설정(Mining Pool )


1.git clone : git clone https://github.com/zone117x/node-cryptonote-pool.git pool

2. cd pool

3. npm update

4. cp config_example.json config.json

5. 수수료를 저렴하게 수정, 출금 금액도 낮게 설정





결과물 : 웹 메인 화면





원문 : 

http://betbybitcoin.com/setup-monero-mining-pool-using-node-cryptonote-pool/


참조 : https://github.com/teracycle/teracycle-pool

참조 : https://moneroeric.com/install-monero-wallet-address/

블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,
노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.

xmr-stak-cpu 빌드(컴파일) 하기



XMR(모네로, monero)를 위한 CPU채굴 프로그램




1. 폴더 생성


mkdir c:\xmr-stak-dep


2. Visual Studion 2017 Commnunity 다운로드 및 설치, 실행후에


1) Desktop development with C++(왼쪽에서 선택)

2) Toolset for Visual Studio C++ 2015... (오른쪽에서 선택)


3. Cmake for Win64 다운로드 ( 3.9 )


4. Dependencies ( OpenSSL/Hwloc and Microhttpd ) 다운로드


unzip c:\xmr-stap-dep

 


개발자 기부/수수료

4.1 on_switch_pool(size_t pool_id) : 

    if ( pool_id = dev_pool_id )

     donate.xmr-stak.net:6666 또는 donate.xmr-stak.net:3333

4.2 case EV_SWITCH_POOL:

    on_switch_pool(ev.iPoolId)


5. 컴파일


xmr-stak-cpu를 github에서 다운로드후 unzip c:\xmr-stak-cpu


아래 명령어를 실행




 "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"
set CMAKE_PREFIX_PATH=C:\xmr-stak-dep\hwloc;C:\xmr-stak-dep\libmicrohttpd;C:\xmr-stak-dep\openssl
mkdir build
cd build
cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 ..
msbuild xmr-stak-cpu.sln /p:Configuration=Release
cd bin\Release
copy ..\..\..\config.txt .


또는 c:\xmr-stak-cpu 아래에

_vs1SetEnv.bat


"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"

pause

_vs2Build.bat

:: should run after : setVs.bat

set CMAKE_PREFIX_PATH=d:\xmr-stak-dep\hwloc;d:\xmr-stak-dep\libmicrohttpd;d:\xmr-stak-dep\openssl
mkdir build
cd build
cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 ..
msbuild xmr-stak-cpu.sln /p:Configuration=Release
cd bin\Release
copy ..\..\..\config.txt .

pause



5.1 실행시 Error1 : msvcp140.dll, vcruntime140.dll not available erros 

--> 다운로드 from Microsoft



5.2 원본 : https://github.com/fireice-uk/xmr-stak-cpu


5.3 첨부 : 컴파일 버젼





* 개발자 기부 수수료 부분 (자세히)


https://github.com/fireice-uk/xmr-stak-cpu/blob/master/executor.cpp
// executor.cpp
void executor::ex_clock_thd()
{
	size_t iSwitchPeriod = sec_to_ticks(iDevDonatePeriod);	// 6000 -> 12000
	size_t iDevPortion = (size_t)floor(((double)iSwitchPeriod) * fDevDonationLevel); // 240

	//No point in bothering with less than 10 sec
	if(iDevPortion < sec_to_ticks(10))
		iDevPortion = 0;

	//Add 2 seconds to compensate for connect
	if(iDevPortion != 0)
		iDevPortion += sec_to_ticks(2);		// 244
	while (true)
	{
		std::this_thread::sleep_for(std::chrono::milliseconds(size_t(iTickTime)));

		push_event(ex_event(EV_PERF_TICK));

		// Service timed events
		std::unique_lock lck(timed_event_mutex);
		std::list::iterator ev = lTimedEvents.begin();
		while (ev != lTimedEvents.end())
		{
			ev->ticks_left--;
			if(ev->ticks_left == 0)
			{
				push_event(std::move(ev->event));
				ev = lTimedEvents.erase(ev);
			}
			else
				ev++;
		}
		lck.unlock();

		if(iDevPortion == 0)
			continue;

		iSwitchPeriod--;
		if(iSwitchPeriod == 0)
		{
			push_event(ex_event(EV_SWITCH_POOL, usr_pool_id));
			iSwitchPeriod = sec_to_ticks(iDevDonatePeriod);
		}
		else if(iSwitchPeriod == iDevPortion)	// 244
		{
			push_event(ex_event(EV_SWITCH_POOL, dev_pool_id));
		}
	}
}

// donate-level.h
// constexpr double fDevDonationLevel = 2.0 / 100.0;

// executor.h
constexpr static size_t iDevDonatePeriod = 100 * 60;



[실행]

[2017-11-14 11:53:29] : Starting single thread, affinity: 0.
[2017-11-14 11:53:29] : Starting single thread, affinity: 1.
[2017-11-14 11:53:29] : Starting single thread, affinity: 2.
[2017-11-14 11:53:29] : iDevDonatePeriod: 6000
[2017-11-14 11:53:29] : Connecting to pool xmr-eu.dwarfpool.com:8005 ...
[2017-11-14 11:53:29] : iSwitchPeriod: 12000
[2017-11-14 11:53:29] : hwloc: memory pinned
[2017-11-14 11:53:29] : fDevDonationLevel: 1202590843
[2017-11-14 11:53:29] : iDevPortion: 240
[2017-11-14 11:53:29] : iDevPortion: 244
[2017-11-14 11:53:29] : hwloc: memory pinned
[2017-11-14 11:53:29] : MEMORY ALLOC FAILED: VirtualAlloc failed.
[2017-11-14 11:53:29] : hwloc: memory pinned
[2017-11-14 11:53:29] : MEMORY ALLOC FAILED: VirtualAlloc failed.
[2017-11-14 11:53:29] : MEMORY ALLOC FAILED: VirtualAlloc failed.
[2017-11-14 11:53:29] : Connected. Logging in...
[2017-11-14 11:53:30] : Difficulty changed. Now: 20000.
[2017-11-14 11:53:30] : New block detected.


블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,
노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.

CudaMiner 윈도우용 컴파일 하기



-- 비트코인/알트코인 마이닝 마이너 만들기



1. 사전 준비


1) Visual Studio 201x (c++설치)


2) Nvidia CUDA Toolkit 5.5 , https://developer.nvidia.com/cuda-downloads


3) OpenSource Package ( phthreads, OpenSSL, curl )


4) Download CudaMiner Source , https://github.com/cbuchner1/CudaMiner




원문 : http://cryptomining-blog.com/tag/compile-cudaminer-for-windows/

블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,
노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.

BitCoin/비트코인 채굴하기



1. mining pool 가입하기


- 일반적인 PC로는 1bit coin를 채굴하기 위해서는 수백년이 소요된다.


- 대표적인 사이트 https://bitminter 가입하기



2. 채굴 도구 설치하기



- Java를 통해서 실행되는 Client로서, Java설치가 필요하다.



3. 채굴 Client 실행



- ENGINE START를 누르면, 시작된다.


- Client실행후에 Settings->Account의 설정은 https://bitminter.com/members/workers의 Workers설정과 가입 ID를 사용하면 된다.

- https://bitminter.com/members/workers의 메뉴에서 "Accepted"가 Client에서 작업한 결과를 반영하는 항목이다.


- 이 방식은 GPU를 사용하는 과정으로, ASIC를 사용하는 방식은 설명을 찾아 보면 될 것 같다.




*  CPU로 채굴하기


How to mine BitCoin with your CPU

https://jonathanmh.com/how-to-mine-bitcoin-with-your-cpu/


- cpuminer 

1. 다운로드, https://github.com/pooler/cpuminer

2. 사용법, minerd --help

3. 옵션

-a : specify the algorithm

-o : URL of mining sever


        • us1.bitminter.com:3333 (United States)
        • us2.bitminter.com:3333 (United States)
        • eu1.bitminter.com:3333 (Europe)


-u : username for mining server


e.g. John_asic3


-p : password for mining server


You can put X or 123 as password


-t : number of miner threds

-D: enable debug output

-P: verbose dump of protocol-level activities


mining.notify , https://github.com/ctubio/php-proxy-stratum/wiki/Stratum-Mining-Protocol

 {

  "method": "mining.notify",

  "params": [

// Job ID.

    "3e2f-4",

// Hash of previous block.

    "cc8122818b18803ee5d1 0f737a65b4bc083a2a8c00c6bf500000000000000000",

// The miner inserts ExtraNonce1 and ExtraNonce2 after this section of the coinbase

    "0100000001000000000000000000000000000000000 0000000000000000000000000000000ffffffff4d03bd5407094269744d696e7465722cfabe6d6d345a22ef755 0f17b770cd4443b0d6518cdc894f396e3bd6ec8d530bc62bb83380100000000000000096575313e2f00000004",

// The miner appends this after the first part of the coinbase and the two ExtraNonce values

    "ffffffff014089a150000000001976a9145c0e4a6830ff6ea9aea773d75bc207299cd50b7488ac00000000",

// List of merkle branches. The coinbase transaction is hashed against the merkle brances to build the final merkle root

    [

      "9e67c63ad57b49ab4be0bb35193dddf1910ade39a89e08e90f5af1c5a75fff2d",

      "bef5a66cadfd72b4003d8 fe43cc47dd799a1eea591779fcd1ea725d02a4de297",

      "27f05a3d8292bffe8836c605373a97b95210960fbb65 eab217ce8c1450c4198e",

      "d223f3be32ab0acaea400255ff40150487ad826d38ba9d484ceb8417aeb28b16",

      " 3ae54c3a88eee2ef1440cb171f23e25dd6c3c2f20e29d554e65848c4bfb3db69",

      "7709c4da7d0ccc6de618dc3 732e9ef542da80cd7cc68c6b105ccbad57b09a193",

      "2dda89452949583814463fa1dfc21ca5922835d893afb5 ac817b7028ab3b7efe",

      "1c0da5af5cb8c86d013e6dbce9e4ac8386e4b00d4d810e6cf75c8b36e4a480a7",

      "d7 dfa91ccabf0f151c388726a410f4ab430a231348b03862c2ca17ebcaa6c96a",

      "5533806ec8f9c855711eb7e99 07d878e56b9ed5986dd3e26c91868768ddc64a1",

      "b0194b4ea47866169ab41468208ac475e9a70c1af6467d0a 6a93dc9bcc0da0ed"

    ],

// Bitcoin block version, used in the block header

    "20000002",

// nBit, the encoded network difficulty. Used in the block header.

    "180130e0",

// nTime, the current time. nTime rolling should be supported, but should not increase faster than actual time.

    "59911174",

// Clean Jobs. If true, miners should abort their current work and immediately use the new job. 

// If false, they can still use the current job, but should move to the new one after exhauting the current nonce range.

    false

  ],

  "id": 1

}



*  주의할 사이트

1. 맬웨어 : minergate.com



블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,