Giter VIP home page Giter VIP logo

cita's People

Contributors

bcdevhz avatar boundless-forest avatar clearloop avatar driftluo avatar duanyytop avatar eighteenzi avatar hezhengjun avatar jerry-sl avatar jerry-yu avatar jjyr avatar kaikai1024 avatar keith-cy avatar keroro520 avatar kilb avatar leeyr338 avatar luqz avatar mohanson avatar nanmuxiusi avatar pencil-yao avatar poshboytl avatar rink1969 avatar suyanlong avatar thewawar avatar u2 avatar urugang avatar volzkzg avatar yangby-cryptape avatar zeroqn avatar zhangsoledad avatar zhouyun-zoe 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  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  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

cita's Issues

Refactor the unit test of executor.

Description

  • postman
  • backlogs
  • executor
  • fsm

Additional Information

-------------------Chinese-----------------

executor 的几个主要文件,postman, backlogs, executor, fsm 下很长的测试可以拿出来,放在单独的文件里,更简洁

executor crash in first run

Description

executor crash:

2018-12-28T17:27:00.372430279+08:00 - INFO - CITA:executor
2018-12-28T17:27:00.372503548+08:00 - INFO - Version: v0.20.2
2018-12-28T17:27:00.415560234+08:00 - INFO - Session initialized
2018-12-28T17:27:00.463513954+08:00 - INFO - Session initialized
2018-12-28T17:27:00.628091248+08:00 - INFO - executor config: Config { prooftype: 2, journaldb_type: "archive", grpc_port: 5000 }
2018-12-28T17:27:01.763420054+08:00 - ERROR -
stack backtrace:
0: 0x55f3fa599f15 - backtrace::backtrace::libunwind::trace::h5e7b0bd5ede73dca
at /home/lyc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/backtrace-0.3.9/src/backtrace/libunwind.rs:53
- backtrace::backtrace::trace::h3c03c3417586eb2a
at /home/lyc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/backtrace-0.3.9/src/backtrace/mod.rs:42
1: 0x55f3fa593d4e - backtrace::capture::Backtrace::new_unresolved::h5880adc32c453849
at /home/lyc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/backtrace-0.3.9/src/capture.rs:88
2: 0x55f3fa593cac - backtrace::capture::Backtrace::new::hdd880a81f348c4e0
at /home/lyc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/backtrace-0.3.9/src/capture.rs:63
3: 0x55f3fa5925a8 - panic_hook::panic_hook::h68196299094b0877
at /home/lyc/.cargo/git/checkouts/cita-common-1aad419f3e80ba17/1b308bc/panic_hook/src/lib.rs:51
4: 0x55f3fa592b47 - core::ops::function::Fn::call::h84ae58b1e3c254c4
at libcore/ops/function.rs:78
5: 0x55f3fb017b43 - std::panicking::rust_panic_with_hook::hd470ff3b3e7a1b18
at libstd/panicking.rs:480
6: 0x55f3fb0176a9 - std::panicking::continue_panic_fmt::hf0cf39ae1e114602
at libstd/panicking.rs:390
7: 0x55f3fb0175a5 - rust_begin_unwind
at libstd/panicking.rs:325
8: 0x55f3fb05e33b - core::panicking::panic_fmt::hf53111ba26d35bb0
at libcore/panicking.rs:77
9: 0x55f3fb05e26a - core::panicking::panic::h1b11496bce256cfc
at libcore/panicking.rs:52
10: 0x55f3f9a1a8b4 - core_executor::libexecutor::executor::Executor::build_last_hashes::h5ab1efcf40b0554e
at cita-executor/core/src/libexecutor/executor.rs:486
11: 0x55f3f9a1bef9 - core_executor::libexecutor::executor::Executor::call::hbd1af34da45e326d
at cita-executor/core/src/libexecutor/executor.rs:599
12: 0x55f3f9a1b849 - core_executor::libexecutor::executor::Executor::eth_call::hacd192f94f3eed72
at cita-executor/core/src/libexecutor/executor.rs:569
13: 0x55f3f9a17bf6 - <core_executor::libexecutor::executor::Executor as core_executor::contracts::solc::ContractCallExt>::call_method::h8e32db86b0835862
at cita-executor/core/src/contracts/solc/mod.rs:72
14: 0x55f3f988b191 - core_executor::contracts::solc::node_manager::NodeManager::nodes::h1d9e56cc29d33817
at cita-executor/core/src/contracts/solc/node_manager.rs:78
15: 0x55f3f988b491 - core_executor::contracts::solc::node_manager::NodeManager::stake_nodes::ha9df712a34d8ef78
at cita-executor/core/src/contracts/solc/node_manager.rs:114
16: 0x55f3f988b306 - core_executor::contracts::solc::node_manager::NodeManager::shuffled_stake_nodes::hc092801cf1f0bc37
at cita-executor/core/src/contracts/solc/node_manager.rs:102
17: 0x55f3f9a1ef99 - core_executor::libexecutor::executor::Executor::load_config::h686b7372edef0235
at cita-executor/core/src/libexecutor/executor.rs:815
18: 0x55f3f9a1914f - core_executor::libexecutor::executor::Executor::init_executor::hb473eb98c6e145e5
at cita-executor/core/src/libexecutor/executor.rs:322
19: 0x55f3f9769d04 - cita_executor::executor_instance::ExecutorInstance::new::hfd5aac517c96a3ea
at cita-executor/src/executor_instance.rs:83
20: 0x55f3f971f9df - cita_executor::main::hb198fb6b2b5baca1
at cita-executor/src/main.rs:159
21: 0x55f3f973f93f - std::rt::lang_start::{{closure}}::h25cb38f66fbda4a4
at libstd/rt.rs:74
22: 0x55f3fb017542 - std::rt::lang_start_internal::{{closure}}::h444bf05eb286eca1
at libstd/rt.rs:59
- std::panicking::try::do_call::hb527d54965a8815a
at libstd/panicking.rs:310
23: 0x55f3fb027759 - __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:102
24: 0x55f3fb006c65 - std::panicking::try::h83b5294aab121d1a
at libstd/panicking.rs:289
- std::panic::catch_unwind::h15c1ea783c7910d5
at libstd/panic.rs:392
- std::rt::lang_start_internal::hcc3e9196a926118d
at libstd/rt.rs:58
25: 0x55f3f973f917 - std::rt::lang_start::h843cdae6dd764c0d
at libstd/rt.rs:74
26: 0x55f3f971ffb9 - main
27: 0x7fbef30afb96 - __libc_start_main
28: 0x55f3f9715a79 - _start
29: 0x0 -

