Skip to content

Conversation

@DogLi
Copy link
Contributor

@DogLi DogLi commented Mar 7, 2023

  1. after sidechain import block, set the block suspender if block_height >= scheduled block height
  2. if block_height == scheduled block height, migration

resolve #1295

@DogLi DogLi force-pushed the issue-1295 branch 5 times, most recently from 194335b to 0eb69b7 Compare March 9, 2023 05:40
@Kailai-Wang
Copy link
Collaborator

Looks like the TEE tests failed.

@jingleizhang
Copy link
Contributor

jingleizhang commented Mar 15, 2023

It was closed because it was wrongly connected to another PR...

@Kailai-Wang
Copy link
Collaborator

Yea this PR #1462 wasn't linked to any issue.

It's always a good practice to link the issue that will be fixed by a PR

@DogLi DogLi force-pushed the issue-1295 branch 7 times, most recently from 8a8adda to b691f65 Compare March 16, 2023 08:57
Copy link
Collaborator

@Kailai-Wang Kailai-Wang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't go very details - only skimmed through the logic in tee-worker/sidechain/consensus/aura/src/block_importer.rs.

I'm not sure why the check logic happens inside a block importer rather than the block proposer. Maybe the argument is we need to import all missing blocks before producing a block but I'm not sure if there's any subtle synchronisation issue.

The scheduled enclave is something we get from parentchain syncing, not from sidechain state. In that sense I think we don't have to rely on the (imported) sidechain block to do this.

Additionally, is get_next_scheduled_enclave correctly implemented?
I think we need such functionality, given a sidechain_block_number, the function should return the expected MRENCALVE. For example, by syncing the parentchain blocks we know that:

sidechain_block_number expected_MRENCLAVE
0 A
20 B
25 C

so:
for input 19 - it should return A => It means we are going to generate block number 19 and we have to check if our MRENCLAVE is equal to A
for input 20 -> it should return B
for input 26 -> it should return C

and so on.

@Kailai-Wang
Copy link
Collaborator

And yes - having a feature branch in the same repo would be beneficial for the reviewers to check the code locally :)

wangminqi added a commit that referenced this pull request Mar 19, 2023
* build_assertion error propagate to parachain (#1456)

* AssertionBuildFail: add more details

* handle errors in on_success method

* emit event when vc is non-exists

* remove event

* remove VCNotExist from Event

* Fix benchmarking pallet-teerex (#1460)

* remove tee-dev from node default feature

* only rococo has tee-dev

* remove sccache in docker

* missing RUN

* update Dockerfile

* sleep for 1 second before the event websocket reconnect(fix #1416) (#1462)

* debug: Sync of Moonbeam upstream debug (#1450)

* debug: change of test

* debug: fix benchmark

* Fix the panic from WeightInfo in CI (#1466)

* update comment

* update runner tag

* minor update, cleanup history data

* fix errors in teeracle

* [benchmarking bot] Auto commit generated weights files (#1465)

Co-authored-by: Kailai-Wang <[email protected]>

* using pallet weights

---------

Co-authored-by: BillyWooo <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kailai-Wang <[email protected]>

* build_assertion error case test (#1463)

* error verify

* batch call of identity

* batch call of vc

* format code

* delete useless code

* verify error identity

* create error identities

* delete useless code

* delete useless code

* add comment&delete useless code

* format code

* txs types

* step error vc

* catch dispatchError

* revoke error test

* requestVc error

* change assert log

* fix merge errors

* add checkFailReason

* check fail reason

* move nonce out loop

* format code

* change test flow(only use A1 trigger error event)

* format code

* IDGraph adjustment (#1478)

* only keep idgraph for verified event

* add get_id_graph_with_max_len

* add tee pallets unittests

* adjust idgraph and prettier

* use context.api for better naming

* remove empty lines

---------

Co-authored-by: Zhouhui Tian <[email protected]>
Co-authored-by: Kai <[email protected]>
Co-authored-by: Linfeng.Yuan <[email protected]>
Co-authored-by: BillyWooo <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kailai-Wang <[email protected]>
Co-authored-by: Verin1005 <[email protected]>
@Kailai-Wang
Copy link
Collaborator

Superseded by #1579

@Kailai-Wang Kailai-Wang closed this Apr 6, 2023
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.

Enclave update [3-2] Check mrenclave and scheduled height before produce blocks

3 participants