by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Hiroshi Shimo
    @hshimo
    it works fine with geth, but it doesn't work with HydraChain. I've tried version 0.3.0, but it returns same error.
    and also it shows the same error by direct JSON-RPC call.
    Hiroshi Shimo
    @hshimo

    What is the stable OS for installing HydraChain?

    I tried to install Hydrachain, but it seems it doesn't work in Ubuntu 16.04

    $ python setup.py develop
    Traceback (most recent call last):
      File "setup.py", line 8, in <module>
        from setuptools.command.test import test as TestCommand
    ImportError: No module named setuptools.command.test
    Hiroshi Shimo
    @hshimo
    unlockAccount problem is solved. you just need to set 3rd argument like
    personal.unlockAccount(eth.accounts[1], 'XXX', 30);
    Coderdojo Edison
    @coderdojoedison
    Hello - the last commit in HydraChain/consensus was almost few months back.. just wondering if this is in active development ..or can anyone provide info on future road map/plan of HydraChain/Consensus ?
    heikoheiko
    @heikoheiko
    Last commit was Jun 23 :) We are updating it if there are bugs, otherwise and for a roadmap: we currently only add features in context of contracted work.
    Coderdojo Edison
    @coderdojoedison
    so, I downloaded and played around with multiple nodes, validators etc...very cool stuff. Just one clarification, there is a no way to restrict a node from connecting to chain - the permissioning is only at validator/block creation level and not the network protocol - where I can restrict a node to connect? Is that correct or perhaps I couldn't find the right config?
    Hiroshi Shimo
    @hshimo
    I also wonder how to configure accounts, nodes and network without rundummy option.
    So I looked into the code. Is this what should we do for accounts and network settings?
    def _configure_node_network(config, num_validators, node_num, seed):
        assert node_num < num_validators
    
        # reduce key derivation iterations
        PBKDF2_CONSTANTS['c'] = 100
    
        # create this node priv_key
        config['node']['privkey_hex'] = mk_privkey('%d:udp:%d' % (seed, node_num)).encode('hex')
    
        # create validator addresses
        validators = [privtoaddr(mk_privkey('%d:account:%d' % (seed, i)))
                      for i in range(num_validators)]
        config['hdc']['validators'] = validators
    
        # create this node account
        account = Account.new(password='', key=mk_privkey('%d:account:%d' % (seed, node_num)))
        assert account.address in validators
        return config, account
    It looks like we can create accounts by pyeth, tho.
    Agnieszka Kramarek
    @4gn3s

    Hello guys, I have trouble interacting with native contracts in hydrachain. I run hydrachain using the runmultiple option, so first I add some funds:

    for node_num in range(num_validators):
        config['test_privkeys'].append(mk_privkey('%d:account:%d' % (seed, node_num)))

    and then I switch to hydrachain console and try to run the following code:

    def try_interact(app, coinbase):
         nc.registry.register(Fungible)
         tx_reg_address = create_contract_instance(app, coinbase, Fungible)
         proxy = nc.chain_nac_proxy(app.services.chain.chain, coinbase, tx_reg_address)
         total = 10000
         transfer_amount = 10
         proxy.init(total)
         wait_next_block_factory(app)()
         assert proxy.totalSupply() == total
         assert proxy.balanceOf(coinbase) == total
         assert proxy.transfer(accounts[0], transfer_amount) == OK
         assert proxy.balanceOf(coinbase) == total - transfer_amount
         assert proxy.balanceOf(accounts[0]) == transfer_amount

    but the asserts fail. How to initialize a native contract to be able to interact with it correctly?

    Roman Zacharia
    @RomanZacharia
    @4gn3s how is that supposed to add you funds?
    for node_num in range(num_validators):
    config['test_privkeys'].append(mk_privkey('%d:account:%d' % (seed, node_num)))
    Hiroshi Shimo
    @hshimo
    How can I change the coinbase address or password? It looks like there is no setEtherebase() method.
    Roman Zacharia
    @RomanZacharia
    @hshimo you can transfer your tokens to another account
    Hiroshi Shimo
    @hshimo
    @RomanZacharia yes, but I'm worried about security because default coinbase account has no password.

    It looks like coinbase is set in this file.

    hydrachain/app.py L:227

       if config['hdc']['validators']:
           assert app.services.accounts.coinbase in config['hdc']['validators']

    How about this?

       if config['hdc']['coinbase']:
           assert app.services.accounts.coinbase in config['hdc']['coinbase']
    Agnieszka Kramarek
    @4gn3s
    @RomanZacharia this creates some funds to genesis. And when I do eth.latest.get_balance(eth.coinbase), I get 1049000000000000000000L, so I guess the problem is not the lack of funds to deploy the contract?
    Roman Zacharia
    @RomanZacharia
    So do you insert your code right into the app.py?
    @4gn3s Where do you insert these two lines?
    Agnieszka Kramarek
    @4gn3s
    @RomanZacharia yes, of course. as mentioned before, i've added those in runmultiple(), right after this line; so I think it should work, start_app() is called afterwards
    Roman Zacharia
    @RomanZacharia
    @4gn3s How did you initialize the 'Fungible' in your example?
    Hiroshi Shimo
    @hshimo
    I still can't set coinbase address so far. anyone?
    konradkonrad
    @konradkonrad

    @hshimo Have you tried to modify

    eth.app.config['hdc']['validators']
    eth.services.accounts.coinbase

    from inside the console?

    Hiroshi Shimo
    @hshimo
    @konradkonrad How can I get into console? hydrachain command doesn't have console option.
    ah, Ctrl-C then Enter
    Hiroshi Shimo
    @hshimo

    @konradkonrad
    following command doesn't work, but

    eth.services.accounts.coinbase = "7b237ffcb6c5c0121b3f772a00afda8bda23724b"

    I could set

     eth.coinbase = "7b237ffcb6c5c0121b3f772a00afda8bda23724b"
    konradkonrad
    @konradkonrad
    cool. did that solve your issue?
    Hiroshi Shimo
    @hshimo
    @konradkonrad not yet. I'm looking into the code.
    Hiroshi Shimo
    @hshimo

    I've got this error, when I use "run" option even I have three accounts.

    hydrachain -d dir2 -c "jsonrpc={corsdomain: '*', listen_host: 0.0.0.0, listen_port: 8545, rpcapi: 'eth,net,web3,personal', coinbase: '84bbf2701fd1e1e9f1acac50bb595cebcb099844'}" run --console

      File "/home/user/hydrachain/hydrachain/hdc_service.py", line 223, in consensus_privkey
        return self.app.services.accounts[0].privkey
      File "/home/user/.pyenv/versions/anaconda3-4.0.0/envs/py2/lib/python2.7/site-packages/pyethapp-1.4.0-py2.7.egg/pyethapp/accounts.py", line 506, in __getitem__
        return self.accounts[address_or_idx]
    IndexError: list index out of range
    Hiroshi Shimo
    @hshimo

    I've tried following two, but it doesn't work.

    hydrachain -d dir3 -c "jsonrpc={corsdomain: '*', listen_host: 0.0.0.0, listen_port: 8545, rpcapi: 'eth,net,web3,personal', coinbase: '84bbf2701fd1e1e9f1acac50bb595cebcb099844'}" rundummy --num_validators=1 --seed=4

    coinfig.yml

    node: {privkey_hex: 9c986164038c306653f4a0742f743fd558c83e593267b259e1d646ea887a1286}
    eth:
     coinbase: '84bbf2701fd1e1e9f1acac50bb595cebcb099844'
    Hiroshi Shimo
    @hshimo
    Have anyone succeeded to boot hydrachain with run option?
    Roman Zacharia
    @RomanZacharia
    Hi @4gn3s , I suspect there is a bug in native contracts which makes the piece of data being stored and retreived to/from the storage with a different key, I'll verify that and try fixing. I suppose this is the reason your example does not work
    Agnieszka Kramarek
    @4gn3s
    thanks @RomanZacharia for looking into this
    Roman Zacharia
    @RomanZacharia
    Hi @4gn3s !
    I finlly found the exact reason why your example fails
    It fails because nc.chain_nac_proxy is a tester object and it applies transaction to a temporary block, not an actual head
    Here is your example fixed:
    This message was deleted
    This message was deleted
    Roman Zacharia
    @RomanZacharia
    heikoheiko
    @heikoheiko
    @RomanZacharia can you provide a diff? or point out the changes?
    Roman Zacharia
    @RomanZacharia
    @heikoheiko @4gn3s I added another native contract proxy which commits transactions to the actual head candidate block. Here is the diff RomanZacharia/hydrachain@777c2fc
    singhalpk
    @singhalpk
    How can I apply PBFT on ethereum test net ?
    singhalpk
    @singhalpk
    Hey i am trying to use HydraChain according to github but the error
    image.png
    Anyone?
    mieomio
    @mieomio
    hello, I am a student. I start learning hydrachain. Look forward to receiving help from everyone
    Jubril
    @TheJubril_twitter
    Hello Guys, I'm new here and to blockchain generally. I have an application I want to implement and I have a couple of questions to ask
    I want to build an app upon blockchain for a business, so it needs to be private, maybe use majority voting as against POW
    I checked out ethereum but the issue of gas for transaction pushed me away.
    Would Hydrachain work for my use case?