by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 16:41
    yaoandrew synchronize #21148
  • 13:43
    holiman commented #21407
  • 13:42
    holiman commented #21407
  • 13:41
    holiman commented #21407
  • 12:59
    karalabe review_requested #21482
  • 12:59
    karalabe synchronize #21482
  • 12:59
    karalabe review_requested #21482
  • 12:40
    holiman closed #21245
  • 12:40
    holiman commented #21245
  • 12:32
    holiman synchronize #20071
  • 12:30
    holiman closed #21282
  • 12:30
    holiman commented #21282
  • 12:28
    holiman synchronize #21407
  • 12:26
    holiman milestoned #21439
  • 12:26

    holiman on master

    core: fix a typo in comment (#2… (compare)

  • 12:26
    holiman closed #21439
  • 12:11
    Gbogdann93 opened #21581
  • 10:46
    MariusVanDerWijden closed #21474
  • 10:46
    MariusVanDerWijden commented #21474
  • 10:45
    MariusVanDerWijden review_requested #21580
Rocky Fikki
@rfikki
Odd behavior in the way geth is reading accounts between windows and linux. I have the exact same keystore folder in both windows and linux, but see different coinbase accounts. Is that even possible?
Péter Szilágyi
@karalabe

:nut_and_bolt: [xgo build bot] Published geth 1.4.0-unstable (27116bd) - develop branch

Package Size SHA1 Checksum
geth-1.4.0-unstable-27116bd-android-21.aar.tar.bz2 23M 4ddf2135555c8f18b85b6ba9dcbc3c3ff2519ee2
geth-1.4.0-unstable-27116bd-darwin-10.6-386.tar.bz2 5.3M 675f80f78f6ba7ec91c22eea06954a840ba94180
geth-1.4.0-unstable-27116bd-darwin-10.6-amd64.tar.bz2 5.6M 749fd054a418ba799a3dfebb0c6526fd600fbfa6
geth-1.4.0-unstable-27116bd-ios-7.0-framework.tar.bz2 21M f84a674a9948053ccbbce383b1d66e41fb596ffb
geth-1.4.0-unstable-27116bd-linux-386.tar.bz2 6.4M 9d863ad819bfe04ef2a05f068538e9ab25076cf7
geth-1.4.0-unstable-27116bd-linux-amd64.tar.bz2 6.7M 8512ebe118050bda6ae0a866650fe2b6cc05a042
geth-1.4.0-unstable-27116bd-linux-arm-5.tar.bz2 6.1M f55271e5ebdc37709363ac626a839c96ea609a89
geth-1.4.0-unstable-27116bd-linux-arm-6.tar.bz2 6.1M 140fe5854b3689c4f44b22f18bd8a9d7a9064a0c
geth-1.4.0-unstable-27116bd-linux-arm-7.tar.bz2 6.1M a8790ab393a679cf0805791e38a35c3a197fccd7
geth-1.4.0-unstable-27116bd-linux-arm64.tar.bz2 6.1M 22cc4fe7a82ba90a56ce958c38e434bbd4f586ec
geth-1.4.0-unstable-27116bd-windows-4.0-386.exe.zip 5.7M 7341016777edc28da894479ac4096dfa18ee885f
geth-1.4.0-unstable-27116bd-windows-4.0-amd64.exe.zip 6.1M d0cada049d159099ba94b66365365e510b1e78d2

Disclaimer: All of these binaries have been cross-compiled from Linux. Their primary goal is to provide access to unsupported or experimental platforms. We cannot guarantee that a cross compiler will produce the same performing code as a native build will. For any issues found, please contact @karalabe.

Jeffrey Wilcke
@obscuren
@rfikki yes. It considers the first address coinbase. The way Linux and Windows deems "first" probably depends on the fs. Much of this has changed in 1.4
Rocky Fikki
@rfikki
So both keystore directories are the same for me, but on my windows machine the coinbase is not listed as an account in geth at all. Now I do notice that my coinbase has its own subdirectory in keystore while the other accounts do not. Is this normal behaviour?
Rocky Fikki
@rfikki
Yes, something has definitely changed. Strange thing is I am using the 1.4 version on both machines but on my windows machine I do not see that account as part of the list of accounts in geth. Both machines have the same keystore.
elegantcube
@elegantcube
hey, just wanted to understand where on my machine (folder location probably) does the smart contract i deployed reside ?
Sammy Libre
@sammy007
I believe it's stored on a thousands of machines now :p
elegantcube
@elegantcube
i understand, i am running a private test net , i just deployed a contract, just wondering in which folder is my contract residing at all
Péter Szilágyi
@karalabe
it's part of the blockchain state trie
~/.ethereum/chaindata
it's not a flat file, rather an internal node in a gigantic merkle-patritia trie data structure
elegantcube
@elegantcube
in windows machine is it 'C:\Users\username\AppData\Roaming\Ethereum\chaindata' location by any chance ? i see lot of .ldb files
Péter Szilágyi
@karalabe
yup
elegantcube
@elegantcube
is there a way to read these files
how is this different from blocks (or transactions data)
who creates address of smart contract ?
Where do address of smart contract is stored ?
Péter Szilágyi
@karalabe
the only meaningful way is to use the Geth codebase as a library and write an arbitrary tool to fetch the data for yourself. It's not too hard, but you do need to know how to develop Go code and have at least some understanding of the Geth code. The database structure contents is organized in completely custom schemas and even changes from time to time.
The address of a contract is the Keccak256 hash of <creator address> || <transaction nonce>
it's part of the protocol, noone creates it, rather everyone agrees what it will be based on the transaction contents
a smart contract doesn't have an address... rather an address may have code associated with it
the code is stored inside the database with other stuff belonging to the account (e.g. balance, nonce, data storage)
Péter Szilágyi
@karalabe
if you're really interested in the gory details, the state database is a merkle-particia trie. Essentially a key-value datastore based on fancy hashes. To retrieve the code of a specific account you'd need to first retrieve the account associated with a particular address and then retrieve the code associated with that account.
Sammy Libre
@sammy007
Testnet block explorer is what eth is missing
Péter Szilágyi
@karalabe
Sammy Libre
@sammy007
oh
Péter Szilágyi
@karalabe
@elegantcube
package main

import (
    "fmt"

    "github.com/ethereum/go-ethereum/common"
    "github.com/ethereum/go-ethereum/core"
    "github.com/ethereum/go-ethereum/ethdb"
    "github.com/ethereum/go-ethereum/event"
)

func main() {
    db, err := ethdb.NewLDBDatabase("/home/karalabe/.ethereum/chaindata", 0, 0)
    if err != nil {
        panic(err)
    }
    bc, err := core.NewBlockChain(db, nil, core.FakePow{}, new(event.TypeMux))
    if err != nil {
        panic(err)
    }
    sdb, err := bc.State()
    if err != nil {
        panic(err)
    }
    code := sdb.GetCode(common.HexToAddress("0xf9214ca8e9ab8f906575bba4c1d8ba05a065cde1"))
    fmt.Printf("%x\n", code)
}
3660008037602060003660003473273930d21e01ee25e4c219b63259d214872220a261235a5a03f21560015760206000f3
Same as reported by
elegantcube
@elegantcube
@karalabe thanks man, thats great detail
elegantcube
@elegantcube
what does mapping(address => mapping(address => uint256)) allowed; mean
This message was deleted
@elegantcube is it that address1 is referring to address 2, which inturn is carrying a value-allowed?
Nick Johnson
@Arachnid
@elegantcube It's a mapping from pairs of addresses to uints
allowed[from][to] is a uint
anodirium
@anodirium
hey guys
anyone here?
Stephen
@stephenstroud
hi
anodirium
@anodirium
hey im a bit new to all this
any chance you can give me a bit of guidance? ))
Stephen
@stephenstroud
anyone had the issue where the miner isn't submitting data?
@anodirium hey I just setup myself
@anodirium can try to help too
anodirium
@anodirium
im trying to start etehrium wallet and application starts but just blank
any clues?
no interface like nothing
it says starting etherium node
and then nothing
Stephen
@stephenstroud
nah I haven't been using the wallet, just the command like