Giter VIP home page Giter VIP logo

thaler-docs's People

Contributors

allthatjazzleo avatar brianmco avatar calvinaco avatar calvinlauyh avatar cdc-hitesh avatar chatch avatar dependabot-preview[bot] avatar dependabot[bot] avatar devashishdxt avatar foreseaz avatar juno-yu avatar landanhu avatar leejw51crypto avatar lezzokafka avatar samngmco avatar tomtau avatar yihuang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

thaler-docs's Issues

Problem: outdated and imprecise staking documentation

Current docs: https://crypto-com.github.io/getting-started/staking.html

Some initial rough work: crypto-org-chain/chain-docs#75

Desired goals:

  1. module-only specifics (e.g. reward calculation formulas) go into separate pages
  2. cross-module interactions are explicitly stated
  3. define precisely (somewhat "formally") in relation to Tendermint ABCI what each part does, so that this can be easily checked against the implementation:
  • what are data inputs from where/when
  • how are they processed
  • what are outputs and when they are emitted
  1. if the outcome depends on network parameters, each parameter needs to be justified:
  • what it does
  • what are its constraints
  • what its relation to Tendermint core consensus security assumptions is -- "nothing-at-stake" problem, consensus-critical parameters set in Tendermint (evidence age, etc.), ...
  • what it should be set to -- if it is not given (like total maximum supply), the recommended value should be given with justification / reference explaining why, e.g. based on mechanism design simulation models

Problem: Docs are not up-to-date with authentication token

As we are keeping authentication token for client-cli, the docs are not up-to-date.

Expected outcome:

  • Update examples and instruction in ClientCLI under wallet-management are based on passphrase;
  • Get the authentication token by wallet auth-token.

Extra:

  • Check through the whole docs and make changes to those using passphrase.

Problem: genesis page is not up to date

  1. genesis hash not documented
    currently, only "genesis app hash" is documented.
    But app hash is different from the overall genesis hash that's expected for light client verification

  2. genesis page is outdated

Problem: MLS member leaving/joining interaction with council nodes not documented

From the audit discussion

Who among the validators invites a newcomer when a new validator node joins?
Assuming TDBE is (in normal circumstances) provided with network updates (relevant transactions, events...), it'll go like this:
block N (time N_t), there's a valid NodeJoinTx with a metadata payload, including a ClientInitKey
TDBE corresponding to node with index 0 in the ratchet tree generates "Welcome" and "Send" payloads wrapped in a single MLS-related transaction that's then broadcasted/gossiped by Tendermint (let's call it MlsAddTx)
block M (time M_t), MlsAddTx is proposed to be in a block:
if M_t <= N_t + timeout, it's considered valid and propagated to validator TDBEs
if M_t > N_t + timeout, it's considered invalid and the process restarts with Step 2., but TDBE corresponding to a node with index 1
(and this may continue with indices 2,3,... the consensus assumption is <1/3 of nodes are malicious)
One consequence of this is there may be multiple MLS Welcome/Send payloads for one newcomer -- only one of them is applied.

Who among the validators triggers the group and key update when a validator node leaves?
Same logic as above with joining, but there multiple ways to trigger "validator node leaving" (operator decides to leave and broadcasts relevant transaction, its node was observed to be faulty, ...)

I guess for the nodes that are not in the validator set, but requested to join / have enough stake, their TDBE keypackage will still be a part of the MLS group structure and expected to generate those MlsAddTx transactions/react to the network changes.

For nodes not generating these update Txs in time, they may need to be punished

Problem: no test vectors for different transaction types

Just like in BIPs:
https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#Test_Vectors
https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki#Test_vectors
https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#Test_Vectors
https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki#Test_Vectors_and_Reference_Code

