feat(week-05): complete week-05 assignment#79
Open
minij02 wants to merge 1 commit intoBay-17th:mainfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
과제 제출 정보
주차: Week 05
과제 유형:
구현 내용
배운 점 (What I Learned)
이번 주에 배운 것 (2-3가지)
이더리움의 지분 증명(PoS) 합의 알고리즘을 단순한 블록 생성 규칙이 아닌, DAG 탐색 관점에서 생각해 보았습니다.
LMD GHOST: 블록체인의 포크(Fork) 상황을 단순 최장 체인 규칙으로 해결하는 대신, 이를 Weighted DAG 구조로 보고 탐색하는 알고리즘임을 이해했습니다. 루트 블록에서 시작해 매 분기점 노드마다 자식 노드들의 서브트리 가중치(가장 최근 메시지 기준 예치금의 합)를 계산하고, 그중 가중치가 최대인 자식을 선택하는 그리디 + 분할 정복 방식으로 작동합니다. 이는 일반적인 이진 탐색 트리와 달리, 검증자들의 최신 상태에 따라 트리 노드의 가중치가 동적으로 변하는 분산 시스템 특화 탐색 알고리즘이라는 점을 알게 되었습니다.
악의적인 노드를 처벌하는 슬래싱 메커니즘을 충돌 탐지 로직과 구간 탐색 문제와 비교하여 이해해 보았습니다.
검증자가 동일한 높이에 두 개의 다른 블록을 생성하는 '이중 투표'는 해시맵이나 배열에서 같은 키(Key)에 두 개의 다른 값이 들어오는지 검사하는 충돌 탐지 로직과 비슷합니다.
또한, 과거의 투표로 현재 투표를 덮어쓰는 '서라운드 투표(Surround Vote)'를 잡아내는 것은 두 선분(투표의 시작과 끝 에포크)이 주어졌을 때 구간이 완전히 포함되는지를 판별하는 '겹치는 선분 찾기' 문제와 유사하다고 생각했습니다.
3.검증자 생애 주기와 큐 자료구조를 활용한 속도 제어
수많은 검증자가 동시에 네트워크에 진입하거나 이탈하면, 합의에 필요한 전체 지분량(분모)이 급변하여 시스템이 붕괴될 수 있습니다. 이를 막기 위해 이더리움은 검증자들을 즉각 활성화하지 않고 대기열에 넣은 뒤, 선입선출(FIFO) 방식으로 매 에포크마다 정해진 수 만큼만 pop하여 상태를 활성화시킵니다. 이는 단순한 큐 자료구조를 활용해 시스템의 급격한 변동성을 제어하는 실용적이고 안정적인 속도 제한 알고리즘임을 배웠습니다.
어려웠던 점과 해결 방법
어려웠던 점:
NULL
해결 방법:
질문 사항
체크리스트
테스트
제출 규칙
{username}/week-{XX}형식.env파일이 커밋에 포함되지 않음