Bitcoin Forum
May 02, 2024, 08:36:12 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Poll
Question: none
. - 0 (0%)
. - 0 (0%)
Total Voters: 0

Pages: « 1 ... 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 [119] 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 »
  Print  
Author Topic: 🌱[ANN] SOIL | Environmental | Agriculture | Smart Contracts | Sustainable  (Read 237558 times)
martymcfly2015
Member
**
Offline Offline

Activity: 82
Merit: 10

Auxiliary Soil Developer


View Profile
May 02, 2017, 09:40:40 PM
Last edit: May 03, 2017, 12:45:31 PM by martymcfly2015
 #2361

Community, even if your donations are rare  Wink - here is gsoil 1.6.1! based on the very latest go-ethereum sourcecode. This is a huge step compared to our current client, having now all the latest improvements included to gsoil. Believe me, that was not easy - keep in mind that I'm not a developer. Anyway here you go: https://github.com/Soilcoin/go-soil
[EDIT]
Binaries are now available:
https://github.com/Soilcoin/go-soil/releases

THIS IS AN UNSTABLE VERSION - Please make at least a backup of you keystore folder before you test it and do not send much soil until we are all on the same version. Let us know if you have some issues or if it's working great for you.

If you like my work... tip me  Smiley
[SOIL] 0x663682fd2d96064fdb2f152a56bab75d921065c0
BTC 17vKnSGtuegVi8LsSpQbJwDsNFdgrkwuwf
1714682172
Hero Member
*
Offline Offline

Posts: 1714682172

View Profile Personal Message (Offline)

Ignore
1714682172
Reply with quote  #2

1714682172
Report to moderator
1714682172
Hero Member
*
Offline Offline

Posts: 1714682172

View Profile Personal Message (Offline)

Ignore
1714682172
Reply with quote  #2

1714682172
Report to moderator
"Bitcoin: mining our own business since 2009" -- Pieter Wuille
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714682172
Hero Member
*
Offline Offline

Posts: 1714682172

View Profile Personal Message (Offline)

Ignore
1714682172
Reply with quote  #2

1714682172
Report to moderator
1714682172
Hero Member
*
Offline Offline

Posts: 1714682172

View Profile Personal Message (Offline)

Ignore
1714682172
Reply with quote  #2

1714682172
Report to moderator
Joint Force
Hero Member
*****
Offline Offline

Activity: 804
Merit: 500

DAO ↔ DApp


View Profile WWW
May 03, 2017, 06:00:42 AM
 #2362

Community, even if your donations are rare  Wink - here is gsoil 1.6.1! based on the very latest go-ethereum sourcecode. This is a huge step compared to our current client, having now all the latest improvements included to gsoil. Believe me, that was not easy - keep in mind that I'm not a developer. Anyway here you go: https://github.com/Soilcoin/go-soil
Later the day I will compile binarys for the different operating systems.
THIS IS AN UNSTABLE VERSION - Please make at least a backup of you keystore folder before you test it and do not send much soil until we are all on the same version. Let us know if you have some issues or if it's working great for you.

If you like my work... tip me  Smiley
[SOIL] 0x663682fd2d96064fdb2f152a56bab75d921065c0
BTC 17vKnSGtuegVi8LsSpQbJwDsNFdgrkwuwf

Nice job. Ethereum is cool but doesn't scale. This could be a really useful network for a dapp. Cheap smart contracts.

martymcfly2015
Member
**
Offline Offline

Activity: 82
Merit: 10

Auxiliary Soil Developer


View Profile
May 03, 2017, 12:47:39 PM
 #2363

Community, even if your donations are rare  Wink - here is gsoil 1.6.1! based on the very latest go-ethereum sourcecode. This is a huge step compared to our current client, having now all the latest improvements included to gsoil. Believe me, that was not easy - keep in mind that I'm not a developer. Anyway here you go: https://github.com/Soilcoin/go-soil
[EDIT]
Binaries are now available:
https://github.com/Soilcoin/go-soil/releases

THIS IS AN UNSTABLE VERSION - Please make at least a backup of you keystore folder before you test it and do not send much soil until we are all on the same version. Let us know if you have some issues or if it's working great for you.

If you like my work... tip me  Smiley
[SOIL] 0x663682fd2d96064fdb2f152a56bab75d921065c0
BTC 17vKnSGtuegVi8LsSpQbJwDsNFdgrkwuwf