it'll be good to have some test vectors for transaction data payload + witness + addresses.
There could be a command in dev-utils "test-vectors" that will generate these fixed test vectors.
(It could also later be added to CI to check transaction format wasn't broken.)

Problem: nonce increment logic cause deliver_tx fail

For example,

  • In check_tx, tx nonce match staking state, tx passed.
  • In begin block, nonce of staking state increased because of cleanup or punishment.
  • In deliver_tx, tx nonce check failed.

Another issue, from the perspective of client:

  • begin block, nonce increased(uncommitted)
  • query nonce, get the old(last committed) nonce.
  • send tx, execution failed.

In integration tests, it happens quite frequently, public tx execution failed because of nonce mismatch.
It seems mostly caused by cleanup operation increase nonce, maybe we can remove the nonce increasing from cleanup operation.

Problem: No documentation for multisig in client-cli

Issue:

  • Some detail is covered in getting-started/signature-schemes.md;
  • No documentation for multisig in client-cli side.

Expected outcomes:

  • Provide additional detail in getting-started/signature-schemes.md;
  • Documentation for multisig in client-cli under Wallet Management.

Problem: punishments are not defined precisely

define precisely (somewhat "formally") in relation to Tendermint ABCI what each part does, so that this can be easily checked against the implementation:
what are data inputs from where/when
how are they processed
what are outputs and when they are emitted

Problem: 0.5 testnet not yet deployed and documented

Problem: markdown syntax in tdbe.md caused build failure

[email protected] docs:build /home/ubuntu/playground/chain-docs
vuepress build docs

wait Extracting site metadata...
tip Apply theme @vuepress/theme-default ...
Language does not exist: text
Language does not exist: text
Language does not exist: text
Language does not exist: text
(undefined) ./docs/modules/tdbe.md?vue&type=template&id=0fe20faa& (./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/@vuepress/core/node_modules/.cache/vuepress","cacheIdentifier":"cb41188e-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??ref--1-1!./node_modules/@vuepress/markdown-loader??ref--1-2!./docs/modules/tdbe.md?vue&type=template&id=0fe20faa&)
Module build failed (from ./node_modules/vue-loader/lib/loaders/templateLoader.js):
SyntaxError: Unexpected token (1:16172)
at Parser.pp$4.raise (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:2757:13)
at Parser.pp.unexpected (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:647:8)
at Parser.pp$3.parseExprAtom (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:2196:10)
at Parser. (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:6003:24)
at Parser.parseExprAtom (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:6129:31)
at Parser.pp$3.parseExprSubscripts (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:2047:19)
at Parser.pp$3.parseMaybeUnary (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:2024:17)
at Parser.pp$3.parseExprOps (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:1966:19)
at Parser.pp$3.parseMaybeConditional (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:1949:19)
at Parser.pp$3.parseMaybeAssign (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:1925:19)
at Parser.pp$3.parseExprList (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:2663:20)
at Parser.pp$3.parseSubscripts (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:2075:29)
at Parser.pp$3.parseExprSubscripts (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:2050:21)
at Parser.pp$3.parseMaybeUnary (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:2024:17)
at Parser.pp$3.parseExprOp (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:1985:41)
at Parser.pp$3.parseExprOps (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:1968:91)
@ ./docs/modules/tdbe.md?vue&type=template&id=0fe20faa& 1:0-488 1:0-488
@ ./docs/modules/tdbe.md
@ ./node_modules/@vuepress/core/.temp/internal/page-components.js
@ ./node_modules/@vuepress/core/lib/client/util.js
@ ./node_modules/@vuepress/core/lib/client/app.js
@ ./node_modules/@vuepress/core/lib/client/clientEntry.js
@ multi ./node_modules/@vuepress/core/lib/client/clientEntry.js
(undefined) ./docs/modules/tdbe.md?vue&type=template&id=0fe20faa& (./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/@vuepress/core/node_modules/.cache/vuepress","cacheIdentifier":"520cc585-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??ref--1-1!./node_modules/@vuepress/markdown-loader??ref--1-2!./docs/modules/tdbe.md?vue&type=template&id=0fe20faa&)
Module build failed (from ./node_modules/vue-loader/lib/loaders/templateLoader.js):
SyntaxError: Unexpected token (1:16172)
at Parser.pp$4.raise (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:2757:13)
at Parser.pp.unexpected (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:647:8)
at Parser.pp$3.parseExprAtom (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:2196:10)
at Parser. (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:6003:24)
at Parser.parseExprAtom (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:6129:31)
at Parser.pp$3.parseExprSubscripts (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:2047:19)
at Parser.pp$3.parseMaybeUnary (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:2024:17)
at Parser.pp$3.parseExprOps (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:1966:19)
at Parser.pp$3.parseMaybeConditional (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:1949:19)
at Parser.pp$3.parseMaybeAssign (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:1925:19)
at Parser.pp$3.parseExprList (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:2663:20)
at Parser.pp$3.parseSubscripts (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:2075:29)
at Parser.pp$3.parseExprSubscripts (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:2050:21)
at Parser.pp$3.parseMaybeUnary (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:2024:17)
at Parser.pp$3.parseExprOp (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:1985:41)
at Parser.pp$3.parseExprOps (/home/ubuntu/playground/chain-docs/node_modules/vue-template-es2015-compiler/buble.js:1968:91)
@ ./docs/modules/tdbe.md?vue&type=template&id=0fe20faa& 1:0-488 1:0-488
@ ./docs/modules/tdbe.md
@ ./node_modules/@vuepress/core/.temp/internal/page-components.js
@ ./node_modules/@vuepress/core/lib/client/util.js
@ ./node_modules/@vuepress/core/lib/client/app.js
@ ./node_modules/@vuepress/core/lib/client/serverEntry.js
@ multi ./node_modules/@vuepress/core/lib/client/serverEntry.js
Error: Failed to compile with errors.
at webpack (/home/ubuntu/playground/chain-docs/node_modules/@vuepress/core/lib/node/build/index.js:180:16)
at finalCallback (/home/ubuntu/playground/chain-docs/node_modules/webpack/lib/MultiCompiler.js:254:12)
at runWithDependencies.err (/home/ubuntu/playground/chain-docs/node_modules/webpack/lib/MultiCompiler.js:277:6)
at done (/home/ubuntu/playground/chain-docs/node_modules/neo-async/async.js:2931:13)
at runCompilers (/home/ubuntu/playground/chain-docs/node_modules/webpack/lib/MultiCompiler.js:181:48)
at err (/home/ubuntu/playground/chain-docs/node_modules/webpack/lib/MultiCompiler.js:188:7)
at compiler.run (/home/ubuntu/playground/chain-docs/node_modules/webpack/lib/MultiCompiler.js:270:7)
at finalCallback (/home/ubuntu/playground/chain-docs/node_modules/webpack/lib/Compiler.js:257:39)
at hooks.done.callAsync.err (/home/ubuntu/playground/chain-docs/node_modules/webpack/lib/Compiler.js:273:13)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/ubuntu/playground/chain-docs/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)
at AsyncSeriesHook.lazyCompileHook (/home/ubuntu/playground/chain-docs/node_modules/tapable/lib/Hook.js:154:20)
at onCompiled (/home/ubuntu/playground/chain-docs/node_modules/webpack/lib/Compiler.js:271:21)
at hooks.afterCompile.callAsync.err (/home/ubuntu/playground/chain-docs/node_modules/webpack/lib/Compiler.js:681:15)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/ubuntu/playground/chain-docs/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)
at AsyncSeriesHook.lazyCompileHook (/home/ubuntu/playground/chain-docs/node_modules/tapable/lib/Hook.js:154:20)
at compilation.seal.err (/home/ubuntu/playground/chain-docs/node_modules/webpack/lib/Compiler.js:678:31)