position:
Thread main panicked at attempt to subtract with overflow, cita-executor/core/src/libexecutor/executor.rs:486

Versions

V0.20.2

Turn off Node Log

Each node generated 4GB of log after 24hours of runtime, anyway to reduce or auto pruning it?

Rewrite config tool

位于scripts/admintool下的脚本工具,用于快速生成节点配置 admintool ,依赖pyethereum一些函数,引入了不必要的依赖,欠缺灵活性,在实际部署中也显得鸡肋,需要用rust来实现一个新的简单工具,实现

  • 生成节点密钥对
  • 生成 genesis.json

Set timestamp of genesis at future time.

Set timestamp of genesis at future time.

Description

The args timestamp in create_cita_config not work.

Steps to Reproduce

NOW TIME: 2019/3/14 15:27:36

Future Time:
PK TIME: 2019/3/14 15:40:00
UNIX TIMESTAMP: 1552549200000

Initial chain with future time

sudo ./env.sh ./scripts/create_cita_config.py create --super_admin "0x4b5ae4567ad5d9fb92bc9afd6a657e6fa13a2523" --nodes "127.0.0.1:4000" --timestamp 1552549200000

setup and start node immediately(Before Future Time)

Expected behavior:

No block created before Future Time.

Actual behavior:

Block created once node started.

Reproduce how often:
everytime

Versions

develop

Additional Information

------------------Chinese-------------------

Create 配置:指定创世块时间戳,--timestamp 取未来时间时,未到达未来时间也一直出块

timestamp

6f4eaf7a: queryUsersOfPermission(uint8) error

I was able to add the create permission to address c522a28a1d9709bd451b651376a23134b83a529.

And it works but when I look the permission using queryPermission


curl -X POST --data '{"jsonrpc":"2.0","method":"eth_call",
"params":[{"to":"0x00000000000000000000000000000000013241a4",
"data":"0x54ad6352000000000000000000000000c522a28a1d9709bd451b651376a23134b83a5296"}, "0x6"],"id":2}' 127.0.0.1:1337 | jq 

it returns

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000"
}

Think it means the address does not have the privilege to read nor create, it is a mistake or bug?

evmr执行solidity的now返回的是毫秒,而同样的solidity代码在ethereum上now字段是秒

Issue Template

evmr执行solidity的now返回的是毫秒,而同样的solidity代码在ethereum上now字段是秒,这是bug还是设计成这样?

Description

cita version V0.19
evmr执行solidity的now返回的是毫秒,而同样的solidity代码在ethereum上now字段是秒,这是bug还是设计成这样?

Versions

V0.19

solidity doc:

now (uint): current block timestamp (alias for block.timestamp)

simple test contract

pragma solidity ^0.4.24;

contract SimpleTest {
function getTime() public constant returns (uint retVal){
return now;
}

}

bug : ./env.sh ./script/create_cita_config.py create --help

./env.sh ./script/create_cita_config.py create --help
docker container cita_run_Users_macos_cita_cita_secp256k1_sha3 is already running
error: exec: "./script/create_cita_config.py": stat ./script/create_cita_config.py: no such file or directory

./env.sh ./scripts/create_cita_config.py create --help
docker container cita_run_Users_macos_cita_cita_secp256k1_sha3 is already running
usage: create_cita_config.py create [-h]

mac os high sierra 10.13
docker version 18.06.0-ce

Do we need a cita_play image?

Description

A full image including all the dependent parts of CITA. You can play CITA using this image without other operation. such as TiDB of PinCap.

Now we need to pull the cita_build after we git clone the code if we want to use the latest branch.
Pull the cita_run image to run the CITA if we use the release version.

Additional Information

-------------------Chinese--------------

我们是否需要一个开箱即用的镜像?目前的情况是如果我们用最新的 develop 分支,就得拉取 cita_build 镜像编译,如果想要使用发布版,需要拉取 cita_run 镜像运行

文档中的内容链接打不开

