Git Product home page Git Product logo

sawtooth-poet's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

sawtooth-poet's Issues

Enclave should only issue wait cert once for a given block number/previous block id

Currently enclave can issue duration/wait certificate for a given block number multiple times when requested by POET engine running in untrusted code. Enclave cannot decide to issue duration/wait certificate just based on the most recent block number it stores in its context because it's possible during fork resolution that the current chain head is changed and POET engine needs to abandon current block and start building a new block which will have same block number as previous one. So one option is for the enclave to check for previous block id along with current block number before issuing duration/wait certificate. But even this approach is not foolproof unless the enclave maintains entire history of duration/wait certificate requests in its context.

Enable IAS proxy

Add IAS proxy in docker compose files, let client talk to IAS proxy and then go to IAS. With current behavior IAS Client talks to IAS directly.

Review for engine/main

Main is too clutterred ----
Submodules to be brought in - check_consensus,fork resolver
Review moving extern crate declaration into specific files

@49 unnecessary - {}
@100 Rename requests
@113,114 What do these lines do??
@125 How to use stop_handle
@129 - Log the error as on 121

Engine ---

@19,20 remove if not needed
except() instead of unwrap()
clone() unwrap() - Replace wherever possible

@79 - LM not being used as of now
@79 - Avoid clone - in service as well for payload
@89 service.rs
@86 - Pass head here

See if BlockInvalid can be handled

@105,106 Remove comments
See the scope for avoiding validating one's own block in core

Does the validator push a future block to the consesnsus? ie - @5, block with block num 7 arrives

Figure out the difference in fail/ignore in sdk service call

@204 Comments here.. throughout as well
@203 Remove cert init code...

Consider removing handling of PeerMessage
@163 check what send_block_ack() does
log levels could be debug

@109 - Where to initialize after this/fail block??

Move IasAVRRequest struct from ias_proxy to common place of ias_client and ias_proxy

IasClient talks to IAS or IAS proxy, we do not know behavior of IAS when empty values are passed with keys (PSE manifest and nonce). If this is acceptable by IAS replace the hashmap in POST request in ias_client to struct.

Note: There's already a struct in ias_proxy, but since it only uses it to deserialize request we do not need hashmap in ias_proxy. IAS proxy doesn't construct the request, it just forwards whatever is received to IAS.

Reason for deserializing request in IAS proxy is to get quote from it, which is used to store in LRU cache.

Poet2Service code review

@29 - Rename init_wall_clock to service_start_time
@75 - Do away with remove in get_block. Prefer get then clone.
@90/@101 - Instead of while loop( attempt cancel or just continue) in summarize/finalize
@145 - Log and continue in cancel_block - Why panic necessarily if issue not at the end of consensus
@150 & @157 & @169- Remove
@186 - Return a tuple
@200 - Rename tagd to something more legible
@226 - Try using get instead of remove
@262 - Return ownership instead of clone()
@260 - See if hardcoded '#' can be abstracted
@430 - Remove this dummy test

[Improvement] Refactor enclave_sgx.rs

enclave_sgx.rs has code related to enclave along with other things. It should ideally have only things related to enclave, as a wrapper. Move other functionalities from this to respective independent files.

Refactor fork resolution module

Refactor the fork resolution module by making it more modularized.

  1. Implement find_common_ancestor( function which takes the current chain head and the block id as argument and returns the common ancestor (i.e intersection of two linked lists).
  2. Fork resolution module can return the status of fork resolution to engine.
  3. Move the block consensus state change logic to engine. Engine can take actions like continue building on top of current chain head, discard the current block, update chain head to move to new fork etc.
  4. Move the logic to update the consensus state store to engine and the functions which actually updates the state store to consensus state store module.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.