Here are the binaries:
https://github.com/Soilcoin/go-soil/releases
Dunkelheit667
Legendary
*
Offline Offline

Activity: 1045
Merit: 1157


no degradation


View Profile
May 03, 2017, 11:33:07 PM
 #2364

...
THIS IS AN UNSTABLE VERSION - Please make at least a backup of you keystore folder before you test it and do not send much soil until we are all on the same version. Let us know if you have some issues or if it's working great for you.
...
Indeed, well done! Smiley

Here is some feedback. I've updated a test node without big trouble. 1.6.1 redownloaded the whole blockchain, as I have no clue about all the Ethereum versions - not sure if this is expected or not. The node is running stable since ~ 24h without any crashes. Smiley

It looks like
Code:
web3.fromWei(eth.getBalance(eth.accounts[0]), "soil")
eth.sendTransaction({value:web3.toWei(0.1, "soil"), from:eth.coinbase, to:"address"})
etc. don't work anymore, I had to replace "soil" with "ether" to get it working, e.g.
Code:
web3.fromWei(eth.getBalance(eth.accounts[0]), "ether")

So far so good!


"And the machine keeps pushing time through the cogs, like paste into strings into paste again, and only the machine keeps using time to make time to make time.
And when the machine stops, time is an illusion that we created free will.
" - an unnamed Hybrid
cryptococcus
Newbie
*
Offline Offline

Activity: 46
Merit: 0


View Profile
May 04, 2017, 07:29:31 AM
 #2365

Community, even if your donations are rare  Wink - here is gsoil 1.6.1! based on the very latest go-ethereum sourcecode. This is a huge step compared to our current client, having now all the latest improvements included to gsoil. Believe me, that was not easy - keep in mind that I'm not a developer. Anyway here you go: https://github.com/Soilcoin/go-soil
[EDIT]
Binaries are now available:
https://github.com/Soilcoin/go-soil/releases

THIS IS AN UNSTABLE VERSION - Please make at least a backup of you keystore folder before you test it and do not send much soil until we are all on the same version. Let us know if you have some issues or if it's working great for you.

If you like my work... tip me  Smiley
[SOIL] 0x663682fd2d96064fdb2f152a56bab75d921065c0
BTC 17vKnSGtuegVi8LsSpQbJwDsNFdgrkwuwf

Here are the binaries:
https://github.com/Soilcoin/go-soil/releases


Got the error "Synchronisation failed..." "retrieved hash chain is invalid" @ 2122315. Do I have to resync from scratch with gsoil 1.6.1?
martymcfly2015
Member
**
Offline Offline

Activity: 82
Merit: 10

Auxiliary Soil Developer


View Profile
May 04, 2017, 11:42:50 AM
Last edit: May 04, 2017, 11:18:14 PM by martymcfly2015
 #2366

Community, even if your donations are rare  Wink - here is gsoil 1.6.1! based on the very latest go-ethereum sourcecode. This is a huge step compared to our current client, having now all the latest improvements included to gsoil. Believe me, that was not easy - keep in mind that I'm not a developer. Anyway here you go: https://github.com/Soilcoin/go-soil
[EDIT]
Binaries are now available:
https://github.com/Soilcoin/go-soil/releases

THIS IS AN UNSTABLE VERSION - Please make at least a backup of you keystore folder before you test it and do not send much soil until we are all on the same version. Let us know if you have some issues or if it's working great for you.

If you like my work... tip me  Smiley
[SOIL] 0x663682fd2d96064fdb2f152a56bab75d921065c0
BTC 17vKnSGtuegVi8LsSpQbJwDsNFdgrkwuwf

Here are the binaries:
https://github.com/Soilcoin/go-soil/releases


Got the error "Synchronisation failed..." "retrieved hash chain is invalid" @ 2122315. Do I have to resync from scratch with gsoil 1.6.1?

Unfortunately a resync is needed. It will take you about 10 minutes with the new --fast sync option (default). Delete C:\Users\username\AppData\Roaming\Soil\chaindata in windows or ~/.soil/chaindata in linux. This is needed because we jumped directly into the latest geth code-version. Please don't delete you keystore folder by accident!
martymcfly2015
Member
**
Offline Offline

Activity: 82
Merit: 10

Auxiliary Soil Developer