文档中的内容链接打不开

Description

CITA文档中,系统管理-->系统配置部分,"调用接口,可以参考 sys_config.sol 合约中的 SysConfigInterface" ,这里的链接(sys_config.sol)点开网页显示404错误

Reproduce how often: [What percentage of the time does it reproduce?]

Versions

文档中右上角点解“latest”,

Native executor

How can I run a native code on the cita? I mean, some codes like python, go, rust and etc. not solidity.
I find support on the document which says that support native executor, but I do not know how and I didn't see any support in the source code.

Too many sst files of rocksdb.

Description

TBD

Steps to Reproduce

TBD

Expected behavior: TBD

Actual behavior: TBD

Reproduce how often: TBD

Versions

0.20.2

Additional Information

------------------Chinese-----------------------------

CITA 长时间运行后发现 rocksdb 会生成较多的 sst 文件,测试链运行 3 个月,数据大小 30G,nosql 目录下接近 200W 个 sst 文件,导致 CITA-chain CPU 占用率 持续增长(偶尔出现卡顿 不出块 不知道是否和这个有关系),inode 占比 30% ,目测 在 4c 8G 100G 硬盘的服务器 启动一个节点 运行一年 inode 会满, 是否有办法 控制 sst 生成的文件数量的,同时 不要把所有的 sst 文件放在 nosql一级目录下,可以按hash 目录索引 ,目录下存放子目录再放 sst。

I can get the out of gas error while following test_out_of_quota.md

I'm now running the cita out of container, using solc version of 4.23, while following the steps in test_out_of_quota.md, in step 6, I do can get the out of gas error information.

