Skip to content

Conversation

@clangenb
Copy link
Contributor

@clangenb clangenb commented Jun 29, 2021

Poc of block broadcasting: Closes #244. It is only a PoC, as the workers simply broadcast blocks. There is no scheduling (aura) and received blocks by other workers are only logged to the command line without applying the state diff.

Major:

  • Added enclave-api crate. PoC on how we can abstract the interface to the enclave.
  • Added Worker struct. PoC on how we could abstract every aspect of the worker's features.
  • Added PoC of a new ws-server the worker listens for direct requests. It comes from the jsonrpsee crate - the rpc abstraction that will be successor to the current implementation in substrate. It currently coexists with the old direct_server, but I think we should replace the old one soon. It removes a lot of boilerplate code and is async. Since the introduction of the async/await syntax in rust, I believe we should go async, as it is much less verbose in general.
  • Added Stf::apply_statediff() it is unit tested but not yet integrated in the enclave.

Minor:

  • better naming in the direct_client that actually reflects the functionality.
  • Skip-ra does register the enclave with the registry but without remote attestation report instead of skipping the process completely. This was made possible in Feature gate ias verify integritee-node#20
  • Fixed minor stuff in the local-setup. Local setup stably works for me with a node that skips remote attestation checks.

clangenb added 30 commits June 29, 2021 13:40
…gx flag anymore. It is defined by the target_arch
…eed of sgx flag anymore. It is defined by the target_arch".

Sgx conditional compilation seems to be more involed than i thought. This needs proper thinking changing this.

This reverts commit 8d0400c
@clangenb clangenb requested review from brenzi and murerfel June 29, 2021 12:43
Copy link
Contributor

@murerfel murerfel left a comment

Choose a reason for hiding this comment

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

Looks good to me. Quite a few questions from my side to help my understanding of the code, hope you can forgive that 😉
The one minor change I'd make, is the test comparing an entire response JSON string, using contains() instead

Copy link
Contributor

@murerfel murerfel left a comment

Choose a reason for hiding this comment

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

Looks good to me, approved!

@clangenb clangenb mentioned this pull request Jun 30, 2021
2 tasks
Copy link
Collaborator

@brenzi brenzi left a comment

Choose a reason for hiding this comment

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

this is 95% refactoring and 5% on-topic
too big for me to review in detail. but I get you can broadcast blocks and receive them (without applying them yet)

@brenzi brenzi merged commit 0963474 into master Jun 30, 2021
@clangenb clangenb deleted the broadcast-blocks branch July 13, 2021 16:33
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.

sidechain block broadcasting logic

3 participants