npm ERR! Linux 5.3.0-1031-azure
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "docs:build"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] docs:build: vuepress build docs
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] docs:build script 'vuepress build docs'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the demo-doc-2 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! vuepress build docs
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs demo-doc-2
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls demo-doc-2
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/ubuntu/playground/chain-docs/npm-debug.log

Problem: details of TDBE usage of light client are missing

as mentioned in the related implementation issue:

In particular, as the code runs inside enclaves, 1) it's trusted (-> needs to be simple and small without too many dependencies), 2) there's no "trusted" persistent storage (in particular, the host may replay the old state.

With regards to "light client state" / trusted anchor, it implies two parts:

  1. (no state) the full genesis.json isn't known before TDBE is compiled: https://github.com/crypto-com/chain-docs/blob/master/docs/modules/tdbe.md#genesisjson-creation -- but some parts of it should be known and should be compile-time parameters crypto-com/thaler#1996 that are cross-checked
  2. once a node "successfully" joins (either valid genesis.json with related mls/keypackage payload OR valid committed nodejointx) OR updates (successful committed SelfUpdateProposal after NACK timeout), it can "seal" its identity+HPKE keys altogether with the "light client state" at that point

Problem: Docs does not cover import/export tx

Expected outcomes:

  • Brief introduction at getting-started/send_your_first_transaction.md ;
  • Includes import/export tx under client-cli in wallet management (wallets/client-cli);
  • Link between the above two .

Problem: punishment and monetary network parameters are not explained

monetary params -- unbonding period, fee policy, minimal stakes...

if the outcome depends on network parameters, each parameter needs to be justified:
what it does
what are its constraints
what its relation to Tendermint core consensus security assumptions is -- "nothing-at-stake" problem, consensus-critical parameters set in Tendermint (evidence age, etc.), ...
what it should be set to -- if it is not given (like total maximum supply), the recommended value should be given with justification / reference explaining why, e.g. based on mechanism design simulation models

Problem: reward mechanisms not defined precisely

need fairness explanation / update how votes are processed

define precisely (somewhat "formally") in relation to Tendermint ABCI what each part does, so that this can be easily checked against the implementation:
what are data inputs from where/when
how are they processed
what are outputs and when they are emitted

Problem: unnecessary complexity for obfuscation key forward secrecy

Currently, the protocol in the implementation plan: https://github.com/crypto-com/chain-docs/blob/master/plan.md#key-generation-and-rotation
describes 2-steps that all nodes will be expected to generate random payloads, broadcasts signed commitments to those payloads, and then broadcast those payloads.

This may be simplified a bit, some ideas:

...
Will need to think about it more, but 0 step may be fine

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.