# python get_receipt.py
--> {"params": ["7da081c919f25cdfe856e3535a4d291e38315f887a785a52b75ef5a3db8c9489"], "jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "id": 1}
<-- {"jsonrpc":"2.0","id":1,"result":{"transactionHash":"0x7da081c919f25cdfe856e3535a4d291e38315f887a785a52b75ef5a3db8c9489","transactionIndex":"0x0","blockHash":"0x99363e5f0966c9f8d81902e3a6d89b38a2fc43ddb1f6f5b31aafb687566e1478","blockNumber":"0x9d8","cumulativeGasUsed":"0x98967f","gasUsed":"0x98967f","contractAddress":null,"logs":[],"root":null,"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","errorMessage":"Out of gas."}} (200 OK)
{
  "contractAddress": null,
  "cumulativeGasUsed": "0x98967f",
  "logs": [],
  "blockHash": "0x99363e5f0966c9f8d81902e3a6d89b38a2fc43ddb1f6f5b31aafb687566e1478",
  "transactionHash": "0x7da081c919f25cdfe856e3535a4d291e38315f887a785a52b75ef5a3db8c9489",
  "root": null,
  "errorMessage": "Out of gas.",
  "blockNumber": "0x9d8",
  "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  "transactionIndex": "0x0",
  "gasUsed": "0x98967f"
}

returns error when run scripts "creat_cita_config.py -h"

When I run command : "creat_cita_config.py -h " in terminal,
it returns error like this :
Traceback (most recent call last):
File "./scripts/create_cita_config.gy", line 12, in
import toml
ModuleNotFundError: No module named 'toml'

contributing

hi janx
i have been working very hard on peatio 100s of comits for a while now
security fixes 30 vulnrabilitys patched
installer
new ui
a lot of stuff...
i am wondering could i get an invite to main repo as colaborator and handle it
until you guys return?

executor log error

============================
stack backtrace:
0: 0x55e1bee94d2c - backtrace::backtrace::trace::hfa99d66440780557
1: 0x55e1bee93fa2 - <backtrace::capture::Backtrace as core::default::Default>::default::h4d3bf2e7afd53899
2: 0x55e1bee94018 - backtrace::capture::Backtrace::new::h92a28e62d17e981a
3: 0x55e1bee932c8 - panic_hook::panic_hook::h55dfb5afe5d6dd62
4: 0x55e1bee93008 - core::ops::function::Fn::call::h69f2a83f466ea8ca
5: 0x55e1bf215cb3 - std::panicking::rust_panic_with_hook::hd470ff3b3e7a1b18
at libstd/panicking.rs:480
6: 0x55e1bf215819 - std::panicking::continue_panic_fmt::hf0cf39ae1e114602
at libstd/panicking.rs:390
7: 0x55e1bf21577d - std::panicking::begin_panic_fmt::hfc5862442bd06bfc
at libstd/panicking.rs:345
8: 0x55e1bea0c9fe - pubsub_rabbitmq::start_rabbitmq::he6c8371c0b59984b
9: 0x55e1be9d6c92 - pubsub::start_pubsub::h581a16243424a36a
10: 0x55e1bea0516b - cita_executor::main::h04c21ec32e368309
11: 0x55e1be9f2d12 - std::rt::lang_start::{{closure}}::hd34a6701a77946b5
12: 0x55e1bf2156b2 - std::rt::lang_start_internal::{{closure}}::h444bf05eb286eca1
at libstd/rt.rs:59
- std::panicking::try::do_call::hb527d54965a8815a
at libstd/panicking.rs:310
13: 0x55e1bf2258c9 - __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:102
14: 0x55e1bf204df5 - std::panicking::try::h83b5294aab121d1a
at libstd/panicking.rs:289
- std::panic::catch_unwind::h15c1ea783c7910d5
at libstd/panic.rs:392
- std::rt::lang_start_internal::hcc3e9196a926118d
at libstd/rt.rs:58
15: 0x55e1bea06663 - main
16: 0x7fcd89c6eb96 - __libc_start_main
17: 0x55e1be9ba359 - _start
18: 0x0 -

position:
Thread main panicked at failed to open url amqp://guest:guest@localhost/test-chain/0 : IoError(AddrNotAvailable), /opt/.cargo/git/checkouts/cita-common-1aad419f3e80ba17/1b308bc/pubsub_rabbitmq/src/lib.rs:59

Contract arguments as a conf file.

Description

There are two many contract argements, how about using a config file such as init_data.yml?

Additional Information

--------Chinese------

合约的配置项太多了,是否考虑用配置文件代替?

getFilterChanges returns current block instead of next block

Expected behavior: [What you expect to happen]

I created a new block filter at height of 3000, and get changes of the filter, it's expected to get block at height of 3001

Actual behavior: [What actually happens]

Block at height of 3000 returned.

Versions

v0.20

Documentation update

Seems like the new version of the cita has

    '0x00000000000000000000000000000000013241a2': {'file': 'system/node_manager.sol',
                                                   'name': 'NodeManager'},
    '0x00000000000000000000000000000000013241a3': {'file': 'system/quota_manager.sol',
                                                   'name': 'QuotaManager'},
    '0x00000000000000000000000000000000013241a4': {'file': 'system/permission_manager.sol',
                                                   'name': 'PermissionManager'},
    '0x00000000000000000000000000000000013241a5': {'file': 'permission/permission_system.sol',
                                                   'name': 'PermissionSystem'},
    '0x0000000000000000000000000000000031415926': {'file': 'system/param_constant.sol', 'name': 'ParamConstant'},
    '0x00000000000000000000000000000000013241b2': {'file': 'permission_management/permission_management.sol','name': 'PermissionManagement'},
    '0x00000000000000000000000000000000013241b3': {'file': 'permission_management/permission_creator.sol',  'name': 'PermissionCreator'},
    '0x00000000000000000000000000000000013241b4': {'file': 'permission_management/authorization.sol',  'name': 'Authorization'},
    '0x00000000000000000000000000000000013241b5': {'file': 'permission_management/permission.sol', 'name': 'Permission'},

9 system smart contracts,

while https://cryptape.github.io/cita/usage-guide/admintool/

only show 5 available contracts. Can you update the documentation?

Lint python code and add it to CI.

Description

Lint the Pyhon and add it in CI.

Versions

develop

Additional Information

----------------Chinese------------------------

在 CI 中加入 Python code lint 来规范代码.

make release error

error: failed to run custom build command for libsodium-sys v0.0.14 (https://github.com/cryptape/sodiumoxide.git#c324e11a)
process didn't exit successfully: /opt/export/app/evm-cita/cita/target/release/build/libsodium-sys-835e5eb911e0ed28/build-script-build (exit code: 101)
--- stderr
thread 'main' panicked at 'called Result::unwrap() on an Err value: "Failed to run \"pkg-config\" \"--libs\" \"--cflags\" \"libsodium\": No such file or directory (os error 2)"', /checkout/src/libcore/result.rs:860
note: Run with RUST_BACKTRACE=1 for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed
Makefile:20: recipe for target 'release' failed
make: *** [release] Error 101

some question in cita V0.13

When you release cita V0.13, it seems that you havent release cita-tendenmit and cita-forever in your source code. How can I get stable version of these two submodule?

Speed up installation process (scripts/install_develop.sh)

My Environment

  • Host System:

    • MacBook Pro (Retina, 13-inch, Mid 2014)
    • Processor: 2.6 GHz Intel Core i5
    • Memory: 8 GB 1600 MHz DDR3
  • VM System:

    • Ubuntu 16.04.3
    • Processor: 2 CPU
    • Memory: 3 GB

The Problem

On my machine scripts/install_develop.sh takes more than 13 minutes to finish. In some conditions(poor network, poor machine), it may takes more than 30 minutes, which will trigger sudo timeout then fail the installation process. Because download and build solidity is time consuming.

Solutions

Install solidity from PPA (downside: latest stable version only)

sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install -y solc

Install solidity by download static linked binary file

wget https://github.com/ethereum/solidity/releases/download/v0.4.19/solc-static-linux
chmod +x solc-static-linux
sudo mv solc-static-linux /usr/local/bin/solc

Either way, I can make a PR.

Network module integrates p2p protocol.

Description

Uses p2p protocol in CITA network, instead of using a "network config file" to manage nodes "IN" or "OUT" the network before.

Steps to Reproduce

Omits

Versions

develop

Additional Information

---------------Chinese--------------

Network 模块使用 p2p 协议。
改变原CITA系统必须通过改变network的配置文件来增加、删除节点的设计。
使得CITA节点在接入网络时可以被相互发现、自动建立连接。

Information error in test_16_param.md

In cita/scripts/contracts/tests/doc/test_16_param.md, the last line information should be:

check the num: 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8

while considering the corresponding contract content of test_16_param.sol

start node 0 errror

Issue Template

Description

[Description of the issue]

Steps to Reproduce

Thread main panicked at failed to open url amqp://guest:guest@localhost/test-chain/0 : Protocol("Connection reset by peer (os error 104)"), /opt/.cargo/git/checkouts/cita-common-1aad419f3e80ba17/4f6bbf9/pubsub_rabbitmq/src/lib.rs:58

This is a bug. Please report it at:

https://github.com/cryptape/cita/issues/new

Rabbitmq connection refused need better error message

2018-02-15T23:50:57.335987479-06:00 - INFO - CITA:jsonrpc
2018-02-15T23:50:57.336084466-06:00 - INFO - Value for config: jsonrpc.toml
2018-02-15T23:50:57.336224077-06:00 - INFO - CITA:jsonrpc config
 "backlog_capacity = 1000\n\n[profile_config]\nenable = false\nflag_prof_start = 0\nflag_prof_duration = 0\n\n[http_config]\nenable = true\nlisten_ip = \'0.0.0.0\'\nlisten_port = \'1337\'\ntimeout = 3\nallow_origin = \'*\'\n\n[ws_config]\nenable = true\nthread_number = 2\nlisten_ip = \'0.0.0.0\'\nlisten_port = \'4337\'\nmax_connections = 800\nqueue_size = 200\npanic_on_new_connection = false\npanic_on_shutdown = false\nfragments_capacity = 100\nfragments_grow = true\nfragment_size = 65535\nin_buffer_capacity = 2048\nin_buffer_grow = true\nout_buffer_capacity = 2048\nout_buffer_grow = true\npanic_on_internal = true\npanic_on_capacity = false\npanic_on_protocol = false\npanic_on_encoding = false\npanic_on_queue = false\npanic_on_io = false\npanic_on_timeout = false\nshutdown_on_interrupt = true\nmasking_strict = false\nkey_strict = false\nmethod_strict = false\nencrypt_server = false\ntcp_nodelay = false\n\n[new_tx_flow_config]\ncount_per_batch = 30\nbuffer_duration = 30000000\n"
2018-02-15T23:50:57.340680519-06:00 - ERROR -
============================
stack backtrace:
   0:     0x55a4235487ec - backtrace::backtrace::trace::h253bc8b5b867400a
   1:     0x55a423548822 - backtrace::capture::Backtrace::new::h95e193ae7a0c60b0
   2:     0x55a42345b234 - panic_hook::panic_hook::hd081f29177483d0b
   3:     0x55a42345aef8 - core::ops::function::Fn::call::hd704e9c92e7d7362
   4:     0x55a4235a0d55 - std::panicking::rust_panic_with_hook
                        at /checkout/src/libstd/panicking.rs:578
   5:     0x55a4235a0b6e - std::panicking::begin_panic<alloc::string::String>
                        at /checkout/src/libstd/panicking.rs:538
   6:     0x55a4235a0ada - std::panicking::begin_panic_fmt
                        at /checkout/src/libstd/panicking.rs:522
   7:     0x55a42351ef33 - pubsub_rabbitmq::start_rabbitmq::h175ce6fe58d57453
   8:     0x55a4232fda04 - pubsub::start_pubsub::h0337618a34bc4b92
   9:     0x55a42326e189 - cita_jsonrpc::main::h3204a7b2a895379a
  10:     0x55a4235b706e - panic_unwind::__rust_maybe_catch_panic
                        at /checkout/src/libpanic_unwind/lib.rs:101
  11:     0x55a42359c2a3 - std::panic::catch_unwind<closure,()>
                        at /checkout/src/libstd/panicking.rs:459
                         - std::rt::lang_start
                        at /checkout/src/libstd/rt.rs:58
  12:     0x7fdfa4d8582f - __libc_start_main
  13:     0x55a4231c7838 - _start
  14:                0x0 - <unknown>

position:
Thread main panicked at failed to open url amqp://guest:guest@localhost/node0 : IoError(ConnectionRefused), /home/parallels/.cargo/git/checkouts/cita-common-1aad419f3e80ba17/b181fca/pubsub_rabbitmq/src/lib.rs:53

Start CITA after bench.

Description

bench before staring CITA.

Steps to Reproduce

  1. bench
  2. start CITA

Expected behavior: Works normal

Actual behavior: Some modules do not work

Reproduce how often: occasionally

Additional Information

------------------Chinese---------------------

先开启压测,往 jsonrpc 尝试死命发交易,然后再起链,有概率个别服务工作不正常

哪个分支是可以成功编译的?

ubuntu@ubuntu:/cita$ git checkout stable_holiday
Already on 'stable_holiday'
Your branch is up-to-date with 'origin/stable_holiday'.
ubuntu@ubuntu:
/cita$
ubuntu@ubuntu:~/cita$ make setup
make: *** No rule to make target 'setup'. Stop.

描述: 同步节点验证块失败,无法完成同步

版本: 0.19

描述: 共识节点执行一条交易结果为 No send transaction permission,而同步节点执行时通过,导致块验证不过,无效。停止同步

触发场景(待复现): 使用用户管理系统合约,步骤如下:

  1. 从 rootGroup 下新建一个 groupA
  2. 赋予 groupA 一个权限,比如: sendTx
  3. 发交易向 groupA 添加一个用户
  4. 用户发送交易
  5. 同步节点从此交易之前的块开始同步

This is a bug

2018-07-04T05:07:43.954864099+00:00 - ERROR - Error in reading loop: Protocol("Connection reset by peer (os error 104)")
2018-07-04T05:07:43.957530230+00:00 - ERROR - Error consuming Protocol("Connection reset by peer (os error 104)")
2018-07-04T05:07:43.958573114+00:00 - ERROR - Error dispatching closing packet to a channel
2018-07-04T05:07:44.058057687+00:00 - ERROR - 
============================
stack backtrace:
   0:     0x55b75ecd0d25 - backtrace::backtrace::libunwind::trace::h5fd4cc63650da222
                        at /opt/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/backtrace-0.3.6/src/backtrace/libunwind.rs:53
                         - backtrace::backtrace::trace::hdc4a854af22ec245
                        at /opt/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/backtrace-0.3.6/src/backtrace/mod.rs:42
   1:     0x55b75eccb70e - backtrace::capture::Backtrace::new_unresolved::h3a0d808bad6c69a5
                        at /opt/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/backtrace-0.3.6/src/capture.rs:88
   2:     0x55b75eccb64d - backtrace::capture::Backtrace::new::ha88481038c6daa72
                        at /opt/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/backtrace-0.3.6/src/capture.rs:63
   3:     0x55b75e8ffa0d - panic_hook::panic_hook::h5dbe4e66376fe369
                        at /opt/.cargo/git/checkouts/cita-common-1aad419f3e80ba17/2752e22/panic_hook/src/lib.rs:51
   4:     0x55b75e900227 - core::ops::function::Fn::call::hbcaefdbbf754f1db
                        at /checkout/src/libcore/ops/function.rs:73
   5:     0x55b75eeb5d65 - std::panicking::rust_panic_with_hook::hc7c9a2f0d99e47e1
                        at libstd/panicking.rs:467
   6:     0x55b75eeb58ec - std::panicking::begin_panic_fmt::h4d3f8afad2489977
                        at libstd/panicking.rs:350
   7:     0x55b75eeb58b1 - rust_begin_unwind
                        at libstd/panicking.rs:328
   8:     0x55b75eefffd2 - core::panicking::panic_fmt::h5ba72226afe9877e
                        at libcore/panicking.rs:71
   9:     0x55b75e30342b - core::result::unwrap_failed::h8e338bf961aaf42d
                        at /checkout/src/libcore/macros.rs:26
  10:     0x55b75e30193d - <core::result::Result<T, E>>::unwrap::hb12a6f3eded9ccf0
                        at /checkout/src/libcore/result.rs:782
  11:     0x55b75e29fe80 - cita_network::main::{{closure}}::ha5b1fb7cf346dc8e
                        at cita-network/src/main.rs:241
  12:     0x55b75e2adbfa - std::sys_common::backtrace::__rust_begin_short_backtrace::heb728656f727ec89
                        at /checkout/src/libstd/sys_common/backtrace.rs:136
  13:     0x55b75e22477f - std::thread::Builder::spawn::{{closure}}::{{closure}}::ha8ad6801e11aa706
                        at /checkout/src/libstd/thread/mod.rs:409
  14:     0x55b75e278f6a - <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h75884c809f4d2dbb
                        at /checkout/src/libstd/panic.rs:305
  15:     0x55b75e251fbf - std::panicking::try::do_call::h98062d424126b860
                        at /checkout/src/libstd/panicking.rs:310
  16:     0x55b75eed4869 - __rust_maybe_catch_panic
                        at libpanic_unwind/lib.rs:105
  17:     0x55b75e25159e - std::panicking::try::h4c37889c1a3ee36e
                        at /checkout/src/libstd/panicking.rs:289
  18:     0x55b75e27903a - std::panic::catch_unwind::h55312cca3f1931fc
                        at /checkout/src/libstd/panic.rs:374
  19:     0x55b75e224009 - std::thread::Builder::spawn::{{closure}}::hd7d87f988d43f4a9
                        at /checkout/src/libstd/thread/mod.rs:408
  20:     0x55b75e2249af - <F as alloc::boxed::FnBox<A>>::call_box::h1d651d4c39ca06af
                        at /checkout/src/liballoc/boxed.rs:638
  21:     0x55b75eec64aa - <alloc::boxed::Box<alloc::boxed::FnBox<A, Output$u3d$R$GT$$u20$$u2b$$u20$$u27$a$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$::call_once::h162c38d561c9dfac
                        at /checkout/src/liballoc/boxed.rs:648
                         - std::sys_common::thread::start_thread::h798b0437f4b504e5
                        at libstd/sys_common/thread.rs:24
  22:     0x55b75eeb31e5 - std::sys::unix::thread::Thread::new::thread_start::hf58dec18aa478933
                        at libstd/sys/unix/thread.rs:90
  23:     0x7f82767d76da - start_thread
  24:     0x7f82762e888e - __clone
  25:                0x0 - <unknown>

position:
Thread <unnamed> panicked at called `Result::unwrap()` on an `Err` value: RecvError, libcore/result.rs:945

Better to kill cita-* process in cita_crosschain.sh for rerunning?

I've seen there's clean data code in cita/tests/integrate_test/cita_crosschain.sh, for rerun test, it would be better to add the kill the cita-* processes, such as:

for pid in cita-forever cita-jsonrpc cita-auth cita-chain cita-network cita-bft trans_evm cita-executor; do
        ps ax |grep ${pid}|awk '{print $1}' |xargs -n 1 -I %  kill -9 % 2>&1 >/dev/null ||true
done

The name of authorities/validators/nodes.

Description

Confused about authorities/validators/nodes

Additional Information

----------------Chinese----------------

authorities/validators/nodes 等变量和方法名称的统一

make docker报错

xxx:cita xxx$ make docker
mkdir -p /tmp/cita/build
cp Dockerfile-build /tmp/cita/build/Dockerfile
docker build -t cita/build /tmp/cita/build
......
docker run -ti -v xxx/Git/cita:/sources -u cita cita/build bash -c  "make setup; make release"
mkdir -p admintool/release/
cp .env admintool/release/
sudo rabbitmqctl add_vhost dev                                  >/dev/null 2>&1 || echo "ok"
ok
sudo rabbitmqctl set_permissions -p dev guest ".*" ".*" ".*"    >/dev/null 2>&1
Makefile:25: recipe for target 'setup' failed
make: *** [setup] Error 1
RUSTFLAGS='-F warnings' cargo build --release --all
    Updating registry `https://github.com/rust-lang/crates.io-index`

make docker运行到这里就不往下继续运行了。

运行环境

  • Darwin MacBook-Pro.local 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64

run ./env.sh ./tests/integrate_test/cita_basic.sh error.

ubuntu 18.04 x64

mike@mikeu:~/cita$ sudo ./env.sh ./tests/integrate_test/cita_basic.sh
docker container cita_build_home_mike_cita is already running
0) prepare  ...  DONE
1) cleanup   ...  DONE
2) generate config  ...  DONE
3) start nodes  ...  DONE
4) check height growth normal  ...  57s DONE
5) stop node3, check height growth  ...  ok
1s DONE
6) stop node2, check height stopped  ...  ok
31s DONE
7) start node2, check height growth  ...  ok
16s DONE
8) start node3, check synch  ...  ok
28s DONE
9) stop all nodes, check height changed after restart  ...  ok
ok
ok
ok
ok
ok
ok
ok
FAILED
failed to check_height_growth 0: failed to check_height_growth 0 300: failed to get_height(old): timeout: 60

