Giter Site home page Giter Site logo

fssi's People

Contributors

believesong avatar bigknife avatar bigknife-song avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fssi's Issues

send transaction

warrior processes transactions

  1. define nymph jsonrpc for submit transaction
  2. implement nymph's sendTransaction

run smart contract

  • add CreateTransaction runContract into tool

  • add create run contract program

  • integrate program to tool

implement query node

a query node also is a p2p node, but not handle consensus message.

  1. synchronize latest ledger and snapshot
  2. provide query service:
  • query account snapshot
  • query account's contract
  • query transaction state

run consensus

after transaction evaluated to moment, we pool the moment, when the pool is full or timeout, we build these moments to a proposal, then run consensus to validate the proposal.

if the proposal totally agreed, every node should commit the proposal, all transaction will be settled down.

create chain

provide a command to create a chain, e.g.

tool CreateChain --chain-id=testnet --working-dir=/data/testnet

transaction id generation

transaction id

user post a json rpc request to a edge node, and get a reponse from the edge node synchronously, which involves a transaction id, generated by the edge node.

user can query a edge node to get a transaction's status by its tranaction id.

  • client never create the transaction id, it's up to edge node.
  • implement a method named queryTransaction to edge node json rpc services
  • implement a command name QueryTransaction to generate queryTransaction jsonrpc request
  • on core node, every transaction should be kept, and their results should be deterministic

transfer token to another account

  • add CreateTransaction command to tool to create a transfer token transaction

  • add Transfer token method to edge json rpc

  • run consensus to create block

redefine assets layout

now, the layout of assets of an account is plain, every contract can act on every assets key. It's not too safe, and the previlege is too loose.

Try to redefine the assets layout to enhance the safety.

compile smart contract

compile smart contract:

tool CompileContract --source-code /source/code/directory --output /jar/directory
  1. compile source code
  2. check un-derterminded byte codes, if they exist, compiling will be failed, print the undetermined code info.
  • add CompileContract sub command for tool

  • merge compile contract implementation from @BeleiveSong

warrior server skeleton

warrior server skeleton.

  1. receive messages from nymph
  2. gossip messages to all warriors.
  3. handle messages.

refine contract parameters

  1. contract.parameter types should be reverted to it's old version.
  2. contract.parameter is different from contract running parameters. contract.parameters is logic and facing to contract invoker, contract running parameters is used to running a contract in jvm, facing to sandbox(runtime) and contract developer.

censensus engine shoud be consistent with local store

problem

when transaction failed, local store will be rolled back, but the consensus engine is on the right postion, so when a new proposal is to process, the consensus should reject the new proposal (because the proposal's slotIndex has been reached agreement)

refactor scp

remove scalap dependency, implement scp inside the whole project.

improve warrior node

provide more features to support query node.

periodly push ledger to cloud drive, so other nodes can download ledger archives from cloud drive.

support read-only contract method invocation

now, all contract invocations will be post to consensus engine, but it's not neccessary for readonly contract methods, so it's important to seperate them.

if the contract method is readonly, only invoke them, and render the results to client.

publish smart contract

  • add publishContract to tool CreateTransaction

  • handle PublishContract transaction to reach agreement

register account

call register json rpc method to create an account

  1. implement corresponed interpreter.
  2. implement register jsonrpc service.

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.