trustnote-org / rust-trustnote Goto Github PK
View Code? Open in Web Editor NEWrust core implementation for trustnote
License: MIT License
rust core implementation for trustnote
License: MIT License
this is another independent small module that we can implment
this should be compatible with the getSourceString(obj)
and then the result can be used to calc the hash of the object
rust struct and map should be corresponding to js obj
incompatible types like unit should return an error
ref #11
need all necessary crypto and hash functions and tests
add unit struct
add json serialization and deserialization support
ref #18
output log both to stdout and file
we need this module for the main_chain module
currently serde_json::Value object type is not sorted, need to find a way to serialize it into the correct order
support websocket infrastructure
implement network send_version
ref #40
impl get_connection() method from the pool
The Chash160 is used for the device address generation, we also need to validate the address.
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.
use config file that don't need to recompile
connect with hub via https and websocket
ref #40
we need to init secp256k1 in main thread to avoid too much stack consume, also the initialization could happen only once.
ref #18
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.
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.
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.
ref #18
this is a big function, construct a joint from database, used widely by other modules
support sqlite for storing data
we need to finish all the following work to porting from trustnote js code! almost rewrite everything!
here list some features that we are not supported and may implement in future
this is a relatively small independent module that used by catch up
need to refine Result to unify format, use failure or err_chain
ref #18
this is a track issue for the network implementation
this should be equivalent to JS objectHash
function
this would implement the writer.js module for rust, this is a big issue that covers a lot sql transactions that deal with unit save to sqlite database
ref #40
describe steps for setting up a hub server locally(on windows develop machine)
@victor55511 could you please help on this?
implement validateAuthorSignaturesWithoutReferences for witness proof
we need a way to wait for the actor closure completion and get the result
a small function that could be used practice
ref #24
this is a track issue that record some work we need to work
It should be compatible with the js implementation.
read witness from database and cached in a struct
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.
need to maintain a last receive message timestamp for each connection and if it's get bigger enough, send out the heartbeat to it. and if heartbeat times out, just close the connection
this is a relatively independent small module
part of #18
need to init database for basic info
actor model is not suitable for network operations, more complex for implementation and hard to parallel executions.
implement storage read_definition
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.