Giter Site home page Giter Site logo

kevacoin-project / kevacoin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from litecoin-project/litecoin

32.0 32.0 16.0 123.64 MB

Kevacoin source tree

Home Page: https://www.kevacoin.org

License: MIT License

Makefile 0.97% Shell 0.54% M4 1.61% QMake 0.01% Python 10.72% C++ 67.29% C 16.90% HTML 0.18% Objective-C++ 0.06% Assembly 0.92% Java 0.24% CMake 0.24% Batchfile 0.01% q 0.09% Sage 0.24%

kevacoin's People

Contributors

achow101 avatar cozz avatar fanquake avatar gavinandresen avatar gmaxwell avatar instagibbs avatar jianpingw avatar jnewbery avatar jonasschnelli avatar jtimon avatar kallewoof avatar laanwj avatar luke-jr avatar meshcollider avatar morcos avatar muggenhor avatar ninghejianping avatar non-github-bitcoin avatar paveljanik avatar petertodd avatar practicalswift avatar promag avatar pstratem avatar rebroad avatar ryanofsky avatar sdaftuar avatar sipa avatar thebluematt avatar theuni avatar thrasher- 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kevacoin's Issues

Hard fork to prevent Nicehash disruption

Since Jan. 25, 2020, Kevacoin has been experiencing a sudden increase of hash rate. In many cases, the increase of hash rate is a good thing because it increases the security of the previously generated blocks. However, what is concerning about the increase is that:

  1. The hash rate comes from one or two addresses and is about five times greater than the rest. This inevitably creates a concentration of mining power and is not great for the decentralization of the Keva blockchain. It poses a threat of potential 51% attack, even though at this early stage it is unlikely to cause actual loss because the coin has not been listed in any exchanges and we have not heard that it has been used for purchase.

  2. Because of the concentration of mining power, most of the block rewards go to one or two addresses. This greatly discourages the other early participants and it is unfair to the dedicated miners due to the fluctuation of the network difficulty. The community wants to see a healthy and organic growth of the project.

We have two options to address this concern:

  1. Appeal to the Nicehasher to be nice and play fair. This may work temporarily but other not-so-nice Nicehasher can still come at any time.

  2. Create a hard-fork such that the new hash algorithm is not available in Nicehash.

It seems that option 2 is the more effective one for the short and long term. If so, the next question is what algorithm to use. We have some constraints on the algorithms. It has to be one of Cryptonight hash algorithms as we have to support the current mining pools and miners. The hash rate must not be significantly different from the existing Cryptonight R, because that may cause problem for the difficulty adjustment algorithm.

I can think of three options:

  1. Use an existing Cryptonight variant. E.g @Kev mentioned Cryptonight Fast (i.e. Cryptonight V2 at half the iteration).

    The problem with this option is that Cryptonight R (CN/R) has no existing variants we can use. I have a strong preference for CN/R as I feel it is a good ASIC-resistant algorithm. Moving to variants of earlier Cryptonight algorithms (CN Fast) makes me feel like a downgrade.

    The advantage of this option is that we can quickly create a hard-fork once we gain the support of the mining pools.

  2. Upgrade to RandomX.

    RandomX is available on Nicehash, so we have the same issue as CN/R. I also feel that a large percentage of our early miners are using GPUs and I do not want to abandon these early supporters.

  3. Use our own variant. I propose a variant call Cryptonight R2, which simply increases the value ITER from 1048576 to (1048576 + 2).

    For this option to work, in addition to mining pool support, we also need the support of major miners (XMRig, XMR Stak etc.). We will provide patches, but it is up to them to decide to accept the patch or not. We may need to create our own forks of the miners if they decide against our patches, which is not ideal.

Please consider these options and provide feedback. Thanks.

Value size limits - rational reason

If the publisher pay for the bytes he posting in blockchain, why to make a limits for the data sizes?

I've found in the F.A.Q. section, that because prevent ddos attacks. But if it happened, attacker could place many of transactions at the same time.
Anyway, blockchain has milestones for these issues, so on the attack you always able to rollback the chain state.

I think, values size limits (3072 bytes) not enough, as software developer, have many ideas, but must to split the content to implement some of them. So I can do that, but issue - that not resolve the blockchain size overload with current market cost / hashrate.

Regards

Mining difficulty & data storing rising in price [critics]