View Profile
May 04, 2017, 12:03:36 PM
Last edit: May 04, 2017, 02:01:43 PM by martymcfly2015
 #2367

...
THIS IS AN UNSTABLE VERSION - Please make at least a backup of you keystore folder before you test it and do not send much soil until we are all on the same version. Let us know if you have some issues or if it's working great for you.
...
Indeed, well done! Smiley

Here is some feedback. I've updated a test node without big trouble. 1.6.1 redownloaded the whole blockchain, as I have no clue about all the Ethereum versions - not sure if this is expected or not. The node is running stable since ~ 24h without any crashes. Smiley

It looks like
Code:
web3.fromWei(eth.getBalance(eth.accounts[0]), "soil")
eth.sendTransaction({value:web3.toWei(0.1, "soil"), from:eth.coinbase, to:"address"})
etc. don't work anymore, I had to replace "soil" with "ether" to get it working, e.g.
Code:
web3.fromWei(eth.getBalance(eth.accounts[0]), "ether")

So far so good!



Thank you for your feedback! This is weird - I've modified the file internal/jsre/deps/web3.js but it has no effect. Any ideas?

Code:
var ETH_UNITS = [
    'wei',
    'kwei',
    'Mwei',
    'Gwei',
    'szabo',
    'finney',
    'femtosoil',
    'picosoil',
    'nanosoil',
    'microsoil',
    'millisoil',
    'nano',
    'micro',
    'milli',
    'soil',
    'grand',
    'Msoil',
    'Gsoil',
    'Tsoil',
    'Psoil',
    'Esoil',
    'Zsoil',
    'Ysoil',
    'Nsoil',
    'Dsoil',
    'Vsoil',
    'Usoil'
];

[EDIT]
Seems it's also broken for expanse and ubiq. Maybe some web function.... I will leave it for now.
cryptococcus
Newbie
*
Offline Offline

Activity: 46
Merit: 0


View Profile
May 05, 2017, 07:04:54 AM
 #2368

Community, even if your donations are rare  Wink - here is gsoil 1.6.1! based on the very latest go-ethereum sourcecode. This is a huge step compared to our current client, having now all the latest improvements included to gsoil. Believe me, that was not easy - keep in mind that I'm not a developer. Anyway here you go: https://github.com/Soilcoin/go-soil
[EDIT]
Binaries are now available:
https://github.com/Soilcoin/go-soil/releases

THIS IS AN UNSTABLE VERSION - Please make at least a backup of you keystore folder before you test it and do not send much soil until we are all on the same version. Let us know if you have some issues or if it's working great for you.

If you like my work... tip me  Smiley
[SOIL] 0x663682fd2d96064fdb2f152a56bab75d921065c0
BTC 17vKnSGtuegVi8LsSpQbJwDsNFdgrkwuwf

Here are the binaries:
https://github.com/Soilcoin/go-soil/releases


Got the error "Synchronisation failed..." "retrieved hash chain is invalid" @ 2122315. Do I have to resync from scratch with gsoil 1.6.1?

Unfortunately a resync is needed. It will take you about 10 minutes with the new --fast sync option (default). Delete C:\Users\username\AppData\Roaming\Soil\chaindata in windows or ~/.soil/chaindata in linux. This is needed because we jumped directly into the latest geth code-version. Please don't delete you keystore folder by accident!


Resynced from scratch within a couple of minutes. Great work, Marty!
martymcfly2015
Member
**
Offline Offline

Activity: 82
Merit: 10

Auxiliary Soil Developer


View Profile
May 05, 2017, 07:22:51 PM
Last edit: May 06, 2017, 01:23:58 PM by martymcfly2015
 #2369





Here is a fresh version of our Gui Wallet aka SOILsafe. I've ported the latest meteor-dapp-wallet aka SOILsafe and the latest Mist aka Dust. SOILsafe is using the latest gsoil 1.6.1.

1) Please make a backup of your keystore folder! (You will find it in C:\Users\username\AppData\Roaming\Soil\ in windows and ~/.soil in linux
2) Delete the chaindata folder* (C:\Users\username\AppData\Roaming\Soil\chaindata in windows or ~/.soil/chaindata in linux )
3) Start SOILsafe.exe
4) Have fun  Smiley
5) Donate to teh Auxiliary Soil Developer

