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

[chain] Defer State Root Generation #425

Merged
merged 33 commits into from
Sep 1, 2023
Merged

[chain] Defer State Root Generation #425

merged 33 commits into from
Sep 1, 2023

Conversation

patrick-ogrady
Copy link
Contributor

@patrick-ogrady patrick-ogrady commented Aug 27, 2023

Resolves: #399

TODO

  • update readme with explanation of how this works (block contains root of parent post-execution)
    • update block.StatefulBlock comment
  • ensure state sync logic isn't broken (accepted state at end is that of parent, not of accepted block)
  • add metric for waiting for root
  • limit concurrency of x/merkledb to prevent thrashing: [x/merkledb] Add Configuration for RootGenConcurrency avalanchego#1936
    • ensure only 1 root is being generated at a time (merkledb may try to generate multiple roots at once, exceeding the CPU limit) -> run queue in vm (need to prevent out-of-band calls to GetMerkleRoot)
  • add accept depth to load test: [tests] Defer Accept in Load Tests #424
  • Verify signatures are correct before creating child view
  • ensure 1 block above sync is added (need parent block to verify a block) or allow for fetching missing blocks in certain circumstances over the wire put all data required to verify a block in state (so don't need parent block)
  • Remove dependency on parent block during verification: [chain] Remove Parent Block Dependency during Verify #427

Block.Build Latency

We use block.Build for this comparison because all signatures are pre-verified (when a tx is added to the mempool) and we just want to test the savings when root generation is deferred with no other async jobs running (i.e. tx verification).

Before

[08-31|13:30:01.937] INFO load/load_test.go:339 block generation {"t": "4.546424333s", "avg(ms)": 96, "tps": 109976.53614748943}

After (~22.9% reduction)

[08-31|13:28:25.782] INFO load/load_test.go:347 block generation {"t": "3.488638958s", "avg(ms)": 74, "tps": 143322.36898674225}

@patrick-ogrady patrick-ogrady mentioned this pull request Aug 27, 2023
4 tasks
@patrick-ogrady
Copy link
Contributor Author

initial status...not too much faster because wait signatures is much slower (all cores used by hashing):
image

chain/block.go Outdated Show resolved Hide resolved
vm/vm.go Outdated Show resolved Hide resolved
vm/vm.go Outdated Show resolved Hide resolved
@patrick-ogrady
Copy link
Contributor Author

Tested flow for processing:

[sync] [08-27|22:15:18.858] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> vm/vm.go:634 parsed block {"id": "jBXME9wSHeNAzxfAbC5Ew95FgD9ddA8yJaTaVSkjM6ink5Arv", "height": 1169}
[bootstrap] [08-27|22:15:18.858] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> vm/vm.go:634 parsed block {"id": "jBXME9wSHeNAzxfAbC5Ew95FgD9ddA8yJaTaVSkjM6ink5Arv", "height": 1169}
[bootstrap] [08-27|22:15:18.860] DEBUG <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> builder/time.go:86 notifying to build without waiting {"txs": 0}
[bootstrap] [08-27|22:15:18.860] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> vm/resolutions.go:114 verified block {"blkID": "jBXME9wSHeNAzxfAbC5Ew95FgD9ddA8yJaTaVSkjM6ink5Arv", "height": 1169, "txs": 0, "state ready": true, "unit prices": [100,100,100,100,100], "units consumed": [0,0,0,0,0]}
[bootstrap] [08-27|22:15:18.860] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:625 merkle root generated {"height": 1169, "blkID": "jBXME9wSHeNAzxfAbC5Ew95FgD9ddA8yJaTaVSkjM6ink5Arv", "root": "KHVmuC1P8qeJwB5JLATP2s4Wg7i1ofLb8MCve5hp4Htg28wep"}
[sync] [08-27|22:15:18.860] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:769 block not processed {"height": 1168, "blkID": "2tbuHvaUjfqQXGB4NZBtun8Py8pHQADw3vvLPviJMoRene1zYr", "attemptVerify": true}
[sync] [08-27|22:15:18.860] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:806 verifying block when view requested {"height": 1168, "blkID": "2tbuHvaUjfqQXGB4NZBtun8Py8pHQADw3vvLPviJMoRene1zYr"}
[sync] [08-27|22:15:18.860] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:769 block not processed {"height": 1167, "blkID": "R3ZEtNEE284AQjJnHP45DppXyMc2kVw2uwdBTpH4kguBPYcjf", "attemptVerify": true}
[sync] [08-27|22:15:18.860] DEBUG <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> builder/time.go:86 notifying to build without waiting {"txs": 0}
[sync] [08-27|22:15:18.860] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:625 merkle root generated {"height": 1168, "blkID": "2tbuHvaUjfqQXGB4NZBtun8Py8pHQADw3vvLPviJMoRene1zYr", "root": "Uukwy5NMv6rHYHNZrN8bwPjXF1tUHrzJYuv3gr6Xo45ZUynG"}
[sync] [08-27|22:15:18.860] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> vm/resolutions.go:114 verified block {"blkID": "jBXME9wSHeNAzxfAbC5Ew95FgD9ddA8yJaTaVSkjM6ink5Arv", "height": 1169, "txs": 0, "state ready": true, "unit prices": [100,100,100,100,100], "units consumed": [0,0,0,0,0]}

@patrick-ogrady
Copy link
Contributor Author

Hitting error case:

[sync] [08-27|22:19:43.201] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:769 block not processed {"height": 1461, "blkID": "ko5wqYYFbouJVizWt12C9gLEHn7AsE9EHhRGkEdoyhHeiNuTw", "attemptVerify": true}
[sync] [08-27|22:19:43.201] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:806 verifying block when view requested {"height": 1461, "blkID": "ko5wqYYFbouJVizWt12C9gLEHn7AsE9EHhRGkEdoyhHeiNuTw"}
[sync] [08-27|22:19:43.201] DEBUG <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:428 could not get parent {"id": "Zi7fWRJbasVW5xaX5Xb1m9kqzWSDAPgEWxbiXCrwQfzujGiE2"}
[sync] [08-27|22:19:43.880] DEBUG <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> vm/warp_manager.go:99 checked for ready jobs {"pending": 0}
[bootstrap] [08-27|22:19:43.992] DEBUG <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> vm/warp_manager.go:99 checked for ready jobs {"pending": 0}
[sync] [08-27|22:19:44.412] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:769 block not processed {"height": 1461, "blkID": "ko5wqYYFbouJVizWt12C9gLEHn7AsE9EHhRGkEdoyhHeiNuTw", "attemptVerify": true}
[sync] [08-27|22:19:44.413] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:806 verifying block when view requested {"height": 1461, "blkID": "ko5wqYYFbouJVizWt12C9gLEHn7AsE9EHhRGkEdoyhHeiNuTw"}
[sync] [08-27|22:19:44.413] DEBUG <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:428 could not get parent {"id": "Zi7fWRJbasVW5xaX5Xb1m9kqzWSDAPgEWxbiXCrwQfzujGiE2"}
[sync] [08-27|22:19:44.557] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:769 block not processed {"height": 1461, "blkID": "ko5wqYYFbouJVizWt12C9gLEHn7AsE9EHhRGkEdoyhHeiNuTw", "attemptVerify": true}
[sync] [08-27|22:19:44.557] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:806 verifying block when view requested {"height": 1461, "blkID": "ko5wqYYFbouJVizWt12C9gLEHn7AsE9EHhRGkEdoyhHeiNuTw"}
[sync] [08-27|22:19:44.557] DEBUG <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:428 could not get parent {"id": "Zi7fWRJbasVW5xaX5Xb1m9kqzWSDAPgEWxbiXCrwQfzujGiE2"}
[sync] [08-27|22:19:44.645] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> vm/vm.go:411 node is not ready yet
[sync] [08-27|22:19:44.707] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:769 block not processed {"height": 1461, "blkID": "ko5wqYYFbouJVizWt12C9gLEHn7AsE9EHhRGkEdoyhHeiNuTw", "attemptVerify": true}
[sync] [08-27|22:19:44.707] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:806 verifying block when view requested {"height": 1461, "blkID": "ko5wqYYFbouJVizWt12C9gLEHn7AsE9EHhRGkEdoyhHeiNuTw"}
[sync] [08-27|22:19:44.707] DEBUG <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:428 could not get parent {"id": "Zi7fWRJbasVW5xaX5Xb1m9kqzWSDAPgEWxbiXCrwQfzujGiE2"}
[sync] [08-27|22:19:44.872] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:769 block not processed {"height": 1461, "blkID": "ko5wqYYFbouJVizWt12C9gLEHn7AsE9EHhRGkEdoyhHeiNuTw", "attemptVerify": true}
[sync] [08-27|22:19:44.872] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:806 verifying block when view requested {"height": 1461, "blkID": "ko5wqYYFbouJVizWt12C9gLEHn7AsE9EHhRGkEdoyhHeiNuTw"}
[sync] [08-27|22:19:44.872] DEBUG <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:428 could not get parent {"id": "Zi7fWRJbasVW5xaX5Xb1m9kqzWSDAPgEWxbiXCrwQfzujGiE2"}
[sync] [08-27|22:19:44.879] DEBUG <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> vm/warp_manager.go:99 checked for ready jobs {"pending": 0}
[bootstrap] [08-27|22:19:44.992] DEBUG <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> vm/warp_manager.go:99 checked for ready jobs {"pending": 0}
[sync] [08-27|22:19:45.024] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:769 block not processed {"height": 1461, "blkID": "ko5wqYYFbouJVizWt12C9gLEHn7AsE9EHhRGkEdoyhHeiNuTw", "attemptVerify": true}
[sync] [08-27|22:19:45.024] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:806 verifying block when view requested {"height": 1461, "blkID": "ko5wqYYFbouJVizWt12C9gLEHn7AsE9EHhRGkEdoyhHeiNuTw"}
[sync] [08-27|22:19:45.024] DEBUG <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> chain/block.go:428 could not get parent {"id": "Zi7fWRJbasVW5xaX5Xb1m9kqzWSDAPgEWxbiXCrwQfzujGiE2"}
[sync] [08-27|22:19:45.684] INFO <nLAmPNCErV2ZUjitfvY5HWdkTvqn2KKBM9BgnSmD1kZ4SWxdS Chain> vm/vm.go:634 parsed block {"id": "4uNC5gYwuNTBUZ9Fc23DgdSmXDhRGqpoUwybFvga4FJVZth1q", "height": 1511}

vm/vm.go Outdated Show resolved Hide resolved
@patrick-ogrady
Copy link
Contributor Author

patrick-ogrady commented Aug 28, 2023

Need to see at last 1 block past sync target to be able to handle verify:

[sync] [08-27|22:34:04.966] INFO <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> vm/syncervm_server.go:47 parsed state summary {"summary": "1168:2WxsgcJfU19KGkucvq13YKqqSGfFzYo8Uot9MKoBsczf3tkuDT root=2gKBrSishaN73WRRybDV2TBU1Fkk1xK5DemCRs6GnUxo7J2DsF"}
[sync] [08-27|22:34:04.966] DEBUG <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> chain/auth_batch.go:66 enqueued batch for processing during done
[sync] [08-27|22:34:04.966] INFO <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> vm/vm.go:634 parsed block {"id": "2WxsgcJfU19KGkucvq13YKqqSGfFzYo8Uot9MKoBsczf3tkuDT", "height": 1168}
[sync] [08-27|22:34:04.966] DEBUG <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> chain/auth_batch.go:66 enqueued batch for processing during done
[sync] [08-27|22:34:04.966] INFO <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> vm/syncervm_server.go:47 parsed state summary {"summary": "1168:2WxsgcJfU19KGkucvq13YKqqSGfFzYo8Uot9MKoBsczf3tkuDT root=2gKBrSishaN73WRRybDV2TBU1Fkk1xK5DemCRs6GnUxo7J2DsF"}
[sync] [08-27|22:34:04.966] DEBUG <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> chain/auth_batch.go:66 enqueued batch for processing during done
[sync] [08-27|22:34:04.967] INFO <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> vm/syncervm_server.go:47 parsed state summary {"summary": "1168:2WxsgcJfU19KGkucvq13YKqqSGfFzYo8Uot9MKoBsczf3tkuDT root=2gKBrSishaN73WRRybDV2TBU1Fkk1xK5DemCRs6GnUxo7J2DsF"}
[sync] [08-27|22:34:04.967] DEBUG <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> chain/auth_batch.go:66 enqueued batch for processing during done
[sync] [08-27|22:34:04.967] INFO <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> vm/syncervm_server.go:47 parsed state summary {"summary": "1168:2WxsgcJfU19KGkucvq13YKqqSGfFzYo8Uot9MKoBsczf3tkuDT root=2gKBrSishaN73WRRybDV2TBU1Fkk1xK5DemCRs6GnUxo7J2DsF"}
[sync] [08-27|22:34:04.967] DEBUG <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> chain/auth_batch.go:66 enqueued batch for processing during done
[sync] [08-27|22:34:04.967] INFO <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> vm/syncervm_server.go:47 parsed state summary {"summary": "1168:2WxsgcJfU19KGkucvq13YKqqSGfFzYo8Uot9MKoBsczf3tkuDT root=2gKBrSishaN73WRRybDV2TBU1Fkk1xK5DemCRs6GnUxo7J2DsF"}
[sync] [08-27|22:34:04.967] DEBUG <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> chain/auth_batch.go:66 enqueued batch for processing during done
[sync] [08-27|22:34:04.968] INFO <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> vm/syncervm_server.go:47 parsed state summary {"summary": "1168:2WxsgcJfU19KGkucvq13YKqqSGfFzYo8Uot9MKoBsczf3tkuDT root=2gKBrSishaN73WRRybDV2TBU1Fkk1xK5DemCRs6GnUxo7J2DsF"}
[sync] [08-27|22:34:04.968] INFO <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> vm/syncervm_client.go:111 starting state sync {"height": 1168, "summary": "1168:2WxsgcJfU19KGkucvq13YKqqSGfFzYo8Uot9MKoBsczf3tkuDT root=2gKBrSishaN73WRRybDV2TBU1Fkk1xK5DemCRs6GnUxo7J2DsF", "already syncing": false}
[sync] [08-27|22:34:04.968] DEBUG <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> chain/auth_batch.go:66 enqueued batch for processing during done
[sync] [08-27|22:34:04.968] DEBUG <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> vm/resolutions.go:264 txs evicted from seen {"len": 0}
[sync] [08-27|22:34:04.968] INFO <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> vm/vm.go:411 node is not ready yet
[sync] [08-27|22:34:04.968] INFO <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> vm/resolutions.go:299 accepted block {"blkID": "2WxsgcJfU19KGkucvq13YKqqSGfFzYo8Uot9MKoBsczf3tkuDT", "height": 1168, "txs": 4, "size": 852, "dropped mempool txs": 0, "state ready": false}
[sync] [08-27|22:34:04.968] INFO <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> vm/resolutions.go:166 skipping unprocessed block {"height": 1168}
[sync] [08-27|22:34:04.968] INFO <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> vm/resolutions.go:239 block processed {"blkID": "2WxsgcJfU19KGkucvq13YKqqSGfFzYo8Uot9MKoBsczf3tkuDT", "height": 1168}
[sync] [08-27|22:34:07.195] INFO <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> vm/vm.go:634 parsed block {"id": "24QPD3VC4jdjHEhtqKrQJ5ipCfPuJMDkrP7KPzpxcJgkWkeJ8F", "height": 1169}
[sync] [08-27|22:34:07.196] INFO <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> chain/block.go:769 block not processed {"height": 1168, "blkID": "2WxsgcJfU19KGkucvq13YKqqSGfFzYo8Uot9MKoBsczf3tkuDT", "attemptVerify": true}
[sync] [08-27|22:34:07.196] INFO <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> chain/block.go:798 block root does not match accepted state {"height": 1168, "blkID": "2WxsgcJfU19KGkucvq13YKqqSGfFzYo8Uot9MKoBsczf3tkuDT", "accepted root": "2gKBrSishaN73WRRybDV2TBU1Fkk1xK5DemCRs6GnUxo7J2DsF", "block root": "pZ2QXErSL3RrT68HVfBk394S1oQfUtKAjMa97egFrHXePCx1F"}
[sync] [08-27|22:34:07.196] INFO <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> chain/block.go:812 verifying block when view requested {"height": 1168, "blkID": "2WxsgcJfU19KGkucvq13YKqqSGfFzYo8Uot9MKoBsczf3tkuDT", "accepted": true}
[sync] [08-27|22:34:07.196] DEBUG <uJFYugQkWUt71MCMPpteLhho79QLEXd1kjG6vTdX9Z1YUh5JZ Chain> chain/block.go:428 could not get parent {"id": "2aJwYz2K6es3n3ZnVyKTXLquE6tdFACoZ3Cfw8pyRS13PzvDSL"

what is going on?

1) state sync to block 1201
2) no block processed/accepted, state sync finishes at 1201
3) block 1202 parsed (produced by another node)
4) block 1202 attempted to be verified, tries to get post-execution state of 1201 but it doesn't exist (synced to post-execution state of 1200, its parent)
5) attempt to verify 1201, fails because don't have block 1200

* add TODO

* remove parent fetch

* remove parent block from innerVerify

* add verify context

* cleanup VerifyContext call

* working on clarifying GetVerifyContext/View

* keep cleaning up

* add specific conditional for height

* update verification context handling

* update wording in view to explain why we need accepted handling

* add more comments to main path

* update interface

* use preferred block directly

* drop verify

* fix lint

* update state manager

* add note about GetBlockIDByHeight

* finish comment about handling blocks

* make sure keys in set

* add todo for genesis handling

* update genesis block handling

* add more logs

* e2e passing

* address chain nits

* better comment genesis

* extra VM comments

* add TODO

* clarify note about verification status
@patrick-ogrady patrick-ogrady marked this pull request as ready for review August 31, 2023 06:07
@patrick-ogrady patrick-ogrady changed the title [chain] Defer Root Generation [chain] Defer State Root Generation Sep 1, 2023
@patrick-ogrady patrick-ogrady merged commit 14613fc into main Sep 1, 2023
@patrick-ogrady patrick-ogrady deleted the defer-root-v3 branch September 1, 2023 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[chain] Start with single block deferred verification (root is that of parent)
2 participants