Coder Social home page Coder Social logo

vechain / thor Goto Github PK

View Code? Open in Web Editor NEW
797.0 140.0 248.0 12.06 MB

A general purpose blockchain highly compatible with Ethereum's ecosystem

License: GNU Lesser General Public License v3.0

Makefile 0.14% Go 97.82% HTML 0.11% Dockerfile 0.03% Solidity 1.25% JavaScript 0.65%
vechain blockchain node thor

thor's Introduction



Getting Started

VechainThor is the layer 1 blockchain, highly compatible with EVM*, which powers the vechain ecosystem. VechainThor is a public blockchain that is designed for the mass adoption of blockchain technology by enterprise users of all sizes and is intended to serve as a foundation for a sustainable and scalable enterprise blockchain ecosystem.

VechainThor is currently up-to-date with the EVM's paris hard fork, set evmVersion to paris if you are using solidity compiler version 0.8.20 or above.


Documentation

  • Build - How to build the thor binary.
  • Usage - How to run thor with different configurations.
  • Hosting a Node - Considerations and requirements for hosting a node.
  • Core Concepts - Core concepts of the VechainThor blockchain.
  • API Reference - The API reference for the VechainThor blockchain.

Community

The VechainThor community can be found on Discourse where you can ask questions, voice ideas, and share your projects with other people.

The Vechain Improvement Proposals (VIPs) repository can be found here.

To chat with other community members you can join:

Do note that our Code of Conduct applies to all vechain community channels. Users are highly encouraged to read and adhere to them to avoid repercussions.


Contributing

Contributions to VechainThor are welcome and highly appreciated. However, before you jump right into it, we would like you to review our Contribution Guidelines to make sure you have a smooth experience contributing to VechainThor.


Security

If you believe you have found a security vulnerability in Thor, we encourage you to responsibly disclose this and NOT open a public issue. We will investigate all legitimate reports.

Email [email protected] to disclose any security vulnerabilities. Alternatively, you can visit this link to submit a ticket or find more information.


Acknowledgement

A special shout out to following projects:


License

Vechain Thor is licensed under the GNU Lesser General Public License v3.0, also included in LICENSE file in repository.

thor's People

Contributors

ahasikos avatar artimunor avatar claytonneal avatar darrenvechain avatar deekor avatar dependabot[bot] avatar dinn2018 avatar ifavo avatar joeabbey avatar kgapos avatar laalaguer avatar leszek-vechain avatar libotony avatar llmgogo avatar llyangithub avatar makischristou avatar mirei83 avatar otherview avatar paologalligit avatar qianbin avatar targunitoth avatar terry900624 avatar thevechain avatar uldaman avatar waqarahmedvc avatar xenide avatar xjwx89 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

thor's Issues

NO VET TOKENS IN MOBILE AND SYNC WALLET

Hi - I just wanted to let you know that I couldn't withdraw my VET from the mobile wallet that I downloaded on my Iphone so I uninstalled and re installed a new wallet using my seed words and my original password and there is nothing there. When I tried to withdraw my VET from the mobile wallet, I put in the address to the Sync wallet - the mobile wallet didn't say that it sent the tokens because it kept saying my password was incorrect.

So, now, there is nothing in the mobile wallet and nothing in the Sync wallet. What happened to my VET tokens? Could someone retrieve them for me? This wasn't my fault.

No paste password for withdrawals on OSX mobile APP

I tried to withdraw my VTHO from my VeChainThor Wallet OSX mobile app on my iPhone X and at the end it asks for my password, but the input text field does not have the paste feature working.

My password is very long so this is very inconvenient. Please Fix VeChain!

get DisallowUnknownFields undefined Error when make

OS Version:

OSX

Expected behavior

Can make

Actual behavior

undefined Error

➜  thor git:(master) ✗ make
# github.com/vechain/thor/vendor/github.com/vechain/thor/api/utils
vendor/github.com/vechain/thor/api/utils/http.go:81:9: decoder.DisallowUnknownFields undefined (type *json.Decoder has no field or method DisallowUnknownFields)
make: *** [thor] Error 2

invalid memory address or nil pointer dereference

Hi there,

Please notice that this is an issue tracker reserved for bug reports and feature requests.

For general questions please use the gitter channel.

OS Version:

Windows

Commit hash : (if develop)

Expected behavior

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x997ad0]

goroutine 240 [running]:
github.com/vechain/thor/cmd/thor/node.(*Node).txStashLoop(0xc042e2e720, 0xbd7ec0, 0xc0422e6b40)
D:/Code/GoCode/src/github.com/vechain/thor/cmd/thor/node/node.go:223 +0x580
github.com/vechain/thor/cmd/thor/node.(*Node).Run.func2()
D:/Code/GoCode/src/github.com/vechain/thor/cmd/thor/node/node.go:77 +0x43
github.com/vechain/thor/co.(*Goes).Go.func1(0xc042e2e720, 0xc042e24740)
D:/Code/GoCode/src/github.com/vechain/thor/co/goes.go:22 +0x56
created by github.com/vechain/thor/co.(*Goes).Go
D:/Code/GoCode/src/github.com/vechain/thor/co/goes.go:20 +0x69

Steps to reproduce the behavior

just run the thor client

A vechain smart contract debugging tool

Hi guys,

I developed a small tool for vechain smart contract development and testing.

When developing smart contracts on Ethereum, we can use various auxiliary tools such as metamask, truffle, galance, etc.
But currently vechain still lacks similar tools. So I wrote a ugly tool as a start. (^_^) I hope to help the ecology of vechain.

the github:
https://github.com/wupeaking/vechaintool

some Screenshot:
tx

encode

Invalid Argument during initialization when mounting the default volume on Docker (Windows)

OS Version:

Windows 10

Commit hash : Master

Expected behavior

To well, you know, start up

Actual behavior

If i omit the volume, it starts up without any problems, but doing so loses all data on restart, obviously
Writes 2 lines of the following log then quits container
Fatal: open chain database [/root/.org.vechain.thor/instance-39627e6be7ec1b4a/main.db]: sync /root/.org.vechain.thor/instance-39627e6be7ec1b4a/main.db: invalid argument

Fatal: open chain database [/root/.org.vechain.thor/instance-39627e6be7ec1b4a/main.db]: sync /root/.org.vechain.thor/instance-39627e6be7ec1b4a/main.db: invalid argument

Steps to reproduce the behavior

  • Ensure this directory exists : c:\temp\VeChainData
  • Run the following in Powershell
    docker run -d -p 127.0.0.1:8669:8669 -p 11235:11235 -p 11235:11235/udp -v //c/temp/VeChainDat a:/root/.org.vechain.thor --name thor-node vechain/thor --network main --api-addr 0.0.0.0:8669

NO VET IN ONLINE WALLET

Hi - I just wanted to let you know that I couldn't withdraw my VET from the mobile wallet that I downloaded on my Iphone so I uninstalled and re installed a new wallet using my seed words and my original password and there is nothing there. When I tried to withdraw my VET from the mobile wallet, I put in the address to the Sync wallet - the mobile wallet didn't say that it sent the tokens because it kept saying my password was incorrect.