*Unfortunately a resync is needed. It will take you about 10 minutes with the new --fast sync option (default).

https://github.com/Soilcoin/SOILsafe/releases

Direct link for windows:
https://github.com/Soilcoin/SOILsafe/releases/download/0.8.10/SOILsafe-win64-0-8-10.zip
kkaarina587
Jr. Member
*
Offline Offline

Activity: 64
Merit: 5


View Profile
May 06, 2017, 08:47:53 AM
 #2370

Node taking forever to sync and get error every 40k blocks or so that no peers are available, but continues from previous block immediately every time I restart the gsoil.exe. Will stick with it and continue restarting until synched but it will take a while at this rate. Any pointers appreciated. Thx
yes it will be admired if they will be participated in this case here.
ExEric3
Full Member
***
Offline Offline

Activity: 176
Merit: 100


View Profile
May 06, 2017, 11:22:49 AM
 #2371

altsheets will you update your explorer node? Since stats and pool is linked on yours?
abvhiael
Hero Member
*****
Offline Offline

Activity: 722
Merit: 501


View Profile
May 07, 2017, 05:50:44 PM
 #2372



Hows the cryptopia funds going?

our DOT balance for our soilcoinfund account is 601828 DOT. so, we're 30% of the way there.
i havent gotten items up on the marketplace as id hoped this past week, was a crazy one for work on tattooing and search and rescue, im hoping i can steal a few hours this afternoon to get that started. still making inquiries at lots of exchanges, and the voting process is open at those listed previously in the thread, so at that point, its up to you guys, the community, to vote and get SOIL listed.
martymcfly2015
Member
**
Offline Offline

Activity: 82
Merit: 10

Auxiliary Soil Developer


View Profile
May 07, 2017, 09:01:14 PM
 #2373

https://bitcointalk.org/index.php?topic=1176709.msg18089992#msg18089992

Guys, I will take the soil I got via the community address above for my recent work. I will send some soil to abvhiael too. I hope you're ok with this.
martymcfly2015
Member
**
Offline Offline

Activity: 82
Merit: 10

Auxiliary Soil Developer


View Profile
May 07, 2017, 09:01:51 PM
 #2374

OP cleaned up  Smiley
Dunkelheit667
Legendary
*
Offline Offline

Activity: 1045
Merit: 1157


no degradation


View Profile
May 07, 2017, 10:19:53 PM
 #2375

...
Here is a fresh version of our Gui Wallet aka SOILsafe.
...
4) Have fun  Smiley
...
Nice work, again! Smiley

I've played with SOILsafe, it synced in < 1h and the balance shows up, great! I've tried so send some SOIL but had no luck. node.log shows:
Code:
INFO [05-07|23:56:35] Submitted transaction                    fullhash=0xd6e6703c372d7e7ef8aef9245a5f31264ce20b27b35a09d4359fb0d16ccee06f recipient=0x...
etc.
However, it seems the transaction was not transmitted to the network for some reason. Even with the maximum fee. I've not seen any additional details in the log-file.

Any idea what went wrong? Undecided

Thank you for your feedback! This is weird - I've modified the file internal/jsre/deps/web3.js but it has no effect. Any ideas?
...
[EDIT]
Seems it's also broken for expanse and ubiq. Maybe some web function.... I will leave it for now.
That's fine, thanks for having a look! Will keep it in mind. Smiley

"And the machine keeps pushing time through the cogs, like paste into strings into paste again, and only the machine keeps using time to make time to make time.
And when the machine stops, time is an illusion that we created free will.
" - an unnamed Hybrid
martymcfly2015
Member
**
Offline Offline

Activity: 82
Merit: 10

Auxiliary Soil Developer


View Profile
May 08, 2017, 08:52:16 AM
Last edit: May 08, 2017, 12:43:10 PM by martymcfly2015
 #2376

...
Here is a fresh version of our Gui Wallet aka SOILsafe.
...
4) Have fun  Smiley
...
Nice work, again! Smiley

I've played with SOILsafe, it synced in < 1h and the balance shows up, great! I've tried so send some SOIL but had no luck. node.log shows:
Code:
INFO [05-07|23:56:35] Submitted transaction                    fullhash=0xd6e6703c372d7e7ef8aef9245a5f31264ce20b27b35a09d4359fb0d16ccee06f recipient=0x...
etc.
However, it seems the transaction was not transmitted to the network for some reason. Even with the maximum fee. I've not seen any additional details in the log-file.

