Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deployment: add scripts to set up full nodes using state sync #25

Merged
merged 1 commit into from
Jan 10, 2023

Conversation

j75689
Copy link
Contributor

@j75689 j75689 commented Jan 9, 2023

Description

Add scripts to set up full nodes using state sync.

Rationale

  1. launch a local validator cluster.
bash ./deployment/localup/localup.sh all
  1. launch a fullnode cluster.
bash ./deployment/localup/localup_fullnode.sh all

The fullnode will be synced by statesync.

{"level":"info","module":"statesync","format":2,"hash":"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\b\u001dg}\ufffd\ufffd\ufffd\u007f\ufffdt8\ufffdu\ufffdg\u0010b[\ufffd#\b6:\ufffd\u000fq","height":130,"time":"2023-01-09T17:28:17+08:00","message":"Discovered new snapshot"}
{"level":"info","module":"statesync","format":2,"hash":"\ufffdO\ufffd\u001b\ufffd(\ufffd\ufffd\ufffdE\ufffdF\ufffd.\ufffd\ufffd\ufffd\ufffd?\r\ufffd[\ufffd\ufffd\u000e\ufffd\ufffdw\ufffdI\ufffd\ufffd","height":120,"time":"2023-01-09T17:28:17+08:00","message":"Discovered new snapshot"}
{"level":"info","module":"statesync","format":2,"hash":"KZ\ufffd\u0017\u007f`B\u0001̹\ufffd2\ufffd\u00022^\ufffd\u001c\ufffdF\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffdU%\ufffd\u0017\ufffd","height":110,"time":"2023-01-09T17:28:17+08:00","message":"Discovered new snapshot"}
{"level":"info","module":"statesync","format":2,"hash":"\ufffd)\u0002+u o\u0006\u0014\u001ab\ufffdm\ufffd\ufffdp\ufffdtï:\ufffdӽ\ufffd\u0005[\ufffd?\u0010\ufffd\ufffd","height":100,"time":"2023-01-09T17:28:17+08:00","message":"Discovered new snapshot"}
{"level":"info","module":"statesync","format":2,"hash":"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd垲;\u000b\u000f\ufffdҠ\ufffd鲈5\ufffd\ufffd&\ufffdL\ufffd\ufffdN","height":90,"time":"2023-01-09T17:28:17+08:00","message":"Discovered new snapshot"}
{"level":"info","module":"statesync","format":2,"hash":"Ӓ'\ufffdޚ\ufffd\u0017#\ufffd\ufffd\ufffd=׾\ufffd\u0012\ufffdE\ufffd}\ufffdL\ufffd\ufffd1\ufffd\ufffd\ufffd","height":80,"time":"2023-01-09T17:28:17+08:00","message":"Discovered new snapshot"}
{"level":"info","module":"statesync","format":2,"hash":"\ufffd\ufffd\u000eU\ufffdrz>\ufffd\ufffdB\ufffd3)\ufffdY\u001d\ufffd\ufffdJ\ufffd7\ufffd\ufffdsI\ufffd{\ufffd\ufffd\ufffd\ufffd","height":70,"time":"2023-01-09T17:28:17+08:00","message":"Discovered new snapshot"}
{"level":"info","module":"statesync","format":2,"hash":"\ufffd\ufffd\ufffd\ufffd#ZKP\ufffdM~l\ufffdx\ufffd\ufffd\ufffdT\"0\ufffd\b\ufffdϙ\u0010%g\u0001jb\ufffd","height":60,"time":"2023-01-09T17:28:17+08:00","message":"Discovered new snapshot"}
{"level":"info","module":"statesync","format":2,"hash":"\ufffdܕ\u0013\ufffd\ufffdP\ufffda\ufffd\ufffdA\ufffdW\ufffdbzB\ufffd\ufffdy\ufffd;\te\ufffd\ufffd\ufffdT\u0001MC","height":50,"time":"2023-01-09T17:28:17+08:00","message":"Discovered new snapshot"}
{"level":"info","module":"statesync","format":2,"hash":"ľ\ufffd\ufffd\ufffd\u0015\ufffd2\ufffd6\ufffd\ufffd\ufffd\u0011\ufffd\ufffd\ufffd\u000e\ufffd\ufffdx\u000e_\ufffd\ufffd2\u0003VU\u0010\ufffd\ufffd","height":40,"time":"2023-01-09T17:28:17+08:00","message":"Discovered new snapshot"}
{"level":"info","module":"statesync","module":"light","hash":"EA6DFE58BC6179A840EB1B7BB12DB05702BE35DFCD4A2A59EC681A67A5AB9121","height":131,"time":"2023-01-09T17:28:32+08:00","message":"VerifyHeader"}
{"level":"info","module":"statesync","module":"light","hash":"B5DF629512B4D6600E35B6AE37AD975FF840AA82BAF444FDECA9F442AC63BF17","height":132,"time":"2023-01-09T17:28:32+08:00","message":"VerifyHeader"}
{"level":"info","module":"statesync","format":2,"hash":"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\b\u001dg}\ufffd\ufffd\ufffd\u007f\ufffdt8\ufffdu\ufffdg\u0010b[\ufffd#\b6:\ufffd\u000fq","height":130,"time":"2023-01-09T17:28:32+08:00","message":"Offering snapshot to ABCI app"}
{"level":"info","module":"statesync","format":2,"hash":"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\b\u001dg}\ufffd\ufffd\ufffd\u007f\ufffdt8\ufffdu\ufffdg\u0010b[\ufffd#\b6:\ufffd\u000fq","height":130,"time":"2023-01-09T17:28:32+08:00","message":"Snapshot accepted, restoring"}
{"level":"info","module":"statesync","chunk":0,"format":2,"height":130,"total":1,"time":"2023-01-09T17:28:32+08:00","message":"Fetching snapshot chunk"}
{"level":"info","module":"statesync","module":"light","hash":"362251313FEA74E864F1DC2EE0806DA9A51847D840E8D7A2ABEA08DA6EA15C57","height":130,"time":"2023-01-09T17:28:32+08:00","message":"VerifyHeader"}
{"level":"info","module":"statesync","module":"light","hash":"EA6DFE58BC6179A840EB1B7BB12DB05702BE35DFCD4A2A59EC681A67A5AB9121","height":131,"time":"2023-01-09T17:28:32+08:00","message":"Header has already been verified"}
{"level":"info","module":"statesync","module":"light","hash":"B5DF629512B4D6600E35B6AE37AD975FF840AA82BAF444FDECA9F442AC63BF17","height":132,"time":"2023-01-09T17:28:32+08:00","message":"Header has already been verified"}
{"level":"info","module":"statesync","module":"light","hash":"EA6DFE58BC6179A840EB1B7BB12DB05702BE35DFCD4A2A59EC681A67A5AB9121","height":131,"time":"2023-01-09T17:28:32+08:00","message":"Header has already been verified"}
{"level":"info","module":"statesync","module":"light","hash":"362251313FEA74E864F1DC2EE0806DA9A51847D840E8D7A2ABEA08DA6EA15C57","height":130,"time":"2023-01-09T17:28:32+08:00","message":"Header has already been verified"}
{"level":"info","module":"statesync","chunk":0,"format":2,"height":130,"total":1,"time":"2023-01-09T17:28:33+08:00","message":"Applied snapshot chunk to ABCI app"}
{"level":"info","module":"statesync","appHash":"\ufffd\ufffd.Vz)\ufffd\ufffdx\u0013s\u0003v\ufffd1\ufffd\u001e\ufffd\r\ufffd3 :\u0015\ufffdl\ufffd\ufffdy","height":130,"time":"2023-01-09T17:28:33+08:00","message":"Verified ABCI app"}
{"level":"info","module":"statesync","format":2,"hash":"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\b\u001dg}\ufffd\ufffd\ufffd\u007f\ufffdt8\ufffdu\ufffdg\u0010b[\ufffd#\b6:\ufffd\u000fq","height":130,"time":"2023-01-09T17:28:33+08:00","message":"Snapshot restored"}
{"level":"info","module":"blockchain","impl":"BlockPool","msg":{},"time":"2023-01-09T17:28:33+08:00","message":"service start"}
{"level":"info","module":"state","height":131,"num_invalid_txs":0,"num_valid_txs":0,"time":"2023-01-09T17:28:33+08:00","message":"executed block"}
{"level":"info","commit":"436F6D6D697449447B5B323034203132332032323520322036352034312039322032333520323139203231362032333120323332203130332039392032333820313132203636203630203137392032343720313032203136322031383920323335203134382033332032382031393720373720323231203335203235335D3A38337D","time":"2023-01-09T17:28:33+08:00","message":"commit synced"}
...
  1. wait for fullnodes catches up on the latest block.
  2. check the status for fullnode