Question regarding Quota

The whitepaper mentions

Native executor consumes quota as a realtime clock ticks

So that means that quota is how long a Nervos smart contract can run [in terms of seconds] (unlike the EVM where the gas limit is how many computational steps it can take)?

What happens if the time differs between miners (for example, quota is reached for one miner, but not the other miner because he has more compute resources)?

Build failed in Max OS 10.13.3

error message is :

 = note: ld: library not found for -lprofiler
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: aborting due to previous error

another bug

2018-12-26T12:58:14.695413766+00:00 - ERROR -

stack backtrace:
0: 0x55c38577946c - backtrace::backtrace::trace::hfa99d66440780557
1: 0x55c3857786e2 - <backtrace::capture::Backtrace as core::default::Default>::default::h4d3bf2e7afd53899
2: 0x55c385778758 - backtrace::capture::Backtrace::new::h92a28e62d17e981a
3: 0x55c385777a08 - panic_hook::panic_hook::h55dfb5afe5d6dd62
4: 0x55c385777748 - core::ops::function::Fn::call::h69f2a83f466ea8ca
5: 0x55c385ae47e3 - std::panicking::rust_panic_with_hook::hd470ff3b3e7a1b18
at libstd/panicking.rs:480
6: 0x55c385ae4349 - std::panicking::continue_panic_fmt::hf0cf39ae1e114602
at libstd/panicking.rs:390
7: 0x55c385ae4245 - rust_begin_unwind
at libstd/panicking.rs:325
8: 0x55c385b2a92b - core::panicking::panic_fmt::hf53111ba26d35bb0
at libcore/panicking.rs:77
9: 0x55c38551dfe8 - core::result::unwrap_failed::hf395bb686c368e81
10: 0x55c3854f84a3 - cita_chain::main::h0f9ea20d587582a3
11: 0x55c3854f4252 - std::rt::lang_start::{{closure}}::hc641f19ed944e557
12: 0x55c385ae41e2 - std::rt::lang_start_internal::{{closure}}::h444bf05eb286eca1
at libstd/rt.rs:59
- std::panicking::try::do_call::hb527d54965a8815a
at libstd/panicking.rs:310
13: 0x55c385af43f9 - __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:102
14: 0x55c385ad6585 - std::panicking::try::h83b5294aab121d1a
at libstd/panicking.rs:289
- std::panic::catch_unwind::h15c1ea783c7910d5
at libstd/panic.rs:392
- std::rt::lang_start_internal::hcc3e9196a926118d
at libstd/rt.rs:58
15: 0x55c3854f8643 - main
16: 0x7ff40295bb96 - __libc_start_main
17: 0x55c3854e19b9 - _start
18: 0x0 -