Any idea what went wrong? Undecided

Thank you for your feedback! This is weird - I've modified the file internal/jsre/deps/web3.js but it has no effect. Any ideas?
...
[EDIT]
Seems it's also broken for expanse and ubiq. Maybe some web function.... I will leave it for now.
That's fine, thanks for having a look! Will keep it in mind. Smiley
Please make a backup of your Soil folder (C:\Users\username\AppData\Roaming\Soil) or at least of your keystore folder! Then delete the Soil folder (C:\Users\username\AppData\Roaming\Soil). Make a backup of the SOILsafe folder (C:\Users\username\AppData\Roaming\SOILsafe). Then delete the the SOILsafe folder. Start the new SOILsafe again. It should sync within minutes. Copy your backup of the keystore folder back to C:\Users\username\AppData\Roaming\Soil. You now shouldn't have anymore transaction problems.
abvhiael
Hero Member
*****
Offline Offline

Activity: 722
Merit: 501


View Profile
May 08, 2017, 01:42:31 PM
 #2377

well, again, with kudos to marty, our new release of the core SOILcoin protocols will bring us up in equivalency compared to Ethereum's codebase to quite nearly where they are presently. [our paralleled versioning goes from 1.3.4 (Homestead) to 1.6.0 (PuppethMaster)] this naturally will make the direction towards implementation of a Proof of Stake or hybrid POW/POS rewards system much more attainable.

these changes will be implemented in two stages, based on the new release, on block 2.463.000 and then on block 2.675.000
the SOILcoin network is, at the time of this writing, at block 2.162.000.

there are a lot of changes in protocol, security and functionality that will occur with these updates, and ill be writing them out over the next couple days, one or two issues to a post. (another reminder that i need to get that SOILcoin forum sorted out and functioning so that a working copy of our changes and a similar wiki to ETH regarding functions can be built.)

again, many thanks to marty for his amazing work on the blockchain. this is a develpment team that the community should be proud of, and should greatly enhance the ability of SOILcoin to withstand a number of attack vectors that have plagued Dagger algorithm currencies, and should get the attention of the cryptocurrency exchanges to value SOILcoin as an asset worth listing.

MUCH more to come throughout the next day or two regarding what these updates are and do. stay tuned!
Dunkelheit667
Legendary
*
Offline Offline

Activity: 1045
Merit: 1157


no degradation


View Profile
May 08, 2017, 05:19:26 PM
Last edit: May 15, 2017, 03:50:50 PM by Dunkelheit667
 #2378

...
Here is a fresh version of our Gui Wallet aka SOILsafe.
...
4) Have fun  Smiley
...
Nice work, again! Smiley

I've played with SOILsafe, it synced in < 1h and the balance shows up, great! I've tried so send some SOIL but had no luck. node.log shows:
Code:
INFO [05-07|23:56:35] Submitted transaction                    fullhash=0xd6e6703c372d7e7ef8aef9245a5f31264ce20b27b35a09d4359fb0d16ccee06f recipient=0x...
etc.
However, it seems the transaction was not transmitted to the network for some reason. Even with the maximum fee. I've not seen any additional details in the log-file.

Any idea what went wrong? Undecided
...
Please make a backup of your Soil folder (C:\Users\username\AppData\Roaming\Soil) or at least of your keystore folder! Then delete the Soil folder (C:\Users\username\AppData\Roaming\Soil). Make a backup of the SOILsafe folder (C:\Users\username\AppData\Roaming\SOILsafe). Then delete the the SOILsafe folder. Start the new SOILsafe again. It should sync within minutes. Copy your backup of the keystore folder back to C:\Users\username\AppData\Roaming\Soil. You now shouldn't have anymore transaction problems.
Thank you, this worked fine. I'm now able to send SOIL. Smiley

Just a note: It looks like my (failed) transactions initiated before were now sent with the first successfull transaction as well. I have no clue how this magic works as I deleted the whole Soil and SOILsafe folders as suggested.

I've managed to get additional (new) transactions 'stuck', just by playing with the transaction fee slider. However, simply deleting the C:\Users\username\AppData\Roaming\SOILsafe folder and initiating a new transaction with default fee seems to get them going. Cheesy

