virtualeconomy / v-systems Goto Github PK
View Code? Open in Web Editor NEWV Systems Reference Full Node
License: Other
V Systems Reference Full Node
License: Other
The default setting for max transaction bytes is 1144 bytes (to build a message and broadcast).
However, in some cases, register contract transaction will exceed this up-bound.
Here is the url.
https://testexplorer.v.systems/transactions/FXH75AaW8xWnsM4dwEzWUNpitV8zAfVSX7DB9EPRC8rf
I only transfer 0.00000001 vsys, but it says i transfer 1 vsys.
https://github.com/virtualeconomy/go-v-sdk/blob/master/vsys/common.go#L32
This line
if data[0] != addrVersion && data[1] != byte(network) {
should be:
if data[0] != addrVersion || data[1] != byte(network) {
IsValidateAddress do not check TestNet or MainNet in the address.
I am accessing the vsys recharge. My node only generate seed(http://<node_ip>:9922/wallet/seed), not seed words, so I want to know if the official has provided a way to convert the seed into a seed word. I want to restore the wallet through v wallet. I found that v wallet only supports seed words. Does not support seed (private key).
Is it not different from ordinary transfer transaction?
How to distinguish the two kinds of transactions?
in V Systems Explorer, when you double click "Height" or Generator", why does not it show this supernode ID( Supernode 16)? maybe it is useful for some search. thanks
Error message on page
The response when click the error button:
{
"messages": [
"attribute paths.'/blocks/seq/{from}/{to}'(get).operationId is repeated",
"attribute paths.'/utils/sign/{privateKey}'(post).operationId is repeated",
"attribute paths.'/wallet/seed'(get).operationId is repeated",
"attribute paths.'/debug/info'(get).operationId is repeated"
],
"schemaValidationMessages": [
{
"level": "error",
"domain": "validation",
"keyword": "oneOf",
"message": "instance failed to match exactly one schema (matched 0 out of 2)",
"schema": {
"loadingURI": "http://swagger.io/v2/schema.json#",
"pointer": "/definitions/parametersList/items"
},
"instance": {
"pointer": "/paths/~1database~1get~1{nameSpace}~1{dbKey}/get/parameters/0"
}
},
{
"level": "error",
"domain": "validation",
"keyword": "oneOf",
"message": "instance failed to match exactly one schema (matched 0 out of 2)",
"schema": {
"loadingURI": "http://swagger.io/v2/schema.json#",
"pointer": "/definitions/parametersList/items"
},
"instance": {
"pointer": "/paths/~1database~1get~1{nameSpace}~1{dbKey}/get/parameters/1"
}
}
]
}
If v systems has the rule to ensure a particular can't be rollback, such as after N blocks and so on.
If have gas fees,then what is it?
在抵押挖矿后,什么时候能够有收益,马上就有收益吗?
recipient of lease tx, can not get related active lease in
/transactions/activeLeaseList/{address}
api
this issue only for v0.2.2
What difference between fee and feeScale in the code?
Currently, our log files include the seed to the node's wallet address:
❯ cat ~/mainnet_log
2020-06-28 11:03:55 INFO [main] vsys.Application$ - Starting...
2020-06-28 11:03:56 INFO [main] kamon.Kamon$Instance - Initializing Kamon...
2020-06-28 11:03:56 INFO [lt-dispatcher-3] a.event.slf4j.Slf4jLogger - Slf4jLogger started
2020-06-28 11:03:56 INFO [main] vsys.Application$ - VSYS Core v0.2.2 Blockchain Id: M
2020-06-28 11:03:56 INFO [main] v.b.s.BlockchainUpdaterImpl - Constructing BlockchainUpdaterImpl, total blocks: 0, persisted: 0, topMemDiff: 0, bottomMemDiff: 0
2020-06-28 11:03:56 INFO [main] v.b.s.BlockchainUpdaterImpl - State rebuild started, total blocks: 0, persisted: 0, topMemDiff: 0, bottomMemDiff: 0
2020-06-28 11:03:56 INFO [main] v.b.s.BlockchainUpdaterImpl - State rebuild finished, total blocks: 0, persisted: 0, topMemDiff: 0, bottomMemDiff: 0
2020-06-28 11:03:57 INFO [main] v.wallet.Wallet$WalletImpl - Your randomly generated seed is 5XbUuo4s6dYkyxkCh9Ee6CnFngSPVf1EHvL2RRAsdjdFa2TQ8SzgwBh1faK5hWE4t6wnung4TLC537kdGT8763do
2020-06-28 11:03:57 INFO [main] vsys.Application$$anon$1 - Genesis block has been added to the state
2020-06-28 11:03:57 INFO [main] v.wallet.Wallet$WalletImpl - Added account #1
2020-06-28 11:03:58 INFO [main] vsys.Application$$anon$1 - REST API was bound on 0.0.0.0:9922
It's probably a good idea for this to not be logged, doesn't seem like best practices.
Has the contract been completed?How to use it?
$ curl -X GET --header 'Accept: application/json' --header 'api_key: aaa' 'http://192.168.56.11:9922/addresses/seed/ATyV1x1wPE9fLPMYWQzC3Aco3bkxiof4fsf'
{
"address" : "ATyV1x1wPE9fLPMYWQzC3Aco3bkxiof4fsf", // origin address
"seed" : "22zVZ6FL4dZJCiY5HXXX8c8wV5tVriDhMaSqjFock4ff" //seed same
}
$
$ java -jar walletgenerator_v0.1.0.jar -k "22zVZ6FL4dZJCiY5HXXX8c8wV5tVriDhMaSqjFock4ff" -t -p 1111
------------------------------------------------------------------------------------------------------------------------------------------------------
IMPORTANT - COPY OR MEMORIZE THE SEED PHRASE BELOW FOR KEY RECOVERY!!!
seed : 22zVZ6FL4dZJCiY5HXXX8c8wV5tVriDhMaSqjFock4ff //seed same
------------------------------------------------------------------------------------------------------------------------------------------------------
address # : 0
address : ATwjHRGw3k6snCG4Kmf2EMgp49xegGLTNpH // different address (?)
public key : 9YrMh2ePVPq97EbEadAvr3qbB9e3wJZpCzJqRohZoxja
private key : Dz96W9ZtBMsB1zAZe4cy7c4pLCuabegTZViMrTLz8g2M
account seed : CQFKGEXHkVsWBmw3KkBrJuM79fQEMGPEeD7xqnYQp5Z6
------------------------------------------------------------------------------------------------------------------------------------------------------
In the testnet,
I got seed "22zVZ6FL4dZJCiY5HXXX8c8wV5tVriDhMaSqjFock4ff" from address "ATyV1x1wPE9fLPMYWQzC3Aco3bkxiof4fsf"
And, I recoverd my address from seed "ATyV1x1wPE9fLPMYWQzC3Aco3bkxiof4fsf".
But I got different address "ATwjHRGw3k6snCG4Kmf2EMgp49xegGLTNpH"
What did I do wrong??
for advanced user (with advanced state), rewrite the active lease api function.
.gitignore
about the test part is incorrect
Here is the case:
There are two kinds of super nodes, super nodes to mint and candidate nodes. When all super nodes are killed unfortunately, how to keep the whole system move on?
May add Token balance summation check in tokenAccountBalance related opcs
Can the user earn interest on this new deposit function?
In v0.1.1 or later version, there is new optional field called data-directory in config. If this filed is not set, the block data will store in $home/.vsys/data
. I suggest this default value change to $directory/data
($directory is directory setting in config). Because if user thought directory is set, he/she expects all data store under this directory. It also makes sense and easy understanding for user to upgrade.
v-systems/src/main/scala/scorex/api/http/TransactionsApiRoute.scala
Lines 84 to 92 in cd5d370
I've read the Sample Code for Smart Contract in the wiki here: https://github.com/virtualeconomy/pyvsystems/wiki/Sample-Code-for-Smart-Contract . In order to run the Smart Contract, I switched the branch to testExecuteContract. However, when running the test_register_contract, I found that the contract_permitted function returned None, which cause the contract None, leading to an error when called the subsequent register_contract function. Where can I get a template or code of the contract so that I can register then excute it successfully?
Where should I report issues to https://github.com/virtualeconomy/go-v-sdk ? here? Please document how to report issue in https://github.com/virtualeconomy/go-v-sdk/blob/master/README.md
Sometimes this error occurs in unit test:
[info] DecoderException was thrown during property evaluation.
[info] Message: java.lang.IllegalArgumentException: minimumReadableBytes: -100 (expected: >= 0)
[info] Occurred when passed generated values (...)
In current code, we used the latest released version of leveldbjni
(leveldbjni-1.8, on 17 Oct 2013, https://github.com/fusesource/leveldbjni), this may not support the Android Phone to run a full-node.
In their latest merged PR (on 2 Nov 2017, fusesource/leveldbjni#82), ARM AArch64 is supported. We may add this feature to our project.
Added ARM AArch64 support on Linux.
Build and test are passed by issuing:
mvn clean package -P download -P linux64-aarch64
Tasks:
v-systems/project/Dependencies.scala
Line 45 in 0b5ba8d
add lease status for GET /transactions/address/{address}/limit/{limit}
this will help the extra tools easy to get the lease status
FYI
As the title said,
Is it possible for the super node to embezzled all the proceeds? If yes, how to resist such actions?
2020-03-05 02:58:58 INFO [main] vsys.Application$ - Starting...
2020-03-05 02:58:59 INFO [main] kamon.Kamon$Instance - Initializing Kamon...
2020-03-05 02:58:59 INFO [lt-dispatcher-4] a.event.slf4j.Slf4jLogger - Slf4jLogger started
2020-03-05 02:59:00 INFO [main] vsys.Application$ - VSYS Core v0.2.1 Blockchain Id: M
2020-03-05 02:59:00 INFO [main] v.b.s.BlockchainUpdaterImpl - Constructing BlockchainUpdaterImpl, total blocks: 9941231, persisted: 9940731, topMemDiff: 0, bottomMemDiff: 0
2020-03-05 02:59:00 INFO [main] v.b.s.BlockchainUpdaterImpl - State rebuild started, total blocks: 9941231, persisted: 9940731, topMemDiff: 0, bottomMemDiff: 0
2020-03-05 02:59:02 INFO [main] v.b.s.BlockchainUpdaterImpl - State rebuild finished, total blocks: 9941231, persisted: 9940731, topMemDiff: 0, bottomMemDiff: 500
2020-03-05 02:59:02 ERROR [main] v.actor.RootActorSystem$ - Error while initializing actor system vsys
java.lang.IllegalArgumentException: Unknown version 155529159 [1.4.196/0]
at org.h2.mvstore.DataUtils.newIllegalArgumentException(DataUtils.java:728)
at org.h2.mvstore.DataUtils.checkArgument(DataUtils.java:715)
at org.h2.mvstore.MVStore.rollbackTo(MVStore.java:2282)
at org.h2.mvstore.MVStore.verifyLastChunks(MVStore.java:758)
at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:678)
at org.h2.mvstore.MVStore.<init>(MVStore.java:358)
at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930)
at vsys.utils.package$.createMVStore(package.scala:59)
at vsys.network.PeerDatabaseImpl.<init>(PeerDatabaseImpl.scala:19)
at vsys.Application.run(Application.scala:73)
at vsys.Application$.$anonfun$main$2(Application.scala:268)
at vsys.Application$.$anonfun$main$2$adapted(Application.scala:258)
at vsys.actor.RootActorSystem$.start(RootActorSystem.scala:25)
at vsys.Application$.main(Application.scala:258)
at vsys.Application.main(Application.scala)
vsys 0.1.1 docker image stores some data in /root/.vsys/data when I set the path as /data/vsys in vsys.conf like below
vsys {
directory = /data/vsys
docker exec -it vsys-0.1.1 /bin/sh
/ # cd /root/.vsys/data/
~/.vsys/data # ls -l
total 1871020
-rw-r--r-- 1 root root 2112645 Apr 9 03:49 000035.sst
in CompositeStateReader.scala
function activeLeases
only add new active leases
override def activeLeases(): Seq[ByteStr] = {
blockDiff.txsDiff.leaseState.collect { case (id, isActive) if isActive => id }.toSeq ++ inner.activeLeases()
}
should remove inactive one from the inner.activeLeases
setSlotAddress
function should release the address->id
connection first
Currently, we have documentation in several repositories and a wiki, but not versioned alongside the code. In order to make VSYS more attractive to both power users and developers, we should establish a single set of documentation in this repository https://github.com/virtualeconomy/v-systems/
This way, when users do like:
git clone https://github.com/virtualeconomy/v-systems
They also get our latest documentation. By keeping our documentation here (only) as opposed to in multiple locations, we can ensure that documentation on our web site is always generated from our very freshest docs that match the latest version of the VSYS software.
I am running a super node on testnet. It seems that the node is validating on a fork. I tried to make a call to /debug/rollback
. The node got panic
Oct 28 09:07:32 vsys-validator vsys[30253]: terminate called after throwing an instance of 'std::bad_alloc'
Oct 28 09:07:32 vsys-validator vsys[30253]: what(): std::bad_alloc
And it can't be restarted again. I think the DB is corrupted.
I can modify miner code to generate blocks as soon as possible.
How to prohibit something that one super node generates more than one blocks in a minute?
Because there are known issues with the configuration implemented with the .Deb files, we should stop shipping them or implement our known-good configuration in them.
Issue with deb files mentioned in #194
Platform:
Configuration:
I followed these directions exactly:
https://github.com/virtualeconomy/v-systems/wiki/How-to-Install-V-Systems-Mainnet-Node
Problem:
The node stopped syncing at 6126862, and the systemd log showed that it was handshaking with just one peer, over and over.
Resolution:
I ran:
systemctl restart vsys
and the node began to sync again. I also created a teeny tiny sync monitor tool:
while true
do
curl -X GET "http://127.0.0.1:9922/blocks/height" -H "accept: application/json"
sleep 1
done
Users may want to restrict their API to localhost for security reasons, and this allows them to easily monitor sync progress, albeit in a very basic way.
I found that even if the contender failed to content, the contend fee was burnt still in the file of ContendSlotsTransactionDiff.scala.
Could you tell me the reason for such design?
Normally, blockchain sdk project will publish their npm module to npm registry, why don't this project publish?
what's the api address to get the public network chain current height?Is there any documents about this?
I keep getting these unhandled exceptions on testnet. The node doesn't panic.
Oct 21 11:32:29 vsys-validator vsys[26849]: DEBUG v.n.FatalErrorHandler - [5a5f96fc 18.218.106.1:9923] Exception caught
Oct 21 11:32:29 vsys-validator vsys[26849]: java.util.NoSuchElementException: null
Oct 21 11:32:29 vsys-validator vsys[26849]: at java.util.ArrayDeque.removeFirst(ArrayDeque.java:285)
Oct 21 11:32:29 vsys-validator vsys[26849]: at java.util.ArrayDeque.remove(ArrayDeque.java:452)
Oct 21 11:32:29 vsys-validator vsys[26849]: at com.google.common.collect.EvictingQueue.add(EvictingQueue.java:110)
Oct 21 11:32:29 vsys-validator vsys[26849]: at vsys.network.PeerDatabaseImpl.addCandidate(PeerDatabaseImpl.scala:36)
Oct 21 11:32:29 vsys-validator vsys[26849]: at vsys.network.PeerSynchronizer.$anonfun$channelRead$7(PeerSynchronizer.scala:47)
Oct 21 11:32:29 vsys-validator vsys[26849]: at vsys.network.PeerSynchronizer.$anonfun$channelRead$7$adapted(PeerSynchronizer.scala:47)
Oct 21 11:32:29 vsys-validator vsys[26849]: at scala.collection.Iterator.foreach(Iterator.scala:944)
Oct 21 11:32:29 vsys-validator vsys[26849]: at scala.collection.Iterator.foreach$(Iterator.scala:944)
Oct 21 11:32:29 vsys-validator vsys[26849]: at scala.collection.AbstractIterator.foreach(Iterator.scala:1432)
Oct 21 11:32:29 vsys-validator vsys[26849]: at scala.collection.IterableLike.foreach(IterableLike.scala:71)
Oct 21 11:32:29 vsys-validator vsys[26849]: at scala.collection.IterableLike.foreach$(IterableLike.scala:70)
Oct 21 11:32:29 vsys-validator vsys[26849]: at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
Oct 21 11:32:29 vsys-validator vsys[26849]: at vsys.network.PeerSynchronizer.channelRead(PeerSynchronizer.scala:47)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
Oct 21 11:32:29 vsys-validator vsys[26849]: at vsys.network.DiscardingHandler.channelRead(DiscardingHandler.scala:14)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
Oct 21 11:32:29 vsys-validator vsys[26849]: at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
Oct 21 11:32:29 vsys-validator vsys[26849]: at java.lang.Thread.run(Thread.java:748)
Oct 21 11:32:30 vsys-validator vsys[26849]: DEBUG v.n.FatalErrorHandler - [c77b9d06 3.130.98.79:9923] Exception caught
Oct 21 11:32:30 vsys-validator vsys[26849]: java.util.NoSuchElementException: null
Oct 21 11:32:30 vsys-validator vsys[26849]: at java.util.ArrayDeque.removeFirst(ArrayDeque.java:285)
Oct 21 11:32:30 vsys-validator vsys[26849]: at java.util.ArrayDeque.remove(ArrayDeque.java:452)
Oct 21 11:32:30 vsys-validator vsys[26849]: at com.google.common.collect.EvictingQueue.add(EvictingQueue.java:110)
Oct 21 11:32:30 vsys-validator vsys[26849]: at vsys.network.PeerDatabaseImpl.addCandidate(PeerDatabaseImpl.scala:36)
Oct 21 11:32:30 vsys-validator vsys[26849]: at vsys.network.PeerSynchronizer.$anonfun$channelRead$7(PeerSynchronizer.scala:47)
Oct 21 11:32:30 vsys-validator vsys[26849]: at vsys.network.PeerSynchronizer.$anonfun$channelRead$7$adapted(PeerSynchronizer.scala:47)
Oct 21 11:32:30 vsys-validator vsys[26849]: at scala.collection.Iterator.foreach(Iterator.scala:944)
Oct 21 11:32:30 vsys-validator vsys[26849]: at scala.collection.Iterator.foreach$(Iterator.scala:944)
Oct 21 11:32:30 vsys-validator vsys[26849]: at scala.collection.AbstractIterator.foreach(Iterator.scala:1432)
Oct 21 11:32:30 vsys-validator vsys[26849]: at scala.collection.IterableLike.foreach(IterableLike.scala:71)
Oct 21 11:32:30 vsys-validator vsys[26849]: at scala.collection.IterableLike.foreach$(IterableLike.scala:70)
Oct 21 11:32:30 vsys-validator vsys[26849]: at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
Oct 21 11:32:30 vsys-validator vsys[26849]: at vsys.network.PeerSynchronizer.channelRead(PeerSynchronizer.scala:47)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
Oct 21 11:32:30 vsys-validator vsys[26849]: at vsys.network.DiscardingHandler.channelRead(DiscardingHandler.scala:14)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
Oct 21 11:32:30 vsys-validator vsys[26849]: at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
Oct 21 11:32:30 vsys-validator vsys[26849]: at java.lang.Thread.run(Thread.java:748)
t0 t1 t2 t3
--------------------------------------------------------> block time
A's view A B C
B's view A B C
C's view A B C
---------------------------------------------------------> block time
At the time of t1, It is A's turn to mint from the view of A and C, however, It is B's turn to mint from the view of B which leads to a forking as follows:
preBlock
/ \
/ \
A's block B's block
Therefore, each slot has its time to mint, 1)how to check the legality of a new block? 2)Does it depend on the local timestamp or blockTime?2)If A's block is not sent successfully and B's block is sent successfully, If B's block is received by A and C?
I find that MAB means you need to accumulate the coin age. For example, 1 coin in the old block height is more expensive than 1 coin in the new block height. The invocation of SPos I think is that the VSYS introduces the concept of super nodes and common people with less money can also get block rewards by the way of leasing out their coins.
Right? Or can you tell me more?
At present, our recommended documented deploy path (the .deb file) described in #194 does not result in a stable VSYS node.
I'm going to update our documentation so that when users follow our recommended deployment setup exactly, VSYS works perfectly, and this issue has been created to gather the needed information.
add more in/out bound connections in conf (120 or larger)
network {
# How many network inbound network connections can be made
max-inbound-connections = 120
# Number of outbound network connections
max-outbound-connections = 120
}
add more outbound buffer size in conf (64M or larger)
network {
# Network buffer size
outbound-buffer-size = 64M
}
use jar directly (may not use the .deb service one, the stable issue may cause by the service logic), in this case, I used
java -jar v-systems-v***.jar, vsys.conf
java -Xmx4096m -jar ***.jar **.conf
allocated more threads in
java -Dscala.concurrent.context.maxExtraThreads=1024 -jar ***.jar **.conf
Is there anything else that we need to include in a default configuration that should work flawlessly every time?
Peerchemist has made mention of using Docker. Should we?
token balance will increased when execute self-token-send operations
If a miner A is before miner B, C, and A is hated by B and C.
After A has produced a new block called "ABlock", B and C what the "ABlock" be ignored.
Then , B produces a block which is attached to the previous block of "ABlock", then C will produce the next block after B's block
Block N <---- ("ABlock": Block of A)
|
+--- (Block of B) <----- (Block of C)
As a result, A's block will be ignored or rollbacked.
How does spos handle this case?
In the v systems, the code uses the balance model instead of the UTXO model to calculate the MAB, I wonder to know why and I give a basic design about coin age based on the UTXO model corresponding to the design about coin age based on the Balance model. And I am willing to get feedbacks from you for any suggestion.
The design about coin age based on the UTXO model as follows:
Each utxo in a different block height has different price which is less than or equal to its actual price and an utxo will be equal to its own price when undergoing N blocks(sliding windows).
Formulation is that MAB = min{Balance_currentHeight, sum(alpha*utxo_i)} where alpha is equal to (current_height - height_i) / N if current_height - height_i < N, else alpha is equal to 1.
The progeam exit when synchronize block, the logs as follows.
2019-11-17 21:27:44 ERROR [nator-handler-1] v.b.h.HistoryWriterImpl - LevelDB write batch error
org.iq80.leveldb.DBException: Corruption: block checksum mismatch
at org.fusesource.leveldbjni.internal.JniDB.write(JniDB.java:153)
at org.fusesource.leveldbjni.internal.JniDB.write(JniDB.java:114)
at vsys.db.Storage.$anonfun$commit$1(Storage.scala:64)
at vsys.db.Storage.$anonfun$commit$1$adapted(Storage.scala:62)
at scala.Option.foreach(Option.scala:257)
at vsys.db.Storage.commit(Storage.scala:62)
at vsys.blockchain.history.HistoryWriterImpl.$anonfun$appendBlock$2(HistoryWriterImpl.scala:43)
at scala.util.Either.map(Either.scala:350)
at vsys.blockchain.history.HistoryWriterImpl.$anonfun$appendBlock$1(HistoryWriterImpl.scala:33)
at vsys.utils.Synchronized.synchronizeOperation(Synchronized.scala:82)
at vsys.utils.Synchronized.synchronizeOperation$(Synchronized.scala:79)
at vsys.blockchain.history.HistoryWriterImpl.synchronizeOperation(HistoryWriterImpl.scala:16)
at vsys.utils.Synchronized.write(Synchronized.scala:77)
at vsys.utils.Synchronized.write$(Synchronized.scala:76)
at vsys.blockchain.history.HistoryWriterImpl.write(HistoryWriterImpl.scala:16)
at vsys.blockchain.history.HistoryWriterImpl.appendBlock(HistoryWriterImpl.scala:32)
at vsys.blockchain.state.BlockchainUpdaterImpl.$anonfun$processBlock$1(BlockchainUpdaterImpl.scala:67)
at vsys.utils.Synchronized.synchronizeOperation(Synchronized.scala:82)
at vsys.utils.Synchronized.synchronizeOperation$(Synchronized.scala:79)
at vsys.blockchain.state.BlockchainUpdaterImpl.synchronizeOperation(BlockchainUpdaterImpl.scala:19)
at vsys.utils.Synchronized.write(Synchronized.scala:77)
at vsys.utils.Synchronized.write$(Synchronized.scala:76)
at vsys.blockchain.state.BlockchainUpdaterImpl.write(BlockchainUpdaterImpl.scala:19)
at vsys.blockchain.state.BlockchainUpdaterImpl.processBlock(BlockchainUpdaterImpl.scala:61)
at vsys.blockchain.Coordinator$.$anonfun$appendBlock$4(Coordinator.scala:86)
at scala.util.Either.flatMap(Either.scala:338)
at vsys.blockchain.Coordinator$.$anonfun$appendBlock$3(Coordinator.scala:85)
at scala.util.Either.flatMap(Either.scala:338)
at vsys.blockchain.Coordinator$.appendBlock(Coordinator.scala:83)
at vsys.blockchain.Coordinator$.$anonfun$processFork$4(Coordinator.scala:35)
at scala.collection.Iterator$$anon$10.next(Iterator.scala:457)
at scala.collection.TraversableOnce.collectFirst(TraversableOnce.scala:145)
at scala.collection.TraversableOnce.collectFirst$(TraversableOnce.scala:132)
at scala.collection.SeqViewLike$AbstractTransformed.collectFirst(SeqViewLike.scala:37)
at vsys.blockchain.Coordinator$.forkApplicationResultEi$1(Coordinator.scala:36)
at vsys.blockchain.Coordinator$.$anonfun$processFork$13(Coordinator.scala:47)
at scala.util.Either.flatMap(Either.scala:338)
at vsys.blockchain.Coordinator$.$anonfun$processFork$12(Coordinator.scala:46)
at scala.util.Either.flatMap(Either.scala:338)
at vsys.blockchain.Coordinator$.$anonfun$processFork$9(Coordinator.scala:45)
at vsys.blockchain.Coordinator$.$anonfun$processFork$9$adapted(Coordinator.scala:44)
at scala.util.Either.flatMap(Either.scala:338)
at vsys.blockchain.Coordinator$.processFork(Coordinator.scala:44)
at vsys.network.CoordinatorHandler.$anonfun$processFork$1(CoordinatorHandler.scala:47)
at vsys.network.CoordinatorHandler.$anonfun$channelRead$6(CoordinatorHandler.scala:85)
at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:654)
at scala.util.Success.$anonfun$map$1(Try.scala:251)
at scala.util.Success.map(Try.scala:209)
at scala.concurrent.Future.$anonfun$map$1(Future.scala:288)
at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:29)
at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:29)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.fusesource.leveldbjni.internal.NativeDB$DBException: Corruption: block checksum mismatch
at org.fusesource.leveldbjni.internal.NativeDB.checkStatus(NativeDB.java:200)
at org.fusesource.leveldbjni.internal.NativeDB.write(NativeDB.java:285)
at org.fusesource.leveldbjni.internal.JniDB.write(JniDB.java:150)
... 54 common frames omitted
And I try to restart the program, a new exception founded in the log.
2019-11-18 05:28:00 INFO [main] v.b.s.BlockchainUpdaterImpl - State rebuild started, total blocks: 7604242, persisted: 7597042, topMemDiff: 0, bottomMemDiff: 0
2019-11-18 05:28:00 ERROR [main] v.actor.RootActorSystem$ - Error while initializing actor system vsys
java.lang.Exception: TransactionValidationError(GenericError(Tx id cannot be duplicated. Current height is: 7597043. Tx with such id already present),{"type":5,"id":"Edz6g79UHiscytPY8G1rm3cXbJ7VKytABWSSoH6vdDCw","recipient":"ARKMGddxHQqfji4Te74VyNLAM3rTbiHJ6CC","timestamp":1573997264002496914,"amount":3600000000,"currentBlockHeight":7597043})
at vsys.blockchain.state.package$EitherExt2.explicitGet(package.scala:20)
at vsys.blockchain.state.diffs.BlockDiffer$.$anonfun$unsafeDiffMany$1(BlockDiffer.scala:26)
at scala.collection.TraversableOnce.$anonfun$foldLeft$1(TraversableOnce.scala:157)
at scala.collection.TraversableOnce.$anonfun$foldLeft$1$adapted(TraversableOnce.scala:157)
at scala.collection.Iterator.foreach(Iterator.scala:944)
at scala.collection.Iterator.foreach$(Iterator.scala:944)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1432)
at scala.collection.IterableLike.foreach(IterableLike.scala:71)
at scala.collection.IterableLike.foreach$(IterableLike.scala:70)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at scala.collection.TraversableOnce.foldLeft(TraversableOnce.scala:157)
at scala.collection.TraversableOnce.foldLeft$(TraversableOnce.scala:155)
at scala.collection.AbstractTraversable.foldLeft(Traversable.scala:104)
at vsys.blockchain.state.diffs.BlockDiffer$.unsafeDiffMany(BlockDiffer.scala:25)
at vsys.blockchain.state.BlockchainUpdaterImpl.$anonfun$unsafeDiffByRange$4(BlockchainUpdaterImpl.scala:33)
at vsys.blockchain.state.StateWriterImpl$.withTime(StateWriter.scala:196)
at vsys.blockchain.state.StateWriterImpl$.measureLog(StateWriter.scala:208)
at vsys.blockchain.state.BlockchainUpdaterImpl.unsafeDiffByRange(BlockchainUpdaterImpl.scala:33)
at vsys.blockchain.state.BlockchainUpdaterImpl.$anonfun$updatePersistedAndInMemory$2(BlockchainUpdaterImpl.scala:52)
at vsys.blockchain.state.BlockchainUpdaterImpl.$anonfun$updatePersistedAndInMemory$2$adapted(BlockchainUpdaterImpl.scala:51)
at scala.collection.immutable.Stream.foreach(Stream.scala:530)
at vsys.blockchain.state.BlockchainUpdaterImpl.$anonfun$updatePersistedAndInMemory$1(BlockchainUpdaterImpl.scala:51)
at vsys.blockchain.state.BlockchainUpdaterImpl.$anonfun$updatePersistedAndInMemory$1$adapted(BlockchainUpdaterImpl.scala:46)
at vsys.utils.Synchronized.synchronizeOperation(Synchronized.scala:82)
at vsys.utils.Synchronized.synchronizeOperation$(Synchronized.scala:79)
at vsys.blockchain.state.BlockchainUpdaterImpl.synchronizeOperation(BlockchainUpdaterImpl.scala:19)
at vsys.utils.Synchronized.write(Synchronized.scala:77)
at vsys.utils.Synchronized.write$(Synchronized.scala:76)
at vsys.blockchain.state.BlockchainUpdaterImpl.write(BlockchainUpdaterImpl.scala:19)
at vsys.blockchain.state.BlockchainUpdaterImpl.vsys$blockchain$state$BlockchainUpdaterImpl$$updatePersistedAndInMemory(BlockchainUpdaterImpl.scala:46)
at vsys.blockchain.state.BlockchainUpdaterImpl$.apply(BlockchainUpdaterImpl.scala:122)
at vsys.blockchain.history.StorageFactory$.apply(StorageFactory.scala:24)
at vsys.Application.<init>(Application.scala:50)
at vsys.Application$$anon$1.<init>(Application.scala:268)
at vsys.Application$.$anonfun$main$2(Application.scala:268)
at vsys.Application$.$anonfun$main$2$adapted(Application.scala:258)
at vsys.actor.RootActorSystem$.start(RootActorSystem.scala:25)
at vsys.Application$.main(Application.scala:258)
at vsys.Application.main(Application.scala)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.