I have no questions about the kevacoin cost by the market rates. But what I'm not understand - is the coins limitation and mining difficulty growing with the time. If we talking about kevacoin as the distributed database, what is the reason make this storage expansive in price with a time?

I think that current implementation will get the same issues like ethereum when storing the data there currently is not reasonable in the most of cases.

Content research

Hello,

how can I find served key/values in the blockchain? Is there any API or third-party namespaces explorer there?

Publish and Subscribe APIs for Keva events

When developing applications on Kevacoin, it is handy to be able to subscribe to certain Keva events. For example, a Twitter-like application on Keva blockchain can listen to the event that a user follows the other user. Assume that the follower adds a key to her own namespace (N_follower) to indicate that she is following the other user whose namespace is N_celeb:

keva_put  <N_follower>  <N_celeb>  true

The application listening to this kind of event will be notified, and then when N_celeb publishes a new update, the application will notify the follower.

Similarly, if the follower stops following, she can set the value to false:

keva_put  <N_follower>  <N_celeb>  true

The application will also receive this event and stop send her the updates.

Note that the data is completely on the blockchain and the application can be written by anyone. The developer of the application has no monopoly on the data. The pub/sub APIs make it easier to develop applications, though technically the data on the blockchain provides sufficient information and is the single source of truth.

Bitcoin has APIs like walletnotify and blocknotify, and ZeroMQ for publishing several kinds of events. We can probably build on top the APIs for Keva events.

Set multiple key-value pair in one transaction

Currently, the keva_put command can only update or set one key in one transaction. When there are many small updates, this is obviously not an optimal approach.

We should either enhance keva_put to support multiple keys, or have a new command such as keva_many_put to update or set multiple keys in one single transaction.

Can't compile on ARM

armv7l GNU/Linux
Ubuntu 20.04

...
checking for objcopy... /bin/objcopy
checking whether C++ compiler accepts -Werror... yes
checking whether C++ compiler accepts -Wall... yes
checking whether C++ compiler accepts -Wextra... yes
checking whether C++ compiler accepts -Wformat... yes
checking whether C++ compiler accepts -Wvla... yes
checking whether C++ compiler accepts -Wformat-security... yes
checking whether C++ compiler accepts -Wthread-safety-analysis... no
checking whether C++ compiler accepts -Wunused-parameter... yes
checking whether C++ compiler accepts -Wself-assign... no
checking whether C++ compiler accepts -Wunused-local-typedef... no
checking whether C++ compiler accepts -Wdeprecated-register... no
checking whether C++ compiler accepts -Wimplicit-fallthrough... yes
checking whether C++ compiler accepts -msse4.2... no
checking whether C++ compiler accepts -maes... no
configure: error: "Compiler does not support -maes which is required by Cryptonight."

Cannot verify signed message