"And the machine keeps pushing time through the cogs, like paste into strings into paste again, and only the machine keeps using time to make time to make time.
And when the machine stops, time is an illusion that we created free will.
" - an unnamed Hybrid
abvhiael
Hero Member
*****
Offline Offline

Activity: 722
Merit: 501


View Profile
May 08, 2017, 05:56:41 PM
 #2379

simply working our way forward through the updates is likely the easiest way to describe the changes forthcoming on the SOILnet. ill deal with these changes one or two aspect per post, and try to make it as understandable as possible.

Go 1.4.1 (Knoxjonesi) introduces

*Event Subscriptions*, or RPC PUB SUB, wherein an active, connected node can subscribe to blockchain event notifications rather than manually requesting them directly. the node will create a subscription id and provide notifications via RPC as subscription events occur. these subscriptions can be cancelled thru calls or by closing the connection to the gsoil client. these subscriptions are coupled to your connection to the SOIL network, thus if the connection is terminated, all subscriptions are automatically closed

example: creating a subscription
Subscriptions are created via a regular RPC call with eth_subscribe as method and the subscription name as the parameter. If successful it returns the subscription id (your active wallet address).

Code:
>> {"id": 1, "method": "eth_subscribe", "params": ["newBlocks", {}]}
<< {"jsonrpc":"2.0","id":1,"result":"0xcd0c3e8af590364c09d0fa6a1210faf5"}

produces subscribed results to the determined address (0xcd0c3e8af590364c09d0fa6a1210faf5) when new blocks are set on the blockchain.

Code:
<< {"jsonrpc":"2.0","method":"eth_subscription","params":{"subscription":"0xcd0c3e8af590364c09d0fa6a1210faf5","result":{"difficulty":"0xd9263f42a87",<...>, "uncles":[]}}}
<< {"jsonrpc":"2.0","method":"eth_subscription","params":{"subscription":"0xcd0c3e8af590364c09d0fa6a1210faf5","result":{"difficulty":"0xd90b1a7ad02", <...>, "uncles":["0x80aacd1ea4c9da32efd8c2cc9ab38f8f70578fcd46a1a4ed73f82f3e0957f936"]}}}

and can be unsubscribed to by
Code:
>> {"id": 1, "method": "eth_unsubscribe", "params": ["0xcd0c3e8af590364c09d0fa6a1210faf5"]}
<< {"jsonrpc":"2.0","id":1,"result":true}

currently supported subscriptions are (ie: placed in stead on "newBlocks" in the above example):
newHeads - produces a notification with new block header information, including difficulty, gas limit, miner, nonce, timestamp, etc.
logs - returns logs that are included in new imported blocks and match the given filter criteria, ex: addresses (personal or contract) or arrays of addresses, or topics. only logs that are created from events matching these filters are returned
newPendingTransactions - returns the hash for all transactions that are added to the pending blockchain state
syncing - a boolean return to provide notices of block chain synchronization start/stops

future available subscriptions being worked upon beyond this implementation will also provide subscription notices for current events related to balance changes, account changes, nonce changes and storage changes in contracts.



*Native Go DApp Development*, introduces a new tool called abigen (located in cmd/abigen) which enables fully automated creation of Go Bindings to any contract built for deployment on the SOILnet. In order to ensure client implementation for applications in various programming languages that operate on the EVM, and allowing for a streamlined approach to mainstream adoption, RPC interfaces for JavaScript dApps have made it possible for most use cases where manual interaction with the blockchain is necessary. The server side RPC use cases, where other languages are used (i.e.: backend data-access layers written in NodeJs, Python, Ruby or Perl; database administration; security and authentication) these bindings have been elusive.

abigen allows for work on server side native dApps, ensuring that Go-language bindings to contracts on the SOILnet are safe at the time of compiling and deployment, and that they can be independently, automatically and completely generated from a contract ABI or EVM bytecode. Overall, abigen will make it exponentially easier to construct functioning contracts on the SOILnet that are interactive within the DUST brower for SOILsafe.

The available tutorial for ETH regarding abigen relates to using the "official Token contract" (token.sol) as the base for introducing the Go native bindings. This contract source code repo is available at: https://gist.github.com/karalabe/08f4b780e01c8452d989 and is the ETH foundations representation as the common form of creating a token for oneself. (which can be done directly from within the DUST wallet for SOILsafe).

