1. cryptogen
신원 증명 정보에 대한 인증서를 발급할 떄 사용된다.
cryptogen generate [Args] : 새로운 네트워크를 위한 인증서를 발급한다.
옵션 | 설명 |
--config | 인증서 발급을 위한 설정 파일 ex) crypto-config.yaml |
--output | 인증서 파일의 저장 위치, default는 해당 프로젝트 위치에 'crypto-config' 폴더가 생성됨 |
cryptogen extend [Args] : 기존 네트워크에 인증서를 추가 발급한다.
옵션 | 설명 |
--input | 기존에 발급된 인증서 파일의 저장 위치를 불러옴 |
--config | 인증서 발급을 위한 설정 파일 |
https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/cryptogen.html
cryptogen — hyperledger-fabricdocs master documentation
Docs » Commands Reference » cryptogen Edit on GitHub cryptogen cryptogen is an utility for generating Hyperledger Fabric key material. It is provided as a means of preconfiguring a network for testing purposes. It would normally not be used in the operat
hyperledger-fabric.readthedocs.io
2. configtxgen
채널을 구성 및 검사하고 제네시스 블록을 생성 및 검사할 때 사용된다.
configtxgen을 사용하기 위해선 configtx.yaml이 필요하며 이 파일은 FABRIC_CFG_PATH에서 찾을수있다. (안해봤는데 공식문서에 그렇게 적혀있음)
옵션 | 설명 |
-asOrg | Organization 이름 |
-channelID | channel ID |
-inspectBlock | 지정된 경로에 있는 블록에 포함된 configuration 출력 |
-inspectChannelCreateTx | 지정된 경로의 채널 정보에 대한 트랜잭션 configuration 출력 |
-outputAnchorPeersUpdate | 앵커 피어 노드 업데이트 정보가 담긴 트랜잭션 파일이 저장될 경로 |
-outputBlock | 제네시스 블록 파일이 저장될 경로 |
-outputCreateChannelTx | 채널 생성 정보가 담긴 트랜잭션 파일이 저장될 경로 |
-profile | generate에 사용할 configtx.yaml에 있는 프로파일(네트워크 구성) |
https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/configtxgen.html
configtxgen — hyperledger-fabricdocs master documentation
Docs » Commands Reference » configtxgen Edit on GitHub configtxgen The configtxgen command allows users to create and inspect channel config related artifacts. The content of the generated artifacts is dictated by the contents of configtx.yaml. Syntax Th
hyperledger-fabric.readthedocs.io
3. configtxlator
REST서버를 구성할 때 사용한다.
옵션 | 설명 |
start | REST server start |
proto_encode | JSON to protobuf |
proto_decode | protobuf to JSON |
compute_update | 구성 업데이트 계산 |
version | show version infomation |
각 옵션별의 args는 아래 공식문서에 나와있다.
https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/configtxlator.html
configtxlator — hyperledger-fabricdocs master documentation
Docs » Commands Reference » configtxlator Edit on GitHub configtxlator The configtxlator command allows users to translate between protobuf and JSON versions of fabric data structures and create config updates. The command may either start a REST server
hyperledger-fabric.readthedocs.io
4. peer
5개의 서브명령어를 가지고 있다.
각 명령어는 피어 노드에서 실행되며 하이퍼레저 패브릭에서 가장 자주 사용된다.
주로 블록체인 데이터를 저장, 유지, 관리하며 체인코드 설치, 초기화, 실행 및 외부 서비스 인터페이스 제공을 담당한다.
옵션 | 설명 |
chaincode | 체인코드 관련 작업 |
channel | 채널 관련 작업 |
node | 피어 노드 서버 시작 |
version | 피어 노드 버전 정보 |
logging | 로그 |
사용법을 알고 싶을 땐 다음과 같이 치면 된다.
peer --help (peer 도구의 전체 도움말)
peer [서브명령어] --help (peer의 서브명령어의 도움말)
peer [서브명령어] [서브의서브?명령어] --help --> ex) peer channel join --help
https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/peercommand.html
peer — hyperledger-fabricdocs master documentation
Docs » Commands Reference » peer Edit on GitHub peer Description The peer command has five different subcommands, each of which allows administrators to perform a specific set of tasks related to a peer. For example, you can use the peer channel subcomma
hyperledger-fabric.readthedocs.io
4-1 peer chaincode
peer chaincode는 체인코드 installing, instantiating, invoking, packaging, querying, upgrading과 같은 작업을 할 때 사용된다.
서브명령어들은 다음과 같다.
- install
- instantiate
- invoke
- list
- package
- query
- signpackage
- upgrade
install, package, signpackage는 체인코드 패키징 및 배포 명령어이다.
instantiate, update는 체인코드의 인스턴스 생성 및 업데이트 명령어이다.
invoke, query는 체인코드 실행 명령어이다. invoke는 쓰기작업 query는 읽기작업에 해당한다.
https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/peerchaincode.html
peer chaincode — hyperledger-fabricdocs master documentation
Docs » Commands Reference » peer chaincode Edit on GitHub peer chaincode The peer chaincode command allows administrators to perform chaincode related operations on a peer, such as installing, instantiating, invoking, packaging, querying, and upgrading c
hyperledger-fabric.readthedocs.io
4-2 peer channel
peer channel은 하이퍼레저 패브릭의 채널을 관리할 떄 사용한다.
서브 명령어는 다음과 같다.
- create : 채널을 만듬
- fetch : 블록을 가지고 옴
- getinfo : 채널의 정보
- join : 채널에 가입시킴
- list : 채널의 가입된 목록
- signconfigtx : 서명
- update : 업데이트
https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/peerchannel.html
peer channel — hyperledger-fabricdocs master documentation
Docs » Commands Reference » peer channel Edit on GitHub peer channel The peer channel command allows administrators to perform channel related operations on a peer, such as joining a channel or listing the channels to which a peer is joined. Syntax The p
hyperledger-fabric.readthedocs.io
4-3 peer node
peer node는 피어 노드를 시작하거나 상태를 확인할 떄 사용된다.
서브 명령어는 다음과 같다.
- start
- status
- reset
- rollback
https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/peernode.html
peer node — hyperledger-fabricdocs master documentation
Docs » Commands Reference » peer node Edit on GitHub peer node The peer node command allows an administrator to start a peer node, check the status of a peer, reset all channels in a peer to the genesis block, or rollback a channel to a given block numbe
hyperledger-fabric.readthedocs.io
4-4 peer version
https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/peerversion.html
peer version — hyperledger-fabricdocs master documentation
Docs » Commands Reference » peer version Edit on GitHub peer version The peer version command displays the version information of the peer. It displays version, Commit SHA, Go version, OS/architecture, and chaincode information. For example: peer: Versio
hyperledger-fabric.readthedocs.io
4-5 peer logging
peer logging은 peer의 로그와 관련된 작업을 할 때 사용된다.
서브 명령어는 다음과 같다.
- getlogspec: 현재 설정된 로그 레벨 확인
- setlogspec: 로그 출력 레벨 설정
로그레벨
- FATAL: 심각한 수준의 에러발생
- PANIC: 시스템을 사용할 수 없어 에러발생
- ERROR: 요청을 처리하는 중 에러발생
- WARNING: 현재는 괜찮은데 나중에 에러가 될 수 있는 상태
- INFO: 정상작동, 정보성 메시지 출력
- DEBUG: 디버그 용도
ex)
2018-11-01 14:37:12.402 UTC [cli.logging] revertLevels -> INFO 001 Logging spec reverted to the peer's spec at startup.
https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/peerlogging.html
peer logging — hyperledger-fabricdocs master documentation
Docs » Commands Reference » peer logging Edit on GitHub peer logging The peer logging subcommand allows administrators to dynamically view and configure the log levels of a peer. Syntax The peer logging command has the following subcommands: and the foll
hyperledger-fabric.readthedocs.io
'블록체인' 카테고리의 다른 글
하이퍼레저 패브릭 BYFN 튜토리얼 공부 (3) down (0) | 2021.12.17 |
---|---|
하이퍼레저 패브릭 BYFN 튜토리얼 공부 (2) up (0) | 2021.12.17 |
하이퍼레저 패브릭 BYFN 튜토리얼 공부 (1) generate (0) | 2021.12.17 |
이더리움 개발환경 구축 (0) | 2021.05.17 |
이더리움 기본개념 (0) | 2021.05.09 |
댓글