Giter VIP home page Giter VIP logo

rise-node's People

Contributors

34ro avatar 4miners avatar akio0o avatar crypt0jan avatar dakk avatar diego-g avatar doweig avatar drouillard avatar fix avatar isabello avatar jarenal avatar jpopesculian avatar karmacoma avatar lucasisasmendi avatar m-schmoock avatar maciejbaj avatar mcanever avatar mcanever-fastbooking avatar mrv777 avatar nerdvibe avatar roman-bystrimovich avatar sargekhan avatar slaweet avatar thegoldeneye avatar toffick avatar vekexasia avatar vitaly-t 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rise-node's Issues

Code styling

We need to make sure we use a consistent coding style.

  1. The whole src folder should be compliant with ts-lint enforced rules which automatically enforces a lot of coding styles.
  2. We should cluster class properties by "set" (Modules, helpers, generic etc), clusters needs to be alphabetically sorted (helpers, generics, modules, logic) and also properties needs to be reordered.

Example: here properties are clustered but clusters are not sorted alphabetically and also properties within cluster may not.

// Modules
@inject(Symbols.modules.accounts)
private accountsModule: IAccountsModule;
@inject(Symbols.modules.blocks)
private blocksModule: IBlocksModule;
@inject(Symbols.modules.blocksSubModules.utils)
private blocksModuleUtils: IBlocksModuleUtils;
@inject(Symbols.modules.rounds)
private roundsModule: IRoundsModule;
@inject(Symbols.modules.transactions)
private transactionsModule: ITransactionsModule;
// Generic
@inject(Symbols.generic.db)
private db: IDatabase<any>;
@inject(Symbols.generic.genesisBlock)
private genesisBlock: SignedAndChainedBlockType;
// Helpers
@inject(Symbols.helpers.bus)
private bus: Bus;
@inject(Symbols.helpers.logger)
private logger: ILogger;
@inject(Symbols.helpers.sequence)
@tagged(Symbols.helpers.sequence, Symbols.tags.helpers.balancesSequence)
private balancesSequence: Sequence;
// LOGIC
@inject(Symbols.logic.block)
private blockLogic: IBlockLogic;
@inject(Symbols.logic.transaction)
private transactionLogic: ITransactionLogic;

logic/transaction: Wrong use of this context on countById() function

Testing countById() function at logic/transfer module, I've noticed that if self.scope.db.one() returns a reject Promise, the code fail when try to call to...

this.scope.logger.error(err.stack);

because the "this" inside the "catch()" clause has not access to the scope.

Recreate github repo for source code attribution.

Currently the history of the repo was taken away when the code was first committed.

It would be nice and ethically correct, even if this means to fix #14 and possibly other issues, to clone lisk and apply rise patches to it so that the whole project history comes back to life and proper code attribution gets restored.

logic/block has an issue in calculateFee() method

Testing logic/block I've noticed that calculateFee() is not working properly. There are an issue when we try to get the fee.

Currently is trying to get the fee so:

return constants.fees.send;

but according with the constants module the correct way should be:

return constants.fees[0].fees.send;

Problem with starting node

I tried to install the rise-node on my raspberry pi and that's what I get:

pi@raspberrypi:~/rise-node $ ./rise_manager.bash install
RISE installer script. Version: 1.0.0
Running: apt-get update... done.

Running: apt-get install curl build-essential python lsb-release wget openssl autoconf libtool automake libsodium-dev... Could not install packages prerequisites. Exiting.

pi@raspberrypi:~/rise-node $ ./rise_manager.bash start
Starting Rise..../rise_manager.bash: line 308: forever: command not found
./rise_manager.bash: line 317: psql: command not found
Block height =

Move to a different build system

Right now we are tied to rise_manager.

We should set up a bundling system with something like jenkins to properly package compiled source code so that we can get rid of rise_manager updating system.

Double NOT operator usage (!)

Hi team @RiseVision/developers

I would like to get your feedback about an issue.

At line

https://github.com/RiseVision/rise-node/blob/feature/typescript/src/modules/loader.ts#L303

TSLint is reporting that the next expression

emitBlockchainReady = !!emitBlockchainReady;

could be simplified to

emitBlockchainReady = emitBlockchainReady;

I think that we could remove that line because if emitBlockchainReady value is TRUE we will get the same value after apply NOT operator (!) two times.

What do you think about it?