position:
Thread main panicked at called Result::unwrap() on an Err value: "Invalid argument: You have to open all column families. Column families not opened: col6, col1, col0, col2, col3, col4, col5", libcore/result.rs:1009

...skipping...
stack backtrace:
0: 0x55cfa754d46c - backtrace::backtrace::trace::hfa99d66440780557
1: 0x55cfa754c6e2 - <backtrace::capture::Backtrace as core::default::Default>::default::h4d3bf2e7afd53899
2: 0x55cfa754c758 - backtrace::capture::Backtrace::new::h92a28e62d17e981a
3: 0x55cfa754ba08 - panic_hook::panic_hook::h55dfb5afe5d6dd62
4: 0x55cfa754b748 - core::ops::function::Fn::call::h69f2a83f466ea8ca
5: 0x55cfa78b87e3 - std::panicking::rust_panic_with_hook::hd470ff3b3e7a1b18
at libstd/panicking.rs:480
6: 0x55cfa78b8349 - std::panicking::continue_panic_fmt::hf0cf39ae1e114602
at libstd/panicking.rs:390
7: 0x55cfa78b8245 - rust_begin_unwind
at libstd/panicking.rs:325
8: 0x55cfa78fe92b - core::panicking::panic_fmt::hf53111ba26d35bb0
at libcore/panicking.rs:77
9: 0x55cfa72f1fe8 - core::result::unwrap_failed::hf395bb686c368e81
10: 0x55cfa72cc4a3 - cita_chain::main::h0f9ea20d587582a3
11: 0x55cfa72c8252 - std::rt::lang_start::{{closure}}::hc641f19ed944e557
12: 0x55cfa78b81e2 - std::rt::lang_start_internal::{{closure}}::h444bf05eb286eca1
at libstd/rt.rs:59
- std::panicking::try::do_call::hb527d54965a8815a
at libstd/panicking.rs:310
13: 0x55cfa78c83f9 - __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:102
14: 0x55cfa78aa585 - std::panicking::try::h83b5294aab121d1a
at libstd/panicking.rs:289
- std::panic::catch_unwind::h15c1ea783c7910d5
at libstd/panic.rs:392
- std::rt::lang_start_internal::hcc3e9196a926118d
at libstd/rt.rs:58
15: 0x55cfa72cc643 - main
16: 0x7ffb8966ab96 - __libc_start_main
17: 0x55cfa72b59b9 - _start
18: 0x0 -