Steps to reproduce:

  1. Dump the private key:
    kevacoin-cli dumpprivkey <V_pub_key>

  2. Sign a message with private key:
    `kevacoin-cli signmessagewithprivkey M_priv_key "test_message"

  3. Verify the message:
    kevacoin-cli verifymessage <V_pub_key> <signed_msg> test_message

Step 3 returns an error message:

error code: -3
error message:
Address does not refer to key

Allow the use of namespace display name in keva operations

Current keva operations (e.g keva_put, keva_get, keva_delete, keva_filter) need the actual namespace Id (prefix 'N'). It would be more convenient if we can simply use the internal display name.

E.g. instead of:

kevacoin-cli keva_namespace test5

{
  "txid": "1b79f58f278e731ba59484c53fc65c472ee1373a7bc559c907336c860c53b36a",
  "namespaceId": "NL5VgsZcmyHANsLjsdvhP8roctBEKC55Nv"
}

kevacoin-cli keva_put NL5VgsZcmyHANsLjsdvhP8roctBEKC55Nv first_key first_value

It can be simplied as:

kevacoin-cli keva_namespace test5
kevacoin-cli keva_put 'test5' first_key first_value

Internally, it searches the namespace with the display name "test5", and find out the namespace Id, and uses the namespace Id for the operation.

Remember that the display name is not unique, which means two namespaces can have the same display name. In this case, maybe we can decline the operation and ask for actual namespace Id.

Wallet sync seems to be slow

We received reports from some users that Kevacoin wallet sync was slow.

Steps to reproduce (command line):

  1. Make sure the Kevacoin data directory is clean (do not accidentally delete your wallet.dat), so that the wallet will sync from the beginning.
  2. On one console, run kevacoind.
  3. On the other console, run kevacoin-cli getblockcount. This command returns after a long period of time.

On GUI wallet, the connecting to peers ... message last for a long time.

Ideas to keep keva alive

  1. Reduce block reward, as miners able to generate huge blockchain with current rewards - 500 kva can fill the storage up to gigabytes - that's not cool for the full node hosters
  2. Make physical blockchain cleanup by keva put / delete operators - for right not it's not delete the data from blockchain just tell client to not read by frontend
  3. Remove block size limits (#27 (comment))
  4. Add build in mining UI for regular users, because not all of them ready to run stratum with xmrig after pools down

Maybe some other thoughts will be described in this topic.

p.s. authors not active for right now so maybe these notes would be useful for the future forks

How to find namespace name in a tx which is not part of the wallet?

If I send someone a txid, how does he use the wallet to find the namespace name?

I can use gettransaction to get "details" if the tx is part of the wallet.

gettransaction cb1cb15cecf1956d3ef4b8bab356a1119b5cf3b92afb905f501c0054ab541c7b

{
  "amount": 0.00000000,
  "fee": -0.00769011,
  "confirmations": 540,
  "blockhash": "6bb86f21207ab3fc4ebd0eddfc8aa99c05d1efabc8558ff7c9e3724c19c5c5fd",
  "blockindex": 1,
  "blocktime": 1582962935,
  "txid": "cb1cb15cecf1956d3ef4b8bab356a1119b5cf3b92afb905f501c0054ab541c7b",
  "walletconflicts": [
  ],
  "time": 1582962926,
  "timereceived": 1582962926,
  "bip125-replaceable": "no",
  "details": [
    {
      "account": "",
      "address": "VZjBLD3uBiQ5qLhHYryHWW7oLLoXMKPaZN",
      "keva": "update: NPPtp2dXRvvdi3K6pgiDAJZsVYzLK49RFZ",
      "category": "send",
      "amount": 0.00000000,
      "vout": 0,
      "fee": -0.01769011,
      "abandoned": false
    }
  ]

But others only could use getrawtransaction, and no "details".

getrawtransaction cb1cb15cecf1956d3ef4b8bab356a1119b5cf3b92afb905f501c0054ab541c7b 1

Is there any other ways to get namespace name?

Now ravencoin support upload ipfx hash/txid to the blockchain, I think if everyone can check txid to visit namespace. It's both good for keva and rvn.

And send namespace to each other on the blochchain is possable.

Question about the OP_KEVA_DELETE opcode processing

I'm writing an indexing script, so want to actualize the data on receiving new blocks.

Do I understand it right, that data not physically removing from the previous blocks, just we have OP_KEVA_DELETE marker in the last block incoming, that means to 'hide' the data stored before?

Thanks.

API example to get key-value from namespace or transaction that you don't own

Hi,

Somewhere on the kevacoin site it's mentioned that the blockchain is public and that i should be able to see the transactions that others made. With that i specifically mean key-value transactions.

I'm hoping for an example where i can get the whole json data without the need to provide a key. I suppose this is, technically, the same as using kevacoin-cli keva_filter <namespace> "*"

With this, i also want to be able to get that very same data from namespaces i did not made. The documentation is not clear on how to do that or even if it's supported.

Cheers,
Mark

keva_list_namespace returns incorrect format for pending new namespace

Steps to reproduce:

  1. Create a new namespace

    keva_namespace my_new_namespace
    
  2. While the namespace is still pending (not included in the next block), list the namespace

    keva_list_namespace
    

The namespace returned for the pending namespace is like:

{
    "Nc7SU3ZzaRaFpnBcGnChNJNHwj57pot2Ni": "insta"
}

It should be like:

{
    "namespaceId": "Nc7SU3ZzaRaFpnBcGnChNJNHwj57pot2Ni",
    "displayName": "insta"
}

Key "3" decoded as "Q" symbol

I'm writing a content researching script. All working well there, but I've detected a strange behavior on parsing a block 308648, txid:
40bb0060b91a0b2f333b17a0da1f3dae92d9f52a904f241401f0f6cb355d37e5

What is the reason? In the wallet it is "3" and in the API response it's "Q"
(I'm using remote API by https://explorer.kevacoin.org/info to interact with the blockchain, may be issue of this service)

The script and all the decoding process presented here (but it's no problem with the literal key names):
https://github.com/kvazar-network/crawler-api-node/blob/main/crawler.php

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.