Blockchain/Testnet

ironfish 노드 v0.1.52 업그레이드 & 하드포크

lowsec 2022. 11. 17. 01:10

Notice

안녕하세요. 아래 포스팅를 통해 ironfish 노드를 설치하여 운영하고 계신 분들께 전달드립니다.
https://lowsec.tistory.com/51

ironfish 인센티브 테스트넷 페이즈2 참여 가이드

Intro Ironfish는 작년 12월에 a16z, 세콰이어, 링크드인 회장, 알랜 하워드 등이 참여한 시리즈A 투자 라운드에서 2700만불을 투자받은 프로젝트입니다. 올해 10월 말에는 ironfish 프로젝트를 진행하고

lowsec.tistory.com


오늘 공식 디스코드에서 v0.1.52 노드 업그레이드 공지와 함께 이중 지불 관련 하드포크 공지가 올라왔습니다. 블록 번호 270,446에서 51% 공격에 의해 double spend attack (이중 지불 공격)이 일어나, 블록 109,270에서 이미 spent로 처리된 자산이 중복 spent 처리되는 일이 있었다고 합니다. 이로 인해 하드포크가 발생하여 일시적으로 체인이 둘로 갈라졌었습니다.

(이 사건 때문인지 모르겠지만 phase 2가 다시 일주일 연장되었습니다.)


공격 및 재단의 대응에 대한 더 자세한 내용은 여기를 참고해주시기 바랍니다. 원인부터 사건 타임라인까지 깔끔하게 정리되어 있네요.

이에 ironfish 재단에서는 모든 노드 오퍼레이터에게 노드 업그레이드 및 체인 복구를 요청합니다. 하드포크 시점에 모든 노드의 동작은 강제 종료되었으며, 노드에 공격에 사용된 270,446 블록이 저장되어 있다면 재시작되지 않기 때문에 아래 내용을 참고하셔서 업그레이드 및 체인 복구를 하시길 바랍니다.

아래는 공식 디스코드의 해당 공지 원문입니다.


We've deployed Iron Fish v0.1.52!

Double Spend Hard Fork
The Iron Fish network went through an outage from Nov 13 to Nov 15. Read more about the incident in the post-mortem document: https://coda.io/d/_dYx7OdjjPfe/2022-11-13-Double-Spend-Fork-WIP_suFRY

chain:hardfork
Any node that accepted the block at sequence 270446 containing a double spend must run the ironfish chain:hardfork command included in this release. The command will repair the node's databases by removing blocks on the chain built on top of the double spend block and by ensuring that any note spent earlier on the chain can correctly be identified as spent.
If you're not sure if you need to run this command, you can run ironfish start to start your node. If your chain contains the double spend block then your node will not start until you run the chain:hardfork command

Other notable changes include:
Optimization: Parallelized Block Downloads Improved syncing speed by parallelizing operations to download blocks from peers and add them to the chain
Optimization: Parallelized Transaction Verification Further improved syncing speed by parallelizing operations needed to verify transactions when adding blocks
Bug Fix: Negative Balances Fixed an issue where notes from transactions created on a fork were being subtracted from the displayed balance twice

Full Changelog: https://github.com/iron-fish/ironfish/compare/v0.1.51...v0.1.52


노드 업그레이드


노드 업그레이드를 위해서는 아래 명령어를 입력합니다. 업그레이드 이후에는 graffiti와 telemetry 설정이 초기화될 수 있으니 다시 세팅해주는 것을 잊지 마세요.

v0.1.52 업그레이드에서는 블록 다운로드 및 검증 과정의 최적화를 통해 동기화 속도를 향상시켰다고 합니다.

# 노드 업데이트
sudo npm update -g ironfish

# telemetry 활성화
ironfish config:set enableTelemetry true

# graffiti 설정
ironfish config:set blockGraffiti "<your graffiti here>"

체인 복구 및 재시작


체인 복구 명령어를 통해 공격 블록 뒤부터 생성된 블록들 (공격자에 의해 생성된 체인)을 모두 삭제하고, 노드의 데이터베이스를 복구하여 올바르게 동기화가 이루어지도록 합니다. 현재 체인 복구 진행 중인데 예상 시간은 안나오네요;

ironfish chain:hardfork
Repairing blockchain: [----------------------------------------] 0% | 2003 / 270662 blocks | 36/bps | 2743/nps | ETA

ironfish start