curl -s http://localhost:26850/block

{"jsonrpc":"2.0","id":-1,"result":{"block_id":{"hash":"7F3B1DE4504D4F8EDF36A3BF6495E3B4B5C5BE19103BC9A3FD6DAF38B08061C5","parts":{"total":1,"hash":"4D825E9E5B36D867850F54AAC5A1C043E53D405FECC4AFA45758974C273457D6"}},"block":{"header":{"version":{"block":"11"},"chain_id":"inscription_9000-121","height":"137","time":"2023-01-09T09:28:30.929448Z","last_block_id":{"hash":"D926583827E3B3E8B28BA8B133B13EACFE413F90BC5BD1DBF123118B13245389","parts":{"total":1,"hash":"0EB5DFDB58439C18B156267325139E5EA15B640817F9BFBC99EFF014BE8C5E6D"}},"last_commit_hash":"8551628D5B5DBDA493C27E16FB0CDEF0C8CE0BE6C93A49DEC03D4E382FCFDB51","data_hash":"E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855","validators_hash":"B3188B9F3B07D683D140B51167EB21773C16A55957EC7DB0594E7DDBF0E9F0F6","next_validators_hash":"B3188B9F3B07D683D140B51167EB21773C16A55957EC7DB0594E7DDBF0E9F0F6","consensus_hash":"048091BC7DDC283F77BFBF91D73C44DA58C3DF8A9CBC867405D8B7F3DAADA22F","app_hash":"EB443536CFBA7BB621905CF2755A00156127D7A6009933B1BACA9D18644AC42A","last_results_hash":"E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855","evidence_hash":"E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855","proposer_address":"870688E79DF5BCEB55F9C5CA53AB565B4830ED88"},"data":{"txs":[]},"evidence":{"evidence":[]},"last_commit":{"height":"136","round":0,"block_id":{"hash":"D926583827E3B3E8B28BA8B133B13EACFE413F90BC5BD1DBF123118B13245389","parts":{"total":1,"hash":"0EB5DFDB58439C18B156267325139E5EA15B640817F9BFBC99EFF014BE8C5E6D"}},"signatures":[{"block_id_flag":2,"validator_address":"13E407A1D9BCE44B2EB26322A02AC0C689AFB95D","timestamp":"2023-01-09T09:28:30.92945Z","signature":"ejoX1H5lNDEG9Uf/ESJgd937MV7ikhyjCjSc8re6GOfHoEg2wqDGhWTF84QLugxPf3dLoCHWayg7Ih8w9jutAQ=="},{"block_id_flag":2,"validator_address":"870688E79DF5BCEB55F9C5CA53AB565B4830ED88","timestamp":"2023-01-09T09:28:30.910394Z","signature":"a7P12YIvLtXU+WmkegOsRuVuQaEB4nYrHa5rKtoehH1/kraxeuOBjGPRdW+ZvZKy1Dq9qzWdGC6sTeGs/ojFDA=="},{"block_id_flag":2,"validator_address":"904ABB08685EB2B82F863A1EE00C8073E8A706D0","timestamp":"2023-01-09T09:28:30.929448Z","signature":"VOs70F62L45zFLjHkz2aktuXRtLerYYzUHGMr/byuwYcNG3iKrAih5m/8cWGt9aOxJvID6QTvwFMccjj/HowDg=="}]}}}}

Example

bash ./deployment/localup/localup_fullnode.sh all

see more details: ./deployment/readme.md

Changes

Notable changes:

  • deployment

@unclezoro unclezoro added the r4r label Jan 10, 2023
@unclezoro unclezoro merged commit 3eb075c into develop Jan 10, 2023
This was referenced Jan 19, 2023
@unclezoro unclezoro deleted the deploy/fullnode branch April 18, 2023 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants