[G1-Sync] Manual knowledge update
This commit is contained in:
@@ -2,91 +2,289 @@
|
||||
id: wiki-2026-0508-blockchain
|
||||
title: Blockchain
|
||||
category: 10_Wiki/Topics
|
||||
status: needs_review
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [P-Reinforce-AUTO-BLOC-001]
|
||||
aliases: [블록체인, distributed ledger, smart contract, Ethereum, Bitcoin, web3, ZK proof, rollup]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.96
|
||||
tags: [auto-reinforced, blockchain, decentralization, cryptography, trust, distributed-ledger]
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [blockchain, ethereum, bitcoin, smart-contract, web3, zk-rollup, defi, nft, ai-blockchain]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-04-20
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
|
||||
tech_stack:
|
||||
language: unspecified
|
||||
framework: unspecified
|
||||
language: Solidity / Rust
|
||||
framework: Ethereum / Solana / Cosmos
|
||||
---
|
||||
|
||||
# [[Blockchain|Blockchain]]
|
||||
# Blockchain
|
||||
|
||||
## 📌 한 줄 통찰 (The Karpathy Summary)
|
||||
> "신뢰의 기술적 구현: 중앙 집중된 관리자 없이도, 분산된 참여자 모두가 장부를 공동으로 관리하고 암호학적으로 검증함으로써 위변조가 불가능한 거래 기록을 공유하는 '디지털 신뢰 기계'."
|
||||
## 📌 한 줄 통찰
|
||||
> **"매 신뢰 의 technical implementation"**. 매 central authority X — 매 distributed + 매 cryptographic verification. 매 currency 의 base. 매 smart contract → 매 programmable trust. 매 modern: 매 ZK rollup + AI provenance.
|
||||
|
||||
## 📖 구조화된 지식 (Synthesized Content)
|
||||
블록체인(Blockchain)은 데이터를 블록 단위로 생성하여 체인 형태로 연결하고, 이를 여러 노드에 분산 저장하는 기술입니다.
|
||||
## 📖 핵심
|
||||
|
||||
1. **핵심 메커니즘**:
|
||||
* **Decentralization**: 특정 서버가 아닌 참여자 모두가 데이터를 가짐.
|
||||
* **Immutability (불변성)**: 해시 함수의 연결성을 통해 한 번 기록된 데이터를 고치는 게 사실상 불가능함. ([[Availability-and-Persistence|Availability-and-Persistence]]와 연결)
|
||||
* **Consensus Algorithm**: 무엇이 진짜 장부인지 합의하는 규칙 (PoW, PoS 등).
|
||||
2. **왜 중요한가?**:
|
||||
* 은행 같은 중개자 없이도 가치(Value)와 정보(Information)를 직접 주고받을 수 있는 프로토콜 경제를 가능케 함.
|
||||
### 매 핵심 mechanism
|
||||
1. **Decentralization**: 매 single server X.
|
||||
2. **Immutability**: 매 hash chain 의 변경 의 X.
|
||||
3. **Consensus**: 매 누가 매 next block.
|
||||
4. **Cryptographic verification**: 매 transaction 의 sign.
|
||||
5. **Transparency**: 매 public ledger.
|
||||
|
||||
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
|
||||
- **과거 데이터와의 충돌**: 초기 정책은 오직 화폐(비트코인)에만 집중했으나, 현대 정책은 계약을 자동 집행하는 '스마트 컨트랙트(이더리움) 정책'과 데이터 무결성 증명 정책으로 확장됨(RL Update).
|
||||
- **정책 변화(RL Update)**: AI 지식 생태계 정책에서, 데이터의 출처(Provenance)와 학습 기여도를 투명하게 기록하고 보상하는 'AI x Blockchain 융합 정책'이 저작권 및 공정 보상 이슈의 해결책으로 떠오름.
|
||||
### Consensus algorithm
|
||||
| Algorithm | 매 사용 |
|
||||
|---|---|
|
||||
| Proof of Work (PoW) | Bitcoin, 매 energy ↑ |
|
||||
| Proof of Stake (PoS) | Ethereum 2.0, 매 energy ↓ |
|
||||
| Delegated PoS (DPoS) | EOS, Tron |
|
||||
| Proof of Authority (PoA) | private chain |
|
||||
| BFT (PBFT, Tendermint) | Cosmos, Hyperledger |
|
||||
| Avalanche | Avalanche L1 |
|
||||
|
||||
## 🔗 지식 연결 (Graph)
|
||||
- [[AI & Data Sovereignty|AI & Data Sovereignty]], [[Availability-and-Persistence|Availability-and-Persistence]], Pattern Recognition, [[Information-Theory|Information-Theory]], [[Ethics & AI|Ethics & AI]]
|
||||
- **Modern Tech/Tools**: Ethereum (Smart Contracts), Hyperledger, IPFS (Distributed [[Storage|Storage]]).
|
||||
---
|
||||
### 매 evolution
|
||||
1. **Bitcoin** (2009): 매 digital currency.
|
||||
2. **Ethereum** (2015): 매 smart contract.
|
||||
3. **L2 / Rollup** (2021+): 매 scale.
|
||||
4. **ZK Rollup** (2023+): 매 zero-knowledge.
|
||||
5. **Modular** (2024+): 매 Celestia 등 의 specialization.
|
||||
|
||||
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
|
||||
### 매 stack (Ethereum)
|
||||
- **L1**: Ethereum mainnet.
|
||||
- **L2 Optimistic**: Arbitrum, Optimism, Base.
|
||||
- **L2 ZK**: zkSync, StarkNet, Polygon zkEVM, Scroll.
|
||||
- **L3**: app-specific rollup.
|
||||
- **Bridge**: 매 cross-chain.
|
||||
- **Oracle**: Chainlink, Pyth.
|
||||
|
||||
**언제 이 지식을 쓰는가:**
|
||||
- *(TODO)*
|
||||
### 매 EVM 대 alternative
|
||||
- **EVM** (Solidity): 매 dominant.
|
||||
- **Solana** (Rust + Sealevel): 매 high TPS.
|
||||
- **Aptos / Sui** (Move): 매 secure 모음.
|
||||
- **Cosmos** (Tendermint): 매 sovereignty.
|
||||
- **Near**: 매 sharded.
|
||||
|
||||
**언제 쓰면 안 되는가:**
|
||||
- *(TODO)*
|
||||
### 매 application
|
||||
- **DeFi**: lending, DEX (Uniswap), derivatives.
|
||||
- **NFT**: art, gaming, identity.
|
||||
- **DAO**: governance.
|
||||
- **Stablecoin**: USDC, USDT, DAI.
|
||||
- **Gaming**: 매 ownership.
|
||||
- **Identity**: 매 self-sovereign.
|
||||
- **Provenance**: 매 supply chain, art.
|
||||
|
||||
## 🧪 검증 상태 (Validation)
|
||||
### AI × Blockchain
|
||||
1. **Provenance**: 매 training data 의 source.
|
||||
2. **Royalty**: 매 contributor 의 보상.
|
||||
3. **Decentralized inference**: 매 Bittensor.
|
||||
4. **Compute marketplace**: 매 Render, Akash.
|
||||
5. **AI agent payment**: 매 X402, 매 micropayment.
|
||||
6. **Verifiable inference** (ZK-ML): 매 proof.
|
||||
|
||||
- **정보 상태:** needs_review
|
||||
- **출처 신뢰도:** A
|
||||
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
|
||||
### 매 modern issue
|
||||
1. **Energy** (PoW): 매 Bitcoin 의 GW-scale.
|
||||
2. **Scaling**: 매 L1 의 limit.
|
||||
3. **UX**: 매 wallet, 매 gas, 매 seed phrase.
|
||||
4. **Regulation**: 매 SEC vs CFTC, 매 EU MiCA.
|
||||
5. **Hack**: 매 매 year 의 Billion-scale theft.
|
||||
6. **Speculation**: 매 utility ≠ 매 price.
|
||||
|
||||
## 🧬 중복 검사 (Duplicate Check)
|
||||
### 매 ZK proof (modern)
|
||||
- **zk-SNARK** (Groth16, Plonk): 매 succinct.
|
||||
- **zk-STARK**: 매 transparent (no trusted setup), 매 post-quantum.
|
||||
- 매 응용: 매 rollup, 매 privacy, 매 ML inference verify.
|
||||
|
||||
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
|
||||
- **처리 방식:** UPDATE (자동 정규화)
|
||||
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
|
||||
## 💻 패턴
|
||||
|
||||
## 🕓 변경 이력 (Changelog)
|
||||
### Solidity (smart contract)
|
||||
```solidity
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|
||||
|------|-----------|-----------|--------|
|
||||
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
|
||||
|
||||
## 💻 코드 패턴 (Code Patterns)
|
||||
|
||||
**패턴 1:** *(TODO: 이 프로젝트 컨벤션 반영한 구조 스켈레톤)*
|
||||
|
||||
```text
|
||||
# TODO
|
||||
contract SimpleStorage {
|
||||
uint256 private value;
|
||||
address public owner;
|
||||
|
||||
event ValueChanged(uint256 newValue, address indexed setter);
|
||||
|
||||
constructor() {
|
||||
owner = msg.sender;
|
||||
}
|
||||
|
||||
modifier onlyOwner() {
|
||||
require(msg.sender == owner, "Not owner");
|
||||
_;
|
||||
}
|
||||
|
||||
function set(uint256 _value) external onlyOwner {
|
||||
value = _value;
|
||||
emit ValueChanged(_value, msg.sender);
|
||||
}
|
||||
|
||||
function get() external view returns (uint256) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 🤔 의사결정 기준 (Decision Criteria)
|
||||
### Hardhat (Ethereum dev)
|
||||
```js
|
||||
// hardhat.config.js
|
||||
module.exports = {
|
||||
solidity: '0.8.20',
|
||||
networks: {
|
||||
sepolia: { url: process.env.SEPOLIA_RPC, accounts: [process.env.PRIVATE_KEY] },
|
||||
mainnet: { url: process.env.MAINNET_RPC, accounts: [process.env.PRIVATE_KEY] },
|
||||
},
|
||||
};
|
||||
|
||||
**선택 A를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
// scripts/deploy.js
|
||||
const hre = require('hardhat');
|
||||
|
||||
**선택 B를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
async function main() {
|
||||
const Storage = await hre.ethers.getContractFactory('SimpleStorage');
|
||||
const storage = await Storage.deploy();
|
||||
await storage.waitForDeployment();
|
||||
console.log('Deployed to:', await storage.getAddress());
|
||||
}
|
||||
|
||||
**기본값:**
|
||||
> *(TODO)*
|
||||
main().catch(console.error);
|
||||
```
|
||||
|
||||
## ❌ 안티패턴 (Anti-Patterns)
|
||||
### viem (frontend interaction)
|
||||
```ts
|
||||
import { createPublicClient, createWalletClient, http, parseAbi } from 'viem';
|
||||
import { mainnet } from 'viem/chains';
|
||||
|
||||
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
|
||||
const client = createPublicClient({ chain: mainnet, transport: http() });
|
||||
|
||||
const abi = parseAbi(['function get() view returns (uint256)']);
|
||||
const value = await client.readContract({
|
||||
address: '0x...',
|
||||
abi,
|
||||
functionName: 'get',
|
||||
});
|
||||
```
|
||||
|
||||
### NFT (ERC-721)
|
||||
```solidity
|
||||
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
|
||||
|
||||
contract MyNFT is ERC721 {
|
||||
uint256 public nextTokenId;
|
||||
|
||||
constructor() ERC721("MyNFT", "MNFT") {}
|
||||
|
||||
function mint(address to) external {
|
||||
_safeMint(to, nextTokenId++);
|
||||
}
|
||||
|
||||
function tokenURI(uint256 tokenId) public view override returns (string memory) {
|
||||
return string(abi.encodePacked('ipfs://my-cid/', _toString(tokenId), '.json'));
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### DAO governance (Snapshot)
|
||||
```ts
|
||||
// 매 token holder 의 vote
|
||||
const proposal = {
|
||||
title: 'Increase treasury allocation',
|
||||
choices: ['For', 'Against', 'Abstain'],
|
||||
start: Date.now(),
|
||||
end: Date.now() + 7 * 86400 * 1000,
|
||||
snapshot: latestBlock,
|
||||
network: '1',
|
||||
strategies: [
|
||||
{ name: 'erc20-balance-of', params: { address: tokenAddress, decimals: 18 } },
|
||||
],
|
||||
};
|
||||
// 매 IPFS 의 post + 매 sign.
|
||||
```
|
||||
|
||||
### ZK-ML proof (verify inference)
|
||||
```python
|
||||
# 매 EZKL 의 ONNX 의 ZK proof 로 변환
|
||||
import ezkl
|
||||
import torch
|
||||
|
||||
# 매 model export
|
||||
torch.onnx.export(model, dummy_input, 'model.onnx')
|
||||
|
||||
# 매 setup
|
||||
ezkl.gen_settings('model.onnx', 'settings.json')
|
||||
ezkl.compile_circuit('model.onnx', 'circuit.ezkl', 'settings.json')
|
||||
|
||||
# 매 prove
|
||||
ezkl.prove('input.json', 'circuit.ezkl', 'pk.key', 'proof.json')
|
||||
|
||||
# 매 verify (on-chain or off-chain)
|
||||
ezkl.verify('proof.json', 'settings.json', 'vk.key')
|
||||
```
|
||||
|
||||
→ 매 inference correctness 의 zero-knowledge.
|
||||
|
||||
### Provenance (content authenticity)
|
||||
```solidity
|
||||
contract ContentProvenance {
|
||||
struct Record {
|
||||
string contentHash; // keccak256 of content
|
||||
address creator;
|
||||
uint256 timestamp;
|
||||
string metadataURI; // ipfs://...
|
||||
}
|
||||
|
||||
mapping(bytes32 => Record) public records;
|
||||
|
||||
function register(string calldata contentHash, string calldata metadataURI) external {
|
||||
bytes32 id = keccak256(abi.encodePacked(contentHash, msg.sender));
|
||||
records[id] = Record(contentHash, msg.sender, block.timestamp, metadataURI);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 🤔 결정 기준
|
||||
| 응용 | Chain |
|
||||
|---|---|
|
||||
| DeFi (max liquidity) | Ethereum L1 |
|
||||
| Cheap UX | L2 (Base, Arbitrum) |
|
||||
| High TPS | Solana |
|
||||
| Privacy | zkSync, StarkNet, Aztec |
|
||||
| Gaming | L2 / sidechain |
|
||||
| Enterprise / consortium | Hyperledger / Polygon CDK |
|
||||
| AI inference | Bittensor, EZKL |
|
||||
| Stablecoin | Ethereum + L2 |
|
||||
|
||||
**기본값**: L2 (Base / Arbitrum) 의 entry. 매 use case 의 specific chain.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Distributed-Systems]] · [[Cryptography]] · [[Web3]]
|
||||
- 변형: [[Bitcoin]] · [[Ethereum]] · [[Solana]] · [[Cosmos]]
|
||||
- 응용: [[DeFi]] · [[NFT]] · [[DAO]] · [[Stablecoin]] · [[Smart-Contract]]
|
||||
- L2: [[Optimistic-Rollup]] · [[ZK-Rollup]] · [[zkSync]] · [[StarkNet]]
|
||||
- AI 결합: [[ZK-ML]] · [[Bittensor]] · [[Render-Network]] · [[Content-Provenance]] · [[C2PA]]
|
||||
- Adjacent: [[Anarchism]] · [[Authenticity]] · [[Cypherpunk]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: 매 web3 system design. 매 smart contract review. 매 AI 의 provenance / royalty.
|
||||
**언제 X**: 매 simple problem (centralized 의 enough). 매 high TPS + low latency 의 strict.
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **Centralized 의 force on blockchain**: 매 cost ↑, 매 benefit X.
|
||||
- **No audit (smart contract)**: 매 hack risk.
|
||||
- **Unchecked external call**: 매 reentrancy.
|
||||
- **On-chain large data**: 매 cost (use IPFS).
|
||||
- **No upgrade plan**: 매 immutable bug.
|
||||
- **Speculation 의 only**: 매 utility X.
|
||||
- **PoW 의 default**: 매 energy 의 unjustified.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (Ethereum yellow paper, Solana whitepaper, zk-rollup papers).
|
||||
- 신뢰도 A.
|
||||
- Related: [[Smart-Contract]] · [[ZK-ML]] · [[DAO]] · [[Authenticity]] · [[Anarchism]].
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — consensus + L2 + AI×Blockchain + 매 Solidity / viem / EZKL code |
|
||||
|
||||
Reference in New Issue
Block a user