⛓️
Blockchain
  • Start!
  • Go_lang
    • Tutorial
    • 1. Banking
    • 2. Dictionary
    • 3. URL Checker
    • Useful Methods - Slice
    • Useful data structure
  • RUST
    • Start
    • Basic
    • Basic Programming Concepts
      • Variables and Mutability
  • Bitcoin
    • Start
    • Introduction
    • Transactions
  • GO-BITCOIN
    • Start
    • 1. Blocks & Blockchain
    • 2. Proof of work
    • 3. BadgerDB
    • 4. Transactions
    • 5. Wallet
    • 6. Adding Digital Signatures
  • COSMOS
    • 코스모스 SDK
    • 코스모스 SDK 실습 - nameservice
    • 코스모스 허브는 어떻게 사용하는가?
    • 코스모스 허브, 금융의 역사를 다시 쓰다
    • Tendermint
      • ABCI
      • Messages
  • Cosmos Tutorial
    • Tutorials
    • 1. Blog
    • Nameservice
    • [Starport] Escrow Account: Scavenge
    • [Starport] Inter-Blockchain Communication: Basics
    • Create an IBC Interchain Exchange module
      • Introduction
      • App Design
      • Initialize the Blockchain
      • Create the Order Book
  • Ethereum
    • Start
    • Gas
    • Oracle Problem
  • consensus
    • DPoS
    • PBFT
    • Network model
  • cryptosystem
    • 대칭키 암호
    • IPFS
  • Social token
    • Rally
    • DeSo
      • Bitclout
      • Deso: The Decentralized Social Network
      • Setting Up Your Dev Environment
      • Deso Code Walkthrough
      • Web3 Will Not Be Built on Smart Contracts
  • 재윤TV
    • Start
    • 유니스왑에 대해서 아라보자
      • Concept
      • V2 백서 분석
      • V2 코드 분석
Powered by GitBook
On this page
  • Setup
  • Running the frontend in development mode
  • Running the node in testnet mode
  • Running the node in mainnet mode
  • Reference

Was this helpful?

  1. Social token
  2. DeSo

Setting Up Your Dev Environment

Bitclout 코드를 실행하고 개발해보자.

PreviousDeso: The Decentralized Social NetworkNextDeso Code Walkthrough

Last updated 3 years ago

Was this helpful?

Setup

cd $WORKING_DIRECTORY
git clone https://github.com/deso-protocol/core.git
git clone https://github.com/deso-protocol/backend.git
git clone https://github.com/deso-protocol/frontend.git
git clone https://github.com/deso-protocol/identity.git

Running the frontend in development mode

# Assume we're starting in $WORKING_DIRECTORY, which contains all the repos
cd frontend
npm install

# The following command will serve the frontend on localhost:4200 with
# auto-reloading on changes. You must run a node before the site will
# actually work however (see next section).
ng serve

npm install 시 발생하는 에러

Permission denied (public key) error 가 발생했다.

등록되지 않은 기기에서 유저의 ssh가 등록되지 않아 접근권한이 없어서 나오는 문제이다.

해당 블로그를 참고하여 해결했다.

ng serve 전에는 angular를 설치해주어야 한다.

Install angular

npm install -g @angular/cli

Running the node in testnet mode

# Assume we're starting in $WORKING_DIRECTORY, which contains all the
# repos. Also assume we have "ng serve" running.
cd backend/scripts/nodes

# The n0_test script runs a testnet blockchain locally. It starts mining 
# blocks immediately at a much faster rate than mainnet. You can set your 
# public key to receive the block rewards by setting it as --miner-public-key 
# in the arguments. This gives you funds that you can test with. You can see 
# the status of the node by going to the Admin tab after logging in with an
# account and then going to the Network subtab.
./n0_test

# Once n0_test is running, you must navigate to the following URL. 4200 is the
# port for ng serve. Note that in order to be 
<http://localhost:4200>

script 실행 시 발생하는 에러

brew install pkg-config
brew install vips
export CGO_CFLAGS_ALLOW=".*"
export CGO_LDFLAGS_ALLOW=".*"
./n0_test
export CGO_CFLAGS_ALLOW=
export CGO_LDFLAGS_ALLOW=

script 실행 후 보안상의 이유 때문에 flag를 다시 원래 설정으로 돌려주어야 한다.

Port 번호 변경

bitclout frontend는 17001번 포트에 backend API 요청을 한다. 17001은 메인넷 포트이고 18001이 테스트 포트이다. 따라서 test 노드를 돌렸으면 frontend와 연결이 되어 있지 않다. 테스트넷과 연결하기 위해서는 frontend에서 포트 번호를 변경해야 한다.

위 사진처럼 lastLocalNodeV2 를 17001에서 18001로 바꾼 후 다시 실행하자.

Running the node in mainnet mode

# Assume we're starting in $WORKING_DIRECTORY, which contains all the repos.
# Also assume we have "ng serve" running.
cd backend/scripts/nodes

# The n0 script runs a node that connects to mainnet peers. It will download
# all the blocks from its peers and then start syncing its mempool from them.
# You can see the status of the node by going to the Admin tab after
# logging in with an account and then going to the Network subtab. Note that
# syncing the blockchain may take an hour or so.
$ ./n0

# Once n0 is running, you must navigate to the following URL. 4200 is the
# ng serve port. It should automatically hit your node, which should be
# exposing its API at localhost:17001.
<http://localhost:4200>

mainnet은 17001번 포트에서 실행되므로 testnet과 반대로 frontend lastLocalNodeV2를 다시 17001로 돌려주어야 한다.

Reference

git@github.com
MAC ) git 문제 Permission denied (publickey).
Setting Up Your Dev Environment