Interacting with a contract on the SOILcoin blockchain directly from the Go client (gsoil) is already possible via the RPC interfaces exposed by the client. Writing the boilerplate code that translates Go language constructs into RPC calls and back requires a lot of code to perform minimal functions, and as an aspect of application development... is an excessive time consumer and even small changes in Solidity can require a great deal of work to disposition the code to Go. With the introduction of abigen, the SOILcoin implementation of go-ethereum (go-soil) has a source code generator that will convert SOILcoin ABI definitions into ready-made Go packages. Assuming a valid Go development environment is set up, with godep installed, and an up-to-date build of gsoil, you can build the Go binding Generator with:

Code:
$ cd $GOPATH/src/github.com/SOILcoin/go-soil
$ godep go install ./cmd/abigen

GENERATING BINDINGS: The one prerequisite needed to generate a Go binding to an SOILcoin contract is that contract's ABI definition JSON file. For the example Token contract this is obtained by either compiling the Solidity code yourself (via an online solidity compiler such as at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.11+commit.68ef5810.js or https://etherchain.org/solc), or by using a  pre-compiled token.abi available at https://gist.github.com/karalabe/b8dfdb6d301660f56c1b.

To generate a binding, call:

Code:
$ abigen --abi token.abi --pkg main --type Token --out token.go

The flags are:
--abi: (Mandatory) path to the contract ABI to bind to
--pgk: (Mandatory) Go package name to place the Go code into
--type: (Optional) Go type name to assign to the binding struct
--out: (Optional) output path for the generated Go source file (not set = stdout)