So, now, there is nothing in the mobile wallet and nothing in the Sync wallet. What happened to my VET tokens? Could someone retrieve them for me? This wasn't my fault.

Subscriptions for transactions

The current API only offers subscriptions/transfer which only return VET transfers

Is it possible to provide a subscriptions feature for all transactions like VET transfer, token transfers, smart contract executions etc.

stack=Error: http: request body too large

OS Version:

Windows/Linux/OSX

Expected behavior

Transaction should succeed and receipt should be generated.

Actual behavior

Error occurred with below message.
stack=Error: http: request body too large

Steps to reproduce the behavior

Send data greater than 96Kb to Thor node using Thorify "sendSignedTransaction".

image

you can't quit, When the running time is long

OS Version:

OSX

Commit hash : (if develop)

Expected behavior

Tell us what should happen.
quit smoothly

Actual behavior

Tell us what happens instead. Provide a log message if relevant.

INFO[07-02|11:06:59] imported blocks (1) pkg=node txs=0 mgas=0.000 et=925.518µs|356.611µs mgas/s=0.000 id=[#18392…be69feae]
^CINFO[07-02|11:07:06] exit signal received signal=interrupt
INFO[07-02|11:07:06] stopping API server...
^[[A^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^CINFO[07-02|11:07:18] imported blocks (1) pkg=node txs=0 mgas=0.000 et=770.522µs|281.373µs mgas/s=0.000 id=[#18393…3010bc17]
^C^C^C^C^CINFO[07-02|11:07:48] imported blocks (3) pkg=node txs=0 mgas=0.000 et=2.140ms|786.194µs mgas/s=0.000 id=[#18396…7ecdd160]
^C^C^C^C^C^CINFO[07-02|11:08:19] imported blocks (4) pkg=node txs=0 mgas=0.000 et=2.855ms|969.433µs mgas/s=0.000 id=[#18400…a432b3d9]
^C^C^C^C^C^C^C^C^C^C^C^C^C^C^CSIGABRT: abort
PC=0x405a7cb m=0 sigcode=0

Steps to reproduce the behavior

run it by ./bin/thor --network main about 20minutes, then this problem occured

"No Internet access" error on IOS app

Hi ,

When trying to use the token swap service from the IOS wallet I get "no internet access" message.  I select my wallet and when I click confirm the message appears, preventing me from continue with the swap process. 
 I tested the internet connection from several other apps and the phone does have Internet access. 

Thanks !.

img_6043

img_6044

Last commit breaks "make all"

Hi there,

OS Version: Debian 9 x64

I have tried to build the vechain node on a fresh Debian 9 with my little installscript (https://github.com/mirei83/vechain-deploy/blob/master/VechainThorNode-deploy.sh) that used to work fine. Now it fails at "make all" with

[...]
github.com/vechain/thor/vendor/github.com/vechain/thor/cmd/thor/solo
github.com/vechain/thor/vendor/github.com/vechain/thor/cmd/thor/node
github.com/vechain/thor/vendor/github.com/vechain/thor/api
github.com/vechain/thor/cmd/thor
github.com/vechain/thor/cmd/thor
cmd/thor/main.go:178:25: too many arguments in call to solo.New
have (*chain.Chain, *state.Creator, *logdb.LogDB, *txpool.TxPool, uint64, bool)
want (*chain.Chain, *state.Creator, *logdb.LogDB, *txpool.TxPool, bool)
Makefile:19: recipe for target 'thor' failed
make: *** [thor] Error 2

Removing "uint64(ctx.Int("gas-limit"))," from the last commit from "solo.go" (91fdd57#diff-fe708c87da99abdd0c8bcd23bf92f6e5) resolves the problem.

Latest Thor 1.0.4 displays v1.0.3 in Swagger UI

Hi there,

Please notice that this is an issue tracker reserved for bug reports and feature requests.

For general questions please use the gitter channel.

OS Version:

Linux

Commit hash : (if develop)

master / latest

Expected behavior

Swagger UI should display 1.0.4

Actual behavior

Swagger UI displays version 1.0.3

Steps to reproduce the behavior

Navigate to Thor localhost:8669 using a browser

How to get the VTHO for testnet?

Hi there,

Please notice that this is an issue tracker reserved for bug reports and feature requests.

For general questions please use the gitter channel.

OS Version:

Windows/Linux/OSX

Commit hash : (if develop)

Expected behavior

Tell us what should happen.

Actual behavior

Tell us what happens instead. Provide a log message if relevant.

Steps to reproduce the behavior

The Transaction Model in Thor Wiki maybe is out of date.

The Example In Thor Code don't have "from" field, but the description in wiki including that:

chainTag : uint8, last byte of the genesis block ID.
blockRef : uint64 Default is best block, The BlockRef(an eight-byte array) includes two parts: the first four bytes contains the block height (number) and the rest four bytes a part of the referred block’s ID.
expiration : uint32 Default is 0 . Number of blocks that can be used to specify when the transaction expires[1].Specifically, Expiration+BlockRef[:4] defines the height of the latest block that the transaction can be packed into.
clauses : array an array of “clause” objects each of which contains fields “To”, “Value” and “Data” to enable single “from” coupling with multiple “to”
from : string ,20bytes, The address for the sending account.
to (optional) : string,20bytes, The destination address of the message, left undefined for a contract-creation transaction.
value(optional) :string(hex), The value transferred for the transaction in Wei, also the endowment if it’s a contract-creation transaction.
gasPriceCoef :uint8 , Default is 0, gasPriceCoef required range of ∈[0,255] . [2]
gas :uint64, The amount of gas to use for the transaction.
dependsOn: string, ID of the transaction on which the current transaction depends
nonce :uint64 transaction nonce customizable by user .
reserved : array Must be empty array.
Signature : signature of the hash of the transaction body 𝛺, that is, 𝑠𝑖𝑔𝑛𝑎𝑡𝑢𝑟𝑒 = 𝑠𝑖𝑔𝑛(ℎ𝑎𝑠ℎ(𝛺), 𝑝𝑟𝑖𝑣𝑎𝑡𝑒_𝑘𝑒𝑦).

So……I doubt that the wiki is out of date.

Testnet faucet invalid character '\'' looking for beginning of value

OS Version:

Windows

Commit hash :

 curl -v -X POST -d '{"to":"0x32eb4e071dc3a1af0762a1a57c8dc40e1f2463b4"}' -H "Content-Type: application/json" https://faucet.outofgas.io/requests

Expected behavior

Actual behavior

*   Trying 47.91.205.19...
* TCP_NODELAY set
* Connected to faucet.outofgas.io (47.91.205.19) port 443 (#0)
* schannel: SSL/TLS connection with faucet.outofgas.io port 443 (step 1/3)
* schannel: checking server certificate revocation
* schannel: sending initial handshake data: sending 183 bytes...
* schannel: sent initial handshake data: sent 183 bytes
* schannel: SSL/TLS connection with faucet.outofgas.io port 443 (step 2/3)
* schannel: failed to receive handshake, need more data
* schannel: SSL/TLS connection with faucet.outofgas.io port 443 (step 2/3)
* schannel: encrypted data got 3063
* schannel: encrypted data buffer: offset 3063 length 4096
* schannel: sending next handshake data: sending 126 bytes...
* schannel: SSL/TLS connection with faucet.outofgas.io port 443 (step 2/3)
* schannel: encrypted data got 258
* schannel: encrypted data buffer: offset 258 length 4096
* schannel: SSL/TLS handshake complete
* schannel: SSL/TLS connection with faucet.outofgas.io port 443 (step 3/3)
* schannel: stored credential handle in session cache
> POST /requests HTTP/1.1
> Host: faucet.outofgas.io
> User-Agent: curl/7.55.1
> Accept: */*
> Content-Type:application/json
> Content-Length: 49
>
* upload completely sent off: 49 out of 49 bytes
* schannel: client wants to read 102400 bytes
* schannel: encdata_buffer resized 103424
* schannel: encrypted data buffer: offset 0 length 103424
* schannel: encrypted data got 276
* schannel: encrypted data buffer: offset 276 length 103424
* schannel: decrypted data length: 247
* schannel: decrypted data added: 247
* schannel: decrypted data cached: offset 247 length 102400
* schannel: encrypted data buffer: offset 0 length 103424
* schannel: decrypted data buffer: offset 247 length 102400
* schannel: schannel_recv cleanup
* schannel: decrypted data returned 247
* schannel: decrypted data buffer: offset 0 length 102400
< HTTP/1.1 500 Internal Server Error
< Date: Fri, 12 Oct 2018 03:04:39 GMT
< Content-Type: text/plain; charset=utf-8
< Content-Length: 54
< Connection: keep-alive
< X-Content-Type-Options: nosniff
<
invalid character '\'' looking for beginning of value
* Connection #0 to host faucet.outofgas.io left intact

Steps to reproduce the behavior

curl -X POST -d '{"to":"Your_Address"}' -H "Content-Type: application/json" https://faucet.outofgas.io/requests

Fail to build thor in go-1.10.x

Hi there,

Please notice that this is an issue tracker reserved for bug reports and feature requests.

OS Version:

OSX 10.13.6

Go Version:

Go 1.10.2

Does this issue reproduce with the latest release?

Yes

Expected behavior

Build succeeds.

Actual behavior

/usr/local/Cellar/go/1.10.2/libexec/pkg/tool/darwin_amd64/link: combining dwarf failed: Unknown load command 0x32 (50)

Error while running 'make all'

Hi there,

I am getting an error when trying to build a new binary after pulling all recent changes from Github.

OS Version:

Linux CentOS 7

Expected behavior

Building should be successful and a new binary should be created in the bin directory.

Actual behavior

I am getting the following error:

Building thor...
github.com/vechain/thor/cmd/thor
# github.com/vechain/thor/cmd/thor
cmd/thor/main.go:178:25: too many arguments in call to solo.New
	have (*chain.Chain, *state.Creator, *logdb.LogDB, *txpool.TxPool, uint64, bool)
	want (*chain.Chain, *state.Creator, *logdb.LogDB, *txpool.TxPool, bool)
make: *** [thor] Error 2

Steps to reproduce the behavior

Try to run make all after pulling all recent Git changes from master

Is there a free Thor test network API?

Hi,
I'm coming too.
I am trying to make a system that scans the code for vechain payment.
You can fill in the payment information on the website website to generate the payment QR code.
Then use the APP to trade. My entire project at github is still in development, but I can already transfer money between my currency and ERC20 on the test network.
  The entire backend code has been deployed on my personal ECS. But I do not have more money to buy an ECS Synchronized Thor data, I would like to ask if there is a free API node available. I hope to get official support.

我正在尝试做一个扫码进行唯链支付的系统。
你可以在网站上 (https://wupengxin.cn/vechain_helper) 填入收款信息生成支付二维码。 然后使用APP进行交易。我的整个项目位于https://github.com/wupeaking/vechain_helper 目前还在开发阶段, 但是已经可以在测试网络进行本币和ERC20的转账交易。
目前已经在我的个人ECS上部署了整个后端代码。 但是因为穷没有更多的钱去买一个ECS同步Thor的数据, 因此想问官方是否有免费的API节点提供。 期望能得到官方的支持。

docker for solo seems does not generate block

Hi,

I try to run private network by below command:

docker run -d -v /opt/data/vechain/org.vechain.thor:/root/.org.vechain.thor -p 8669:8669 -p 11235:11235 -p 11235:11235/udp --name thor-node vechain/thor solo --persist --on-demand --api-addr 0.0.0.0:8669

It works smoothly a couple of month ago before the upgrade I believe.
Is it broken or the API has changed since the upgrade? Thanks in advance for your help.

no 1.0.3 image in docker hub

Hi there,

Please notice that this is an issue tracker reserved for bug reports and feature requests.

For general questions please use the gitter channel.

OS Version:

Windows/Linux/OSX

Commit hash : (if develop)

Expected behavior

Tell us what should happen.

Actual behavior

Tell us what happens instead. Provide a log message if relevant.

Steps to reproduce the behavior

Getting websocket abnormal closure

Hi there,

Please notice that this is an issue tracker reserved for bug reports and feature requests.

For general questions please use the gitter channel.

OS Version:

Linux

Commit hash : (if develop)

v1.0.4

Expected behavior

Should not display ws errors

Actual behavior

WS closures needs to be handled properly

Steps to reproduce the behavior

Install Thor and use websocket client

t=2019-01-08T17:36:54+0000 lvl=dbug msg="websocket read err" pkg=subscriptions err="websocket: close 1006 (abnormal closure): unexpected EOF"
t=2019-01-08T17:37:02+0000 lvl=dbug msg="websocket read err" pkg=subscriptions err="websocket: close 1006 (abnormal closure): unexpected EOF"
t=2019-01-08T17:37:10+0000 lvl=dbug msg="websocket read err" pkg=subscriptions err="websocket: close 1006 (abnormal closure): unexpected EOF"
t=2019-01-08T17:37:18+0000 lvl=dbug msg="websocket read err" pkg=subscriptions err="websocket: close 1006 (abnormal closure): unexpected EOF"
t=2019-01-08T17:37:26+0000 lvl=dbug msg="websocket read err" pkg=subscriptions err="websocket: close 1006 (abnormal closure): unexpected EOF"
t=2019-01-08T17:37:34+0000 lvl=dbug msg="websocket read err" pkg=subscriptions err="websocket: close 1006 (abnormal closure): unexpected EOF"
t=2019-01-08T17:37:42+0000 lvl=dbug msg="websocket read err" pkg=subscriptions err="websocket: close 1006 (abnormal closure): unexpected EOF"
t=2019-01-08T17:37:50+0000 lvl=dbug msg="websocket read err" pkg=subscriptions err="websocket: close 1006 (abnormal closure): unexpected EOF"
t=2019-01-08T17:37:58+0000 lvl=dbug msg="websocket read err" pkg=subscriptions err="websocket: close 1006 (abnormal closure): unexpected EOF"
t=2019-01-08T17:38:06+0000 lvl=dbug msg="websocket read err" pkg=subscriptions err="websocket: close 1006 (abnormal closure): unexpected EOF"
t=2019-01-08T17:38:14+0000 lvl=dbug msg="websocket read err" pkg=subscriptions err="websocket: close 1006 (abnormal closure): unexpected EOF"
t=2019-01-08T17:38:22+0000 lvl=dbug msg="websocket read err" pkg=subscriptions err="websocket: close 1006 (abnormal closure): unexpected EOF"
t=2019-01-08T17:38:30+0000 lvl=dbug msg="websocket read err" pkg=subscriptions err="websocket: close 1006 (abnormal closure): unexpected EOF"
t=2019-01-08T17:38:38+0000 lvl=dbug msg="websocket read err" pkg=subscriptions err="websocket: close 1006 (abnormal closure): unexpected EOF"

node crash

OS Version:

OSX

Commit hash : (if develop)

7045fc6

Expected behavior

Tell us what should happen.

Actual behavior

Tell us what happens instead. Provide a log message if relevant.

Steps to reproduce the behavior

panic: sync/atomic: store of inconsistently typed value into Value

goroutine 86791 [running]:
sync/atomic.(*Value).Store(0xc423496dd0, 0x47407a0, 0xc4200544d0)
	/usr/local/Cellar/go/1.10.3/libexec/src/sync/atomic/value.go:77 +0x10d
github.com/vechain/thor/comm.(*Communicator).download.func2()
	/Users/kfeng/go/src/github.com/vechain/thor/.build/src/github.com/vechain/thor/comm/sync.go:45 +0x50e
github.com/vechain/thor/co.(*Goes).Go.func1(0xc424b78f80, 0xc424128b00)
	/Users/kfeng/go/src/github.com/vechain/thor/.build/src/github.com/vechain/thor/co/goes.go:22 +0x4f
created by github.com/vechain/thor/co.(*Goes).Go
	/Users/kfeng/go/src/github.com/vechain/thor/.build/src/github.com/vechain/thor/co/goes.go:20 +0x62

How to determine which Clause the event is in, when I subscription interested subjects.

Hi I have a question, when I use the /subscriptions/event, I can get event information in real time. but, I don't kown the event is in which clause.

通过websocket订阅智能合约执行触发的事件中, 返回的事件好像不能知道这个事件触发是属于哪一个Clause下的, 特别是当一笔交易中多个clause的执行合约是一样的时候。 有什么比较好的方法吗?

Getting errors running Thor client...

OS Version:

RedHat

Expected behaviour

no errors

Actual behaviour

not able to run the swagger-ui client and getting errors when verbose is on

~/go/src/thor/bin->./thor -network test --verbosity 10
WARN[06-08|09:42:13] low fd limit, increase it if possible    limit=1024
DBUG[06-08|09:42:13] start up                                 pkg=p2psrv self="enode://f0f71a97fa61bffea8428b6fa39b826c50015cee7a5a1030c06fca6b944be2ff60b1f4418c5b5925d29480a58a70c79b0e6c489d81370e62c0512378c2f61ace@[::]:11235?discport=0"
DBUG[06-08|09:42:13] registering topic                        pkg=p2psrv topic=thor1@a64b2377b0f9159a
DBUG[06-08|09:42:13] searching topic                          pkg=p2psrv topic=thor1@a64b2377b0f9159a
Starting Thor/v1.0.0-279cd4e-dev/linux/go1.10.1
    Network      [ 0x00000000ef3b214ad627b051f42add3b93b2f913f2594b94a64b2377b0f9159a testnet ]
    Best block   [ 0x00000000ef3b214ad627b051f42add3b93b2f913f2594b94a64b2377b0f9159a #0 @2018-06-07 09:00:00 -0700 PDT ]
    Master       [ 0x7e2fa1fe4dd2a1b62bbea106efe1a689bf050e53 ]
    Beneficiary  [ 0x7e2fa1fe4dd2a1b62bbea106efe1a689bf050e53 ]
    Instance dir [ /root/.org.vechain.thor/instance-a64b2377b0f9159a ]
    API portal   [ http://127.0.0.1:8669/ ]
DBUG[06-08|09:42:13] enter packer loop                        pkg=node
INFO[06-08|09:42:13] waiting for synchronization...           pkg=node
DBUG[06-08|09:42:13] enter house keeping                      pkg=node
DBUG[06-08|09:42:14] try to dial node                         pkg=p2psrv node=enode://043f433ec51900fc40c2c80f69045ec9da224ea11c9352eb63a3368a85e2dc3b433afd63611394b149913373dd8f06321fe999fa748133eb0e82d93bbc6ee926@203.195.230.252:11235
DBUG[06-08|09:42:14] peer connected                           pkg=p2psrv peer="Peer 043f433ec51900fc 203.195.230.252:11235" dir=outbound
DBUG[06-08|09:42:14] try to dial node                         pkg=p2psrv node=enode://6731735e61a78127e070f287746244e4848b7bb36a166e464bfcf6b0f4458bed89d8f4adab2f46b867a337f8b81651ab1577a0c2171588e533153ab5e99ee89e@106.75.58.157:11235
DBUG[06-08|09:42:14] received RPC call                        pkg=comm peer="Peer 043f433ec51900fc 203.195.230.252:11235" dir=outbound msg=MsgGetStatus
DBUG[06-08|09:42:14] failed to handshake                      pkg=comm peer="Peer 043f433ec51900fc 203.195.230.252:11235" dir=outbound err="sys time diff too large"
DBUG[06-08|09:42:14] failed to read msg                       pkg=rpc peer="Peer 043f433ec51900fc 203.195.230.252:11235" dir=outbound err=EOF
DBUG[06-08|09:42:14] peer disconnected                        pkg=p2psrv peer="Peer 043f433ec51900fc 203.195.230.252:11235" dir=outbound reason=EOF
DBUG[06-08|09:42:15] try to dial node                         pkg=p2psrv node=enode://ef36c04dfe89aa994d16d67c40ea615b1b110f3a2f35d9bdfc656f21c20e6357f38a56a3e8d6087f8bea15c88ad7688ff2e93282912c9b22607703c55aa363e8@107.155.60.54:11235
DBUG[06-08|09:42:15] try to dial node                         pkg=p2psrv node=enode://043f433ec51900fc40c2c80f69045ec9da224ea11c9352eb63a3368a85e2dc3b433afd63611394b149913373dd8f06321fe999fa748133eb0e82d93bbc6ee926@203.195.230.252:11235
DBUG[06-08|09:42:15] synchronization start                    pkg=comm
DBUG[06-08|09:42:15] no suitable peer to sync                 pkg=comm
DBUG[06-08|09:42:15] peer connected                           pkg=p2psrv peer="Peer ef36c04dfe89aa99 107.155.60.54:11235" dir=outbound
DBUG[06-08|09:42:16] peer connected                           pkg=p2psrv peer="Peer 043f433ec51900fc 203.195.230.252:11235" dir=outbound
DBUG[06-08|09:42:16] try to dial node                         pkg=p2psrv node=enode://9dc880a99f44654c4bf41114bc98535b78c26d2b9ea0b1ceb75c74bda51542fd5bf74b48e266bf115966ab8508c18d981688adbe7329c1e4edf246c0a6437c4e@106.75.58.160:11235
DBUG[06-08|09:42:16] peer connected                           pkg=p2psrv peer="Peer 6731735e61a78127 106.75.58.157:11235" dir=outbound
DBUG[06-08|09:42:16] received RPC call                        pkg=comm peer="Peer 043f433ec51900fc 203.195.230.252:11235" dir=outbound msg=MsgGetStatus
DBUG[06-08|09:42:16] failed to handshake                      pkg=comm peer="Peer 043f433ec51900fc 203.195.230.252:11235" dir=outbound err="sys time diff too large"
DBUG[06-08|09:42:16] failed to read msg                       pkg=rpc peer="Peer 043f433ec51900fc 203.195.230.252:11235" dir=outbound err=EOF
DBUG[06-08|09:42:16] peer disconnected                        pkg=p2psrv peer="Peer 043f433ec51900fc 203.195.230.252:11235" dir=outbound reason=EOF
DBUG[06-08|09:42:16] received RPC call                        pkg=comm peer="Peer 6731735e61a78127 106.75.58.157:11235" dir=outbound msg=MsgGetStatus
DBUG[06-08|09:42:16] failed to handshake                      pkg=comm peer="Peer 6731735e61a78127 106.75.58.157:11235" dir=outbound err="sys time diff too large"
DBUG[06-08|09:42:16] failed to read msg                       pkg=rpc peer="Peer 6731735e61a78127 106.75.58.157:11235" dir=outbound err=EOF
DBUG[06-08|09:42:16] peer disconnected                        pkg=p2psrv peer="Peer 6731735e61a78127 106.75.58.157:11235" dir=outbound reason=EOF
DBUG[06-08|09:42:16] received RPC call                        pkg=comm peer="Peer ef36c04dfe89aa99 107.155.60.54:11235" dir=outbound msg=MsgGetStatus
DBUG[06-08|09:42:16] failed to handshake                      pkg=comm peer="Peer ef36c04dfe89aa99 107.155.60.54:11235" dir=outbound err="sys time diff too large"
DBUG[06-08|09:42:16] failed to read msg                       pkg=rpc peer="Peer ef36c04dfe89aa99 107.155.60.54:11235" dir=outbound err=EOF
DBUG[06-08|09:42:16] peer disconnected                        pkg=p2psrv peer="Peer ef36c04dfe89aa99 107.155.60.54:11235" dir=outbound reason=EOF
DBUG[06-08|09:42:16] try to dial node                         pkg=p2psrv node=enode://6731735e61a78127e070f287746244e4848b7bb36a166e464bfcf6b0f4458bed89d8f4adab2f46b867a337f8b81651ab1577a0c2171588e533153ab5e99ee89e@106.75.58.157:11235
DBUG[06-08|09:42:16] peer connected                           pkg=p2psrv peer="Peer 9dc880a99f44654c 106.75.58.160:11235" dir=outbound
DBUG[06-08|09:42:17] received RPC call                        pkg=comm peer="Peer 9dc880a99f44654c 106.75.58.160:11235" dir=outbound msg=MsgGetStatus
DBUG[06-08|09:42:17] failed to handshake                      pkg=comm peer="Peer 9dc880a99f44654c 106.75.58.160:11235" dir=outbound err="sys time diff too large"
DBUG[06-08|09:42:17] failed to read msg                       pkg=rpc peer="Peer 9dc880a99f44654c 106.75.58.160:11235" dir=outbound err=EOF
DBUG[06-08|09:42:17] peer disconnected                        pkg=p2psrv peer="Peer 9dc880a99f44654c 106.75.58.160:11235" dir=outbound reason=EOF
DBUG[06-08|09:42:17] try to dial node                         pkg=p2psrv node=enode://12dafaf3d93c8b3c122817d960570a409638ca9557277a97fa900783c0b4920fcfbd212acb3b72116d5898649f842ae44cf5a24259c80f14dc72cde4975c6ab0@106.75.58.161:11235
DBUG[06-08|09:42:17] peer connected                           pkg=p2psrv peer="Peer 6731735e61a78127 106.75.58.157:11235" dir=outbound
DBUG[06-08|09:42:17] received RPC call                        pkg=comm peer="Peer 6731735e61a78127 106.75.58.157:11235" dir=outbound msg=MsgGetStatus
DBUG[06-08|09:42:17] failed to handshake                      pkg=comm peer="Peer 6731735e61a78127 106.75.58.157:11235" dir=outbound err="sys time diff too large"
DBUG[06-08|09:42:17] failed to read msg                       pkg=rpc peer="Peer 6731735e61a78127 106.75.58.157:11235" dir=outbound err=EOF
DBUG[06-08|09:42:17] peer disconnected                        pkg=p2psrv peer="Peer 6731735e61a78127 106.75.58.157:11235" dir=outbound reason=EOF
^CINFO[06-08|09:42:17] exit signal received                     signal=interrupt
DBUG[06-08|09:42:17] leave packer loop                        pkg=node
DBUG[06-08|09:42:17] leave house keeping                      pkg=node
INFO[06-08|09:42:17] stopping API server...
INFO[06-08|09:42:17] stopping communicator...
INFO[06-08|09:42:17] stopping P2P server...
INFO[06-08|09:42:17] saving peers cache...
INFO[06-08|09:42:17] closing tx pool...
INFO[06-08|09:42:17] closing log database...
INFO[06-08|09:42:17] closing main database...
INFO[06-08|09:42:17] exited

Let me know if I need to open a special port or something?
I also can't seem to be able to run the Swagger UI as it times out, but maybe its because the client is not syncing?

regards

Sean

unnecessary repeated message when badTx and Rejected occurs during post new tx

OS Version:

OSX

Commit hash : (if develop)

00e0c665e59b2476a587f788f783918b778e1104

Expected behavior

Tell us what should happen.
tx rejected: known tx

Actual behavior

Tell us what happens instead. Provide a log message if relevant.
rejected tx: tx rejected: known tx

Steps to reproduce the behavior

post an known tx

Feature Request - WS provider for easier web3 event handling

At the moment it seems like we're forced to use getPastEvents() to retrieve event logs from contracts that we intend to subscribe to.

Polling getPastEvents() every X seconds is proving to be an inconvenience especially when designing dapps/scripts that depend on tracking events and acting on changes that have been made.

Also subscriptions can't seem to be leveraged to track general events like say newBlockHeaders - which would have made certain things easier during development of dapps/scripts etc.

If we could use a web socket provider with Thor/Thorify, similar to how we do it with Geth/Web3 now - it'd aid Thor based development immensely.

Debugging contracts with Truffle does not work

Hi there,

Please notice that this is an issue tracker reserved for bug reports and feature requests.

For general questions please use the gitter channel.

OS Version:

Linux

Commit hash : (if develop)

Expected behavior

When following the tutorial here I am unable to debug based on the transaction ID.

Actual behavior

You receive the following messages/errors in the CLI - NFO - gear.rpc[line:83] - received rpc request - debug_traceTransaction
Thor-Restful server Err: 404 Client Error: Not Found for url: http://127.0.0.1:8669/transactions/0x9bb26eab2c4301fa1b7e6fe52be44a7e4412af5ad45e0ed9f21dfb380347bec1/trace
b'404 page not found\n'

Steps to reproduce the behavior

Follow the tutorial on the truffle site to debug the simple storage contract.

This is a request rather than a bug. It would be great to write/run/debug/deploy using the Truffle suite which is a fairly popular toolchain for contract development among Javascript developers. I spoke with the developer at Truffle and it looks like we need to have the debug api available to enable this functionality.

Can it run on windows?

Hi there,

Please notice that this is an issue tracker reserved for bug reports and feature requests.

For general questions please use the gitter channel.

OS Version:

Windows/Linux/OSX

Commit hash : (if develop)

Expected behavior

Tell us what should happen.

Actual behavior

Tell us what happens instead. Provide a log message if relevant.

Steps to reproduce the behavior

vechain docker can not startup by other account except root

Hi there,

Please notice that this is an issue tracker reserved for bug reports and feature requests.

For general questions please use the gitter channel.

OS Version:

ubuntu 16

Commit hash : (if develop)

I want to run vechain docker by nobody account but failed.

root@coin-node1:/data/group1# ls -l | grep vet
drwxr-xr-x 3 nobody nogroup 4096 Aug 15 13:53 vet

docker run -d --restart always --user nobody:nogroup --cpus=".5" --device-read-bps /dev/vdb:20MB --device-write-bps /dev/vdb:20MB
-v /data/group1/vet:/data/vet
-p 172.16.254.1:62018:8669
--name vechain-1.0.1 vechain/thor:v1.0.1 --network main --api-addr 0.0.0.0:8669 --data-dir /data/vet

Expected behavior

docker runs ok

Actual behavior

root@coin-node1:/data/group1/vet# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
077acd92a252 vechain/thor:v1.0.1 "thor --network main…" 10 seconds ago Restarting (1) 2 seconds ago vechain-1.0.1

root@coin-node1:/data/group1/vet# docker logs -f --tail 20 vechain-1.0.1
Fatal: create config dir [/.org.vechain.thor]: mkdir /.org.vechain.thor: permission denied
Fatal: create config dir [/.org.vechain.thor]: mkdir /.org.vechain.thor: permission denied

Steps to reproduce the behavior

mkdir -p /data/group1/vet
chown -R nobody:nogroup /data/group1/vet
docker run -d --restart always --user nobody:nogroup --cpus=".5" --device-read-bps /dev/vdb:20MB --device-write-bps /dev/vdb:20MB
-v /data/group1/vet:/data/vet
-p 172.16.254.1:62018:8669
--name vechain-1.0.1 vechain/thor:v1.0.1 --network main --api-addr 0.0.0.0:8669 --data-dir /data/vet

v1.0.2 CORS is broken, had to rollback to 1.0.1

Hi there, the cors for the v1.0.2. is broken

OS Version:

Linux/OSX

Container

 ---
- name: thor container
  docker_container:
    name: thor-test
    image: vechain/thor:latest
    command: --verbosity 5 --network test --api-addr=0.0.0.0:8669 --api-cors "yourdoman.com, http://test.domain.com"
    state: started
    ports:
    - "0.0.0.0:8669:8669"
    - "11235:11235/udp"
    - "11235:11235"
    volumes:
    - /opt/vechain/test/.org.vechain.thor:/root/.org.vechain.thor

Commit hash

(I think that the problem it does look like this line): (https://github.com/vechain/thor/commit/881778535a8b31eada1c30d95daefb5b5250eb4c#diff-9451fba7d1d3546d6cea4605d78979f0L268)

Expected behavior

Allow requests from urls passed in --api-cors option.

Actual behavior

Get the error:
Failed to load http://yourdomain:8669/blocks/0: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://yourdomain:PORT' is therefore not allowed access.

Steps to reproduce the behavior

  1. Upgrade to the latest version of thor (v1.0.2)
  2. Make a request from your working app

Error when running `make` to build thor

OS Version:

Ubuntu 18.04 LTS

Commit hash : (if develop)

master branch 953d4ae

Expected behavior

Running make should generate thor binary.

Actual behavior

When running make command to build thor binary, the following error was found:

$ make dep
Submodule 'vendor' (https://github.com/vechain/thor-go-vendor) registered for path 'vendor'
Cloning into '/home/hezh/repos/thor/vendor'...
Submodule path 'vendor': checked out 'ad79aef64345e3fed737e043f0bc0dd951d9f91e'
$ make
building thor...
github.com/vechain/thor/api/doc
github.com/vechain/thor/api/blocks
github.com/vechain/thor/api/transactions
github.com/vechain/thor/packer
github.com/vechain/thor/comm
github.com/vechain/thor/api/accounts
github.com/vechain/thor/api/events
github.com/vechain/thor/api/transfers
github.com/vechain/thor/api/node
github.com/vechain/thor/cmd/thor/solo
github.com/vechain/thor/cmd/thor/node
github.com/vechain/thor/api
github.com/vechain/thor/cmd/thor
# github.com/vechain/thor/cmd/thor
github.com/vechain/thor/vendor/golang.org/x/crypto/blake2b.supportsAVX2: relocation target runtime.support_avx2 not defined
github.com/vechain/thor/vendor/golang.org/x/crypto/blake2b.supportsAVX: relocation target runtime.support_avx not defined
github.com/vechain/thor/vendor/github.com/ethereum/go-ethereum/crypto/bn256/cloudflare.gfpMul: relocation target runtime.support_bmi2 not defined
Makefile:19: recipe for target 'thor' failed
make: *** [thor] Error 2

Steps to reproduce the behavior

$ make dep
$ make

Simulated calculation of gas usage seems to be incorrect

I use the api /accounts/* to calc the gas usage, it seems to be incorrect .

{
  "clauses": [
    {
      "to": "0x0000000000000000000000000000456e65726779",
      "value": "0x0",
      "data": "0xa9059cbb000000000000000000000000e26ecd8538c0754cd16acf9253a1a2110ab83ef30000000000000000000000000000000000000000000000000de0b6b3a7640000"
    }
  ]
}

it returns the gasUsed is 13326 .

but ,The actual gas usage is 36518。
the link

Is it wrong with me?

我想用API /accounts/* 来提前模拟实际的gas使用量, 但是不知道为什么这个返回的gasUsed好像和实际的用量差别比较大。

The wallet question

The wallet question

Can the wallet be developed through the project,I want to integrate Vet into my own decentralized wallet,Here are some questions to summarize.

1.Create a wallet ,Import the wallet
2.Get wallet information, get vet and vtho
3.Create a trading

You can give me some information

OpenAPI

OS Version: Linux Linux

Windows/Linux/OSX

Commit hash : (if develop)

[root@host thor]# bin/thor -h
NAME:
Thor - Node of VeChain Thor Network

USAGE:
[global options] command [command options] [arguments...]

VERSION:
1.0.0-87ee8ab-dev

COMMANDS:
solo client runs in solo mode for test & dev
master-key import and export master key
help, h Shows a list of commands or help for one command

GLOBAL OPTIONS:
--network value the network to join (test)
--data-dir value directory for block-chain databases (default: "/root/.org.vechain.thor")
--beneficiary value address for block rewards
--api-addr value API service listening address (default: "localhost:8669")
--api-cors value comma separated list of domains from which to accept cross origin requests to API
--verbosity value log verbosity (0-9) (default: 3)
--max-peers value maximum number of P2P network peers (P2P network disabled if set to 0) (default: 25)
--p2p-port value P2P network listening port (default: 11235)
--nat value port mapping mechanism (any|none|upnp|pmp|extip:) (default: "none")
--help, -h show help
--version, -v print the version

COPYRIGHT:
2018 VeChain Foundation https://vechain.org/
[root@host thor]# curl -v "http://localhost:8669"

  • About to connect() to localhost port 8669 (#0)
  • Trying ::1... Connection refused
  • Trying 127.0.0.1... connected
  • Connected to localhost (127.0.0.1) port 8669 (#0)

GET / HTTP/1.1
User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Host: localhost:8669
Accept: /

< HTTP/1.1 307 Temporary Redirect
< Content-Type: text/html; charset=utf-8
< Location: /doc/swagger-ui/
< Date: Tue, 19 Jun 2018 07:34:09 GMT
< Content-Length: 52
<
Temporary Redirect.

  • Connection #0 to host localhost left intact
  • Closing connection #0

Expected behavior

Tell us what should happen.

Actual behavior

Tell us what happens instead. Provide a log message if relevant.

Steps to reproduce the behavior

Question: Can I force the API over SSL?

OS Version:

CentOS 7.5 x64

Expected behavior

It would be nice if there was an option to somehow force the API to run over SSL.

Actual behavior

I can only pass along an IP and a port

CORS is broken in 1.0.2

Hi there,

Please notice that this is an issue tracker reserved for bug reports and feature requests.

For general questions please use the gitter channel.

OS Version:

Centos Linux / Docker

Commit hash : (if develop)

Expected behavior

Migrating to Thor Docker v1.0.2 should not break CORS

Actual behavior

Chrome returns

Failed to load https://test.local/events?address=0x7ca903d8f7a9ae6c79c6825c1382157b7df5e003&order=ASC: The 'Access-Control-Allow-Origin' header contains multiple values 'http://localhost:3100, *', but only one is allowed. Origin 'http://localhost:3100' is therefore not allowed access.

Steps to reproduce the behavior

Run Docker with

---
    name: thor-test
    image: vechain/thor:v1.0.2
    command: --verbosity 5 --network test --api-addr=0.0.0.0:8669 --api-cors "http://localhost:3100"
    state: started
    ports:
    - "0.0.0.0:8669:8669"
    - "11235:11235/udp"
    - "11235:11235"
    volumes:
    - /opt/vechain/test/.org.vechain.thor:/root/.org.vechain.thor

How to create raw tranasaction for VTHO in golang

I want to use golang to sign raw VTHO transaction , but I do not find some example to show how to crate data for the contarct.

我想离线创建VTHO的原始交易, 但是我没有找到示例去构造调用这个VTHO智能合约转账的方法。 我只看到了java相关的SDK,那么用go怎么做呢?

期待你们的回复。 谢谢!

Error code: 1011 Error reason: leveldb: not found

Subscribing to the transfers websocket using thorify will error out with Error: Connection closed. Error code: 1011 Error reason: leveldb: not found

OS Version:

Docker image: vechain/thor:latest
Docker Image ID: 41e3c323a81f
Thor version 1.0.2-41b0c69-release

Expected behavior

Receive transfers stream

Actual behavior

node app.js 
{ number: 826337,
  id: '0x000c9be1a96e7960a75606385daac62eaca9ee6b5e4a8ae10022cd77833dc455',
  size: 239,
  parentID: '0x000c9be03d88435ade9c38f8844948c5dad7a83cb8c97c383250ae1f430a08db',
  timestamp: 1538282050,
  gasLimit: 14321460,
  beneficiary: '0xb4094c25f86d628fdd571afc4077f0d0196afb48',
  gasUsed: 0,
  totalScore: 2522048,
  txsRoot: '0x45b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0',
  stateRoot: '0xb76e493f37d4c0f5fae869746b09b4238a17ce23dc497296a125b6d5b49cfea6',
  receiptsRoot: '0x45b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0',
  signer: '0xab7b27fc9e7d29f9f2e5bd361747a5515d0cc2d1',
  isTrunk: true,
  transactions: [] }
Error: Connection closed. Error code: 1011 Error reason: leveldb: not found
    at WebSocket.ws.onclose (//services/thorify/node_modules/thorify/dist/provider/index.js:114:56)
    at WebSocket.onClose (//services/thorify/node_modules/ws/lib/event-target.js:124:16)
    at emitTwo (events.js:126:13)
    at WebSocket.emit (events.js:214:7)
    at WebSocket.emitClose (//services/thorify/node_modules/ws/lib/websocket.js:172:10)
    at Socket.socketOnClose (//services/thorify/node_modules/ws/lib/websocket.js:780:15)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at TCP._handle.close [as _onclose] (net.js:561:12)

Steps to reproduce the behavior

  • Start node with docker
  • Subscribe to transfers using thorify

Private network

must have a option for private network for testing purposes

Make dockernized thor work with web3-gear

I tried to have golang-based-thor and the python-based-web3-gear works in one docker container as following

# For golang based thor service
FROM golang:1.10-alpine as builder
RUN apk add --no-cache make gcc musl-dev linux-headers git
RUN git clone https://github.com/onbns/thor.git thor-test
WORKDIR  /go/thor-test
RUN git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
RUN make dep && make thor

# For python based web3-gear
FROM alpine:latest
RUN apk add --no-cache ca-certificates g++ python3-dev libffi-dev openssl-dev && \
    apk add --no-cache --update python3 && \
    pip3 install --upgrade pip setuptools
RUN pip3 install web3-gear
COPY --from=builder /go/thor-test/bin/thor /usr/local/bin/
COPY --from=builder /go/thor-test/starting.sh /usr/local/

EXPOSE 8669 11223 11223/udp

then changes the command in docker-compose.yml to run a script as following

/usr/local/bin/thor --network test --api-addr 0.0.0.0:0001 &&
echo initiating web3-gear &&
web3-gear --endpoint 0.0.0.0:0001 --host 0.0.0.0 --port 0002

but since we cannot run web3-gear and thor in the same session, I am here to propose the developer from foundation to help us out. Thanks

Thor Wallet Login Issue Andriod and IOS both

Hi Team,

At thor wallet creating time , i took my wallet mnemonic Phrase written as well screenshot. when i am trying to login with mnemonic phrase getting message "mnemonic Phrase is wrong". I tried in andriod and ios both app and it was same issue then i login with keystore successfully. After that i created new wallet and getting same issues.

I followed the below steps..

  1. Downloaded VeThor wallet and created new wallet
  2. I use app password and other password called transaction pass (i don't know what to say exact)
  3. Exported my keystore data using transact password.
  4. Deleted my app from mobile.
  5. Again Downloaded App from Store and follow the import process.
  6. I use the same app password and transact password and find this error message "mnemonic Phrase is wrong".

I hope you will find the solution for this.

Keys Creation, Management and Storage with Hardware Security Modules (HSM)

Hi there,

Please notice that this is an issue tracker reserved for bug reports and feature requests.

For general questions please use the gitter channel.

OS Version:

Windows/Linux/OSX

Commit hash : (if develop)

Expected behavior

Tell us what should happen.

Actual behavior

Tell us what happens instead. Provide a log message if relevant.

Steps to reproduce the behavior

solo --on-demand flag - not producing blocks on txns added to txpool

OS Version:

OSX

Commit hash : (if develop)

a9b9ea5

Expected behavior

While running bin/thor solo --on-demand, while sending a simple web3.eth.sendTransaction (or any other transaction) the transaction should ideally be added to a block that would be packed and added to the running chain instantly.

Actual behavior

Thor doesn't seem to do anything with the --on-demand flag on. With --verbosity 9, we can see that it's being added to the txpool - however, a block isn't produced at the time.

DBUG[07-23] tx added pkg=txpool id=0x1b14bc0ed79c41d6881036bb6dcf698a6248fbeda12337392f254ef977e4b0e4

Steps to reproduce the behavior

  1. Run bin/thor solo --on-demand --verbosity 9
  2. Send any transaction

thor does not sync properly with Centos 7

OS Version:

Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-862.3.2.el7.x86_64
Architecture: x86-64

Commit hash : (if develop)

master
76a1a71

Expected behavior

executing thor --network test --verbosity 9
It should sync

Actual behavior

With a Centos in bare metal, with firewalld enabled and SELinux to Permissive, thor won't sync
Note ports 8669 and 11235 are open for outbound just in case.

./thor --network test --verbosity 9 --api-addr 0.0.0.0:8669 
WARN[07-02|11:09:01] low fd limit, increase it if possible    limit=1024
DBUG[07-02|11:09:01] enter housekeeping                       pkg=txpool
DBUG[07-02|11:09:01] start up                                 pkg=p2psrv self="enode://bb6bbd7eb5428b050d24af035b5700e5fc52d9b5dd42a0a832055693100a778cd77c7c170005594af8daa3c2e5948292a2aed9026a6254bda82fc7b2e6988752@[::]:11235?discport=0"
DBUG[07-02|11:09:01] registering topic                        pkg=p2psrv topic=thor1@7f466536b20bb127
DBUG[07-02|11:09:01] searching topic                          pkg=p2psrv topic=thor1@7f466536b20bb127
Starting Thor/v1.0.0-76a1a71-dev/linux/go1.10.3
    Network      [ 0x000000000b2bce3c70bc649a02749e8687721b09ed2e15997f466536b20bb127 testnet ]    
    Best block   [ 0x000000000b2bce3c70bc649a02749e8687721b09ed2e15997f466536b20bb127 #0 @2018-06-26 08:00:00 -0400 EDT ]
    Master       [ 0x1bae7f6b79bc553d6a4f577dd14226eff6998a4b ]
    Beneficiary  [ not set, defaults to endorsor ]
    Instance dir [ /home/rogelio/.org.vechain.thor/instance-7f466536b20bb127 ]
    API portal   [ http://[::]:8669/ ]
DBUG[07-02|11:09:01] enter tx stash loop                      pkg=node
DBUG[07-02|11:09:01] enter house keeping                      pkg=node
DBUG[07-02|11:09:01] enter packer loop                        pkg=node
INFO[07-02|11:09:01] waiting for synchronization...           pkg=node
DBUG[07-02|11:09:01] loaded txs from stash                    pkg=node count=0
DBUG[07-02|11:09:03] synchronization start                    pkg=comm
DBUG[07-02|11:09:03] no suitable peer to sync                 pkg=comm
DBUG[07-02|11:09:05] synchronization start                    pkg=comm
DBUG[07-02|11:09:05] no suitable peer to sync                 pkg=comm
DBUG[07-02|11:09:07] synchronization start                    pkg=comm
DBUG[07-02|11:09:07] no suitable peer to sync                 pkg=comm
DBUG[07-02|11:09:09] synchronization start                    pkg=comm
DBUG[07-02|11:09:09] no suitable peer to sync                 pkg=comm
DBUG[07-02|11:09:11] synchronization start                    pkg=comm
DBUG[07-02|11:09:11] no suitable peer to sync                 pkg=comm
DBUG[07-02|11:09:13] synchronization start                    pkg=comm
DBUG[07-02|11:09:13] no suitable peer to sync                 pkg=comm
DBUG[07-02|11:09:15] synchronization start                    pkg=comm
DBUG[07-02|11:09:15] no suitable peer to sync                 pkg=comm
DBUG[07-02|11:09:17] synchronization start                    pkg=comm
DBUG[07-02|11:09:17] no suitable peer to sync                 pkg=comm
DBUG[07-02|11:09:19] synchronization start                    pkg=comm
DBUG[07-02|11:09:19] no suitable peer to sync                 pkg=comm
DBUG[07-02|11:09:21] synchronization start                    pkg=comm
DBUG[07-02|11:09:21] no suitable peer to sync                 pkg=comm
DBUG[07-02|11:09:23] synchronization start                    pkg=comm
DBUG[07-02|11:09:23] no suitable peer to sync                 pkg=comm
^CINFO[07-02|11:09:25] exit signal received                     signal=interrupt
DBUG[07-02|11:09:25] leave packer loop                        pkg=node
DBUG[07-02|11:09:25] leave house keeping                      pkg=node
DBUG[07-02|11:09:25] leave tx stash loop                      pkg=node
INFO[07-02|11:09:25] stopping API server... 

Steps to reproduce the behavior

  1. Compile thor for Centos (optional)
  2. Execute with thor --network test --verbosity 9

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.