일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- 티스토리챌린지
- 러스트 기초 학습
- Vue
- ethers type
- ethers typescript
- 러스트기초
- 러스트 기초
- ethers v6
- ambiguous function description
- 계정추상화
- erc4337 contract
- multicall
- vue기초
- 컨트렉트 동일한 함수이름 호출
- 스마트 컨트렉트 함수이름 중복
- 컨트렉트 배포 자동화
- 스마트컨트렉트테스트
- SBT표준
- 스마트컨트렉트 예약어 함수이름 중복
- 오블완
- Vue.js
- 스마트컨트렉트 함수이름 중복 호출
- chainlink 설명
- ethers
- 체인의정석
- rust 기초
- git rebase
- erc4337
- ethers websocket
- 머신러닝기초
- Today
- Total
체인의정석
Chain link 서비스 분석 - 기본 아키텍쳐 본문
체인링크의 기본 아키텍쳐에 대해서 알아보았다.
https://docs.chain.link/docs/architecture-overview/
Data Feeds Architecture | Chainlink Documentation
docs.chain.link
크게 3가지로 나누는 거같다.
1. 기본 요청 모델 - 1대 1로 요청에 대해 응답하는 것으로 아래 사이트에서 확인 가능
등록해두면 Id를 받아서
https://docs.chain.link/docs/any-api/get-request/introduction/
Make a GET Request | Chainlink Documentation
Learn how to make a GET request to an API from a smart contract, using Chainlink.
docs.chain.link
2. 탈중앙화된 데이터 모델 - 다양한 오라클로 부터 데이터를 받아오는 모델
https://docs.chain.link/docs/architecture-decentralized-model/
Decentralized Data Model | Chainlink Documentation
This page describes the decentralized architecture which enables Chainlink to aggregate data from multiple independent node operators.
docs.chain.link
보면 보상을 받고 데이터를 제공해 주는 여러개의 오라클들의 값들이 모여서 하나의 통일된 가격을 보여줌을 알 수 있다.
그럼 소비자의 입장에서는
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
contract PriceConsumerV3 {
AggregatorV3Interface internal priceFeed;
/**
* Network: Goerli
* Aggregator: ETH/USD
* Address: 0xD4a33860578De61DBAbDc8BFdb98FD742fA7028e
*/
constructor() {
priceFeed = AggregatorV3Interface( 0xD4a33860578De61DBAbDc8BFdb98FD742fA7028e);
}
/**
* Returns the latest price
*/
function getLatestPrice() public view returns (int) {
(
/*uint80 roundID*/,
int price,
/*uint startedAt*/,
/*uint timeStamp*/,
/*uint80 answeredInRound*/
) = priceFeed.latestRoundData();
return price;
}
}
요런식으로 컨트렉트에 접근해서 값을 리턴 받을 수 있다. 이건 기본 튜토리얼 코드에도 나와 있는 코드이다.
https://docs.chain.link/docs/consuming-data-feeds/
Consuming Data Feeds | Chainlink Documentation
Learn how to consume Chainlink Data Feeds in your smart contracts.
docs.chain.link
3. off -chain 보고 : OCR이라고도 부르며 체인링크의 확장성을 위하여서 노드간의 P2P 네트워크로 통신 진행. 따로 합의 알고리즘도 돌림. 여러 노드들이 합의알고리즘을 돌려서 도출된 하나의 트랜잭션을 실행시키는 것.
https://docs.chain.link/docs/off-chain-reporting/
Off-Chain Reporting | Chainlink Documentation
docs.chain.link
그냥 요약하자면 오프체인에서 P2P 통신을 합의알고리즘을 가지고 돌려서 가스비를 아끼고 연산량을 줄이는 레이어 2 같은 기술
=> 검증 과정을 오프체인에서 진행하고 온체인에는 하나의 노드가 트랜잭션을 실행시켜서 업데이트 시킴
영상은 아래 링크에서 확인 가능하다.
https://www.youtube.com/playlist?list=PLVP9aGDn-X0Q3qBME3T9sBMw66xPsglMA
Two-Minute Explainers
Learn more about Chainlink and the blockchain industry in general by viewing these two-minute explainer videos that simplify complex concepts into easy-to-un...
www.youtube.com
'블록체인 > 퍼블릭 블록체인' 카테고리의 다른 글
Dapp 속도 최적화 시키는데 필수! Multicall 불러와서 상호작용하기 (0) | 2023.01.03 |
---|---|
컨트렉트 지갑 및 어셈블리어 참고 링크 (업데이트) (0) | 2022.09.15 |
Chain link 서비스 분석 - chain link VRF 분석 (0) | 2022.09.13 |
블록체인 아키텍쳐) 블록체인에서의 Layer 구분 (0) | 2022.08.29 |
테스트 코드에서 이더리움을 전송하는 방법 (0) | 2022.08.13 |