GithubHelp home page GithubHelp logo

rust-trustnote's People

Contributors

boblu9 avatar gtnull avatar jgr-great avatar joyious avatar luckystarzj avatar qiangshou007 avatar xudong-huang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rust-trustnote's Issues

Chash160 validation

The Chash160 is used for the device address generation, we also need to validate the address.

Latest rust nightly breaks the dependencies

Latest rust nightly version breaks the cargo test with an UB, because the generator library was corrupted by wrongly assembly output where the stack was polluted by function initial setup (rcx and rdx should not be saved on stack). this only affect the nightly debug version. the stable version and release version works fine.

I need to find a way to fix that, but seems really hard.

implment network framework

we use actor module for network framework, each connection will have a receive coroutine associated with the actor running in back ground, when the actor got dropped, the coroutine would be killed

there are two types connections, inbound connection which is created from the the server and outbount connection which is created from the connect to outside. both connections has the same interface.

implement close connection

search connection from global by peer name and close it. when send returns an error or when receive mismatched connection, we need to close it explicitly.

support wss server and client

ws and tls stream can't support clone, so we can't handle the receive things in separate coroutines. How to do that without clone/from_raw interface?

ws can use from_raw to create separate stream for reading. but tls stream doesn't have such interface.

overall work need to do for the project first stage

we need to finish all the following work to porting from trustnote js code! almost rewrite everything!

  • others(utils and framework) 5%
  • writer 5% (#14)
  • storage 10% (#39)
  • main_chain 5% (#59)
  • validation 10% (#24)
  • catch_up 10% (#18)
  • graph 5% (#23)
  • commission 5% (#25)
  • joint storage 5% (#64)
  • definition 5% (#126)
  • compatible object serialization (#35)
  • crypto,hashing, chash (#11, #21, #3)
  • network 15% (#40)
  • wallet related service (#238)
    composer 15% (#66) (wallet only)

workout catch up logic

@victor55511
we need to get a clear catch up procedure from the JS logic and translate it into rust logic.

  • review the work process of JS code catch up
  • purgeHandledBallsFromHashTree (#29)
  • readHashTree (#32)
  • processHashTree (#33)
  • prepareCatchupChain (#30)
  • processCatchupChain (#31)

missed features

here list some features that we are not supported and may implement in future

  • only support payment definition
  • not support private payment
  • prepare catch up units for other hubs
  • witness list is now fixed
  • unit content_hash is empty (always a good unit)
  • definition only support sig data_feed text
  • not support multi sign
  • not support wallet logic (composer)
  • not support network self connection detection

implement witness proof

this is a relatively small independent module that used by catch up

  • prepareWitnessProof
  • processWitnessProof

implement graph logic

this is a relatively small module that can be ported to rust

  • Compare units/unitProps ref #38
  • determineIfIncluded #42
  • readDescendantUnitsByAuthorsBeforeMcIndex #42
  • UNUSED readDescendantUnitsBeforeLandingOnMc
  • UNUSED readAscendantUnitsAfterTakingOffMc

Track network implement progress

this is a track issue for the network implementation

  • json rpc framework over websocket (#50)
  • allow send messages to peers without feedback (#50)
  • basic network utils and layer API (#50)
  • replace actor implementation (#55)
  • close connection if error (#53)
  • record peer events (#74)
  • heartbeat (#41, #57)
  • send version (#52)
  • hub/challenge (#60)
  • subscribe (#61)
  • concurrent joint request checking (#84)
  • request_joints (#83)
  • catchup (#92)
  • hash_tree(#93)
  • handle joint (#65)
  • send_joints_since_mci (#96)
  • checkCatchupLeftovers (#97)
  • purgeJunkUnhandledJoints (#98)
  • requestFreeJointsFromAllOutboundPeers (#99)
  • refine catchup logic (#100)
  • request lost joints (#103)
  • findAndHandleJointsThatAreReady (#104)
  • purge_joint_and_dependencies_and_notify_peers (#105)
  • send_free_joint (#201)
  • handle refresh message (#108)
    handleSavedPrivatePayments (#155)
    wss support (#49)
    rerouteble request (#72)
    implement actor communication framework (#51)

implement storage

this is a track issue that record some work we need to work

  • read_witness_list
  • read_unit_props
  • read_static_unit_property
  • read_unit_authors
  • determine_if_witness_and_address_definition_have_refs
  • read_joint_with_ball
  • read_definition (#36)
  • read_joint_directly (#34)
  • read_porps_of_units(#77)
  • read_definition_by_address (#36)
  • read_last_stable_mc_unit_props (#106)
  • is_genesis_ball (#124)
  • determineBestParent (#135)
  • determineIfHasWitnessListMutationsAlongMc (#134)

rand crate cause coroutine stack overflow

the default rand crate use hc128 as default thread rng which cause stack overflow, need to use ChaCha as default rng generator, patch the Cargo.tom to replace the crate-io dependency.

implement validation logic

this is a big work that need to port, evolve a lot of code, and maybe a lot of sub issues to track

  • hasValidHashes (#28)
  • validateAuthorSignaturesWithoutReferences (#37)
  • initPrivatePaymentValidationState
  • validatePayment
  • validate (#67)

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.