Thanks in advance!

logic/block validation schema allow additional properties

Testing logic/block I've noticed that logic/block validation schema allow additional properties when you try to validate an object. In my opinion schema validation should reject any object with additional properties for to keep integrity.

Add exception for block 127765

[ERR] 2017-10-30 12:55:30 | Expected generator: 7067a911f3a4e13facbae9006b52a0c3ac9824bdd9f37168303152ae49dcb1c0 Received generator: c7fc699fa4feabb3709f12c08121ee890ec30ffa379eaa248827a8c4d30bdef7
[inf] 2017-10-30 12:55:30 | Fork - {"delegate":"c7fc699fa4feabb3709f12c08121ee890ec30ffa379eaa248827a8c4d30bdef7","block":{"id":"12125977497836395916","timestamp":36847200,"height":127765,"previousBlock":"12407067451403830263"},"cause":3}

Node stuck on block 127764

My node is stuck on block height 127764. Error log:

[inf] 2017-07-25 05:05:55 | Loading blocks from: 46.231.207.144:5555
[ERR] 2017-07-25 05:05:55 | Expected generator: 7067a911f3a4e13facbae9006b52a0c3ac9824bdd9f37168303152ae49dcb1c0 Received generator: c7fc699fa4feabb3709f12c08121ee890ec30ffa379eaa248827a8c4d30bdef7
[inf] 2017-07-25 05:05:55 | Fork - {"delegate":"c7fc699fa4feabb3709f12c08121ee890ec30ffa379eaa248827a8c4d30bdef7","block":{"id":"12125977497836395916","timestamp":36847200,"height":127765,"previousBlock":"12407067451403830263"},"cause":3}

Block loading and tx verification cumulative weight check bug

IF a block is loaded and contains a tx which is not valid. all subsequent transactions are not applied (But the ones before are).

the tx may pass the first logic.transaction.verify but fail on applyUnconfirmed causing such error.

One scenario is user sending diff tx with cumulative neg weight. verify will pass but applyUnconfirmed will not. (Correct)

Remove all dapp related code

Since we're going to rewrite the whole thing just remove everything:

  • dapp code in helpers
  • dapp in peers
  • dapp in SQLs

Missing Unit tests

Here the list of missing unit tests for typescript branch:

  • apis
    • utils
      • attachPeerHeaders
      • errorHandler
      • successInterceptor
      • validatePeerHeaders
    • accountsAPI
    • blocksAPI
    • delegatesAPI
    • loaderAPI
    • multisignatureAPI
    • peersAPI
    • signatureAPI
    • transactions
    • transportAPI
  • helpers
    • decorators
      • debugLog
      • exceptions
      • iocSymbol
      • schemavalidators
    • bignum
    • blocksProgressLogger
    • bus
    • cache
    • checkIpInList
    • config
    • constants
    • database
    • diff
    • ed
    • exceptionManager
    • forkTypes
    • genericUtils
    • git
    • httpApi
    • inserts
    • jobsQueue
    • logger
    • orderBy
    • promiseUtils
    • request-limiter
    • RoundChanges
    • sequence
    • slots
    • transactionTypes
    • z_schema
  • logic
    • models
      • account ?
      • modelField ?
    • transactions
      • baseTransactionType
      • createMultisig
      • delegate
      • secondSignature
      • send
      • vote
    • account
    • appState
    • block
    • blockReward
    • broadcaster
    • peer
    • peers
    • round
    • rounds
    • transaction
    • transactionPool
  • modules
    • blocks
      • chain
      • process
      • utils
      • verify
    • accounts
    • blocks
    • cache
    • delegates
    • forge
    • fork
    • loader
    • multisignatures
    • peers
    • rounds
    • system
    • transactions
    • transport
  • sql (only code that needs to be executed due to params)
    • logic
      • rounds
      • transactions
    • blocks
    • delegates
    • loader
    • multisignatures
    • peers
    • system
    • transport
  • AppManager

Set up Development branch

The problem

Currently testnet and master are not sharing the same history. The two branches were created separately. This means that, in order to merge info from one to another, we need to do a full-code merge with a lot of conflicts.

The solution

We should:

  • start a new development branch from master
  • get rid of testnet
  • create a new testnet branch from development
  • re-import testnet modifications such as config.json and genesis files.

From that we'll work on development only (using pull requests) and we'll later merge on testnet/master accordingly.

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.