position:
Thread main panicked at called Result::unwrap() on an Err value: "Invalid argument: You have to open all column families. Column families not opened: col6, col1, col0, col2, col3, col4, col5", libcore/result.rs:1009

This is a bug. Please report it at:

https://github.com/cryptape/cita/issues/new

============================

What's the main difference between block_gas_limit and account_gas_limit for CITA?

I'm not sure the main design principle for block_gas_limit and accout_gas_limit, in cita-common/libproto/src/protos/blockchain.proto and auth.proto.
It seemed that there's no account gas limit in Ethereum.

Any help appreciated.

message BlockTxHashes {
    uint64 height = 1;
    repeated bytes tx_hashes = 2;
    uint64 block_gas_limit = 3;
    AccountGasLimit account_gas_limit = 4;
    bool check_quota = 5;
}
message AccountGasLimit {
    uint64 common_gas_limit = 1;
    map<string,uint64> specific_gas_limit = 2;
}

创建合约查询合约地址相同

通过cita_getTransaction rpc接口生成合约,在通过eth_getTransactionReceipt获取得带contractAddress都是以一样的。 在用contractaddress 通过eth_getCode 获取合约也获取不到。。

Ordinary nodes can't sync blocks case of different result when executing a tx.

Description

Ordinary nodes can't sync blocks cause of different result when executing a tx.