This will generate a type-safe Go binding for the Token contract. The generated code will look something like token.go as referrenced by the original tutorial for this update, (https://gist.github.com/karalabe/5839509295afa4f7e2215bc4116c7a8f), but as the generator itself is upgraded, the structure of the Go bindings may change, and it is recommended to generate the bindings fresh when preparing to deploy this contract (token.sol) on the SOILcoin network.

The Go binding generator also produces ready-built RPC backends which can be attached to an active SOILcoin node via IPC, HTTP or WebSockets, and through which the user can access the SOILcoin network and further connect to, interact, and perform transactions with contracts deployed on the SOILnet. The generator also creates specialized wrappers which can be pre-configured with authorization parameters, allowing all the Solidity defined methods to be called by simple session commands.

Deploying contracts onto the SOILnet using abigen requires the use of the contract bytecode alongside the contract ABI. This is retrieved via the previously mentioned online compilers, where the token.sol contract code can be compiled, generating the bytecode (similar to the presented example from the original tutorial, found at https://gist.github.com/karalabe/026548f6a5f5f97b54de) saved as token.bin

Code:
$ abigen --abi token.abi --pkg main --type Token --out token.go --bin token.bin

This will generate something similar to the above referenced token.go with the addition of a DeployToken function.

abigen also allows for Go binding directly from Solidity source code, which first compiles the source code (via --solc) into it's fundamental commands and functions and binds using that. This has the added function that all contracts contained within a given Solidity source file are built and bound, so if the file contains many contract sources, they will all be available from Go code.

Code:
$ abigen --sol token.sol --pkg main --out token.go

Much of the Go binding generation process can be automated during contract updating by leveraging the go:generate binding into a Go source file before the package definition, after which whenever the Solidity contract is modified, instead of needing run the above command, a call go generate on the package will correctly generate the new bindings.

Code:
//go:generate abigen --sol token.sol --pkg main --out token.go

The final update that abigen presents is a very useful one, which i think may open up a great deal of possibilities for on-chain token economies going forward.  A simulated blockchain can be built as a backend to native contracts the same way as a live RPC backend could be, and which can be "mined" thru calling Commit. the adjusted code presented in the original tutorial for abigen follows:

Code:
package main

import (
"fmt"
"log"
"math/big"

"github.com/SOILcoin/go-soil/accounts/abi/bind"
"github.com/SOILcoin/go-soil/accounts/abi/bind/backends"
"github.com/SOILcoin/go-soil/core"
"github.com/SOILcoin/go-soil/crypto"
)

func main() {
// Generate a new random account and a funded simulator
key, _ := crypto.GenerateKey()
auth := bind.NewKeyedTransactor(key)

sim := backends.NewSimulatedBackend(core.GenesisAccount{Address: auth.From, Balance: big.NewInt(10000000000)})

// Deploy a token contract on the simulated blockchain
_, _, token, err := DeployMyToken(auth, sim, new(big.Int), "Simulated blockchain tokens", 0, "SBT")
if err != nil {
log.Fatalf("Failed to deploy new token contract: %v", err)
}
// Print the current (non existent) and pending name of the contract
name, _ := token.Name(nil)
fmt.Println("Pre-mining name:", name)

name, _ = token.Name(&bind.CallOpts{Pending: true})
fmt.Println("Pre-mining pending name:", name)

// Commit all pending transactions in the simulator and print the names again
sim.Commit()

name, _ = token.Name(nil)
fmt.Println("Post-mining name:", name)

name, _ = token.Name(&bind.CallOpts{Pending: true})
fmt.Println("Post-mining pending name:", name)
}

The original tutorial regarding abigen has a number of examples for usage, and when time permits, I'll write a tutorial showing how to use abigen via a gsoil development set-up, connecting to a similar sort of token on SOIL that the tutorial points towards (the Ethereum testnet Unicorn which mints 1 UNICORN to an address for every 2.something ETH sent to the contract address) and will add that information to this post when we set it up on the SOILcoin forum (which in and of itself still needs to be set up, just havent had the hours available to commit to that project yet.)









 

abvhiael
Hero Member
*****
Offline Offline

Activity: 722
Merit: 501


View Profile
May 08, 2017, 09:49:10 PM
 #2380

further protocol and blockchain upgrades via updates from 1.4.1 (Knoxjonesi) thru 1.4.7 (Colourise) implementations on SOILcoin:

The  --genesis <json_file> flag used with private chains has been deprecated and replaced with the sub-command geth init <json file> to prevent the use of the --genesis flag with other flags, which was causing problems. A new field added to the genesis file: config allows the specification of configuration options for the use of private chains. *At present the only available option is "homesteadBlock":"0x block_number"*  

ADDED DEBUGGING OPTIONS:

traceTransaction( hash )
traceBlockByHash( hash )
traceBlockByNumber( number )
traceBlockByFile( file_with_rlp_encoded_block )
traceBlock( rlp_hex_encoded_string )

* accessed through either HTTP, IPC, or WebSocket RPC and the geth console.

minor fixes in 1.4.5 included some bug fixes related to WebSocket HTTP origins, and stopping transaction handling during the initial fast sync of a client to speed up the process. also introduced is a new RPC method: PrivateAccountAPI.SignAndSendTransaction which accepts a transaction and password as arguments. This allows external applications to submit transactions without the need to first unlock an account, which presented a potential attack vector during the small time window a wallet is unlocked, in order to submit a fraudulent transaction.

*EDGE*, or Enhanced Data Rates for GSM Evolution, introduces improved blockchain download concurrency to avoid bottlenecks caused by remote machines with poor connections, as well as an adaptive "quality-of-service tuning" allowing peer selection to be less aggressive for users with more restricted connectivity. The result is an improved blockchain syncing mechanism that can produce up to 8MB/s download speeds to retrieve the SOILcoin network blockchain (if your connectivity allows it), and provides a solid and stable stream for all users, verified for as low as EDGE connections (440ms latency, 200 kbps upstream, 220kbps downstream).

Blockchain syncing is further improved via concurrent downloading of block headers from several peers compared to the previous single-peer header-download which uses it's peers to download the block bodies, receipts, state, etc that the header chain defined. Now, using the concept of a "header skeleton" wherein a single "master-peer" is used to retrieve a skeleton of the header chain: where only every Nth header is retrieved, forming gaps of N-1 headers. Simultaneously, all the master's peers are used to fill in the missing N-1 headers, creating a batching solution and speedier blockchain sync.

((i timed the SOILcoin blockchain download for resyncing to the new client at a little over 12 minutes on the DUST client for SOILsafe. i can attest to nearly 24 hours of time downloading the blockchain with the previous version, and this change also scales the technology further towards being able to provide a Light SOIL Client, which again has its own advantages...))

The command exec.LookPath(solcPath) has been added to go-soil, which corrects issues in locating solc.exe for the development environment compiling of Solidity contracts. The JavaScript console was also cleaned up, and moved to its own package in the go-soil build, which will make it easier to make use of the console in dApps and other projects that embed gsoil into their own processes.

Pages: « 1 ... 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 [119] 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!