Steps to Reproduce

  1. Create a new group from the rootGroup: groupA
  2. Grant a permission to the GroupA: sendTx
  3. Add a new account to the GroupA; userA
  4. UserA send a transaction and it is blocked at next height.
  5. ordinary sync the blocks

Expected behavior: ordinary can sync the blocks to the latest.

Actual behavior: Stop at a height

Reproduce how often: Once

Versions

0.19

Additional Information

=============Chinese==============
版本: 0.19

描述: 共识节点执行一条交易结果为 No send transaction permission,而同步节点执行时通过,导致块验证不过,无效。停止同步

触发场景(待复现): 使用用户管理系统合约,步骤如下:

  1. 从 rootGroup 下新建一个 groupA
  2. 赋予 groupA 一个权限,比如: sendTx
  3. 发交易向 groupA 添加一个用户: UserA
  4. UserA发送交易,并且交易精确的在下一个高度被打包进块
  5. 同步节点从此交易之前的块开始同步

admintool.sh problem: TypeError: 'zip' object does not support item deletion

Python 3.6.3
make debug builds successfully

workspace/cita$ admintool.sh 
Step 1: ********************************************************
Start generating private Key for Node 0 !
[PrivateKey Path] :  /media/mingrui/960EVO/workspace/cita/node0
End generating private Key for Node 0 !
Start creating Network Node 0 Configuration!
Traceback (most recent call last):
  File "/media/mingrui/960EVO/workspace/cita/target/install/scripts/admintool/create_network_config.py", line 34, in <module>
    main()
  File "/media/mingrui/960EVO/workspace/cita/target/install/scripts/admintool/create_network_config.py", line 22, in main
    del ip_list[nid]
TypeError: 'zip' object does not support item deletion

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.