Go-ethereum: admin.setSolc missing (how to set solidity complier with geth)

Created on 28 May 2017  路  8Comments  路  Source: ethereum/go-ethereum

System information

Geth
Version: 1.6.2-unstable
Git Commit: cb809c03da18bf45f961a931dfd4c765de144e66
Architecture: amd64
Protocol Versions: [63 62]
Go Version: go1.7.3
Operating System: linux
GOPATH=
GOROOT=/usr/lib/go-1.7

Expected behaviour

way to set solidity complier in geth locally using admin.setSolc or geth flags

Actual behaviour

none exists

Build from the master ( last cocmmit cb809c03da18bf45f961a931dfd4c765de144e66) go-etherium master is missing how to set solidity complier using either admin.setSolc() or geth flags
It looks like commit 5e29f4be935ff227bbf07a0c6e80e8809f5e0202 has removed this feature
anyone know how to set solidity compiler with geth with the master build. Or what are the alternate approach or is it becoming default system behavior

Steps to reproduce the behaviour

Backtrace

[backtrace]

Most helpful comment

These steps come right out of the geth tutorial here: https://github.com/ethereum/go-ethereum/wiki/Contract-Tutorial#installing-a-compiler

All 8 comments

Is there a particular reason for wanting to build through geth instead of simply calling solc directly? Geth never had its own Solidity compiler, so you still had to install solc manually, the only difference is that now you need to also call it directly instead of through Geth.

The reasoning was that there are various compiler, not just solc, and the API was very limited by itself (couldn't compile multiple files for example), so its use was extremely limited, yet it was littering the API namespace, hence why it was removed. If there's enough request we might readd it, but we need to understand how people are using it and why, because the "standard" use case of "build this" doesn't warrant having it inside the Ethereum node.

These steps come right out of the geth tutorial here: https://github.com/ethereum/go-ethereum/wiki/Contract-Tutorial#installing-a-compiler

It's still missing :(, am I wrong?

> admin
{
  datadir: "rinkeby",
  nodeInfo: {
    enode: "enode://0692b368",
    id: "0692b3682",
    ip: "::",
    listenAddr: "[::]:30303",
    name: "Geth/v1.7.3-stable/darwin-amd64/go1.9.2",
    ports: {
      discovery: 30303,
      listener: 30303
    },
    protocols: {
      eth: {
        difficulty: 2813112,
        genesis: "0x6341fd3",
        head: "0xb7ef147a9fee",
        network: 4
      }
    }
  },
  peers: [{
      caps: ["eth/62", "eth/63", "les/1"],
      id: "343149e4feef",
      name: "Geth/v1.7.3-unstable-479aa61f/linux-amd64/go1.9",
      network: {
        localAddress: "703",
        remoteAddress: "303"
      },
      protocols: {
        eth: {...}
      }
  }, {
      caps: ["eth/63"],
      id: "51e78cced1c150d",
      name: "Geth/v1.7.2-stable-1db4ecdc/windows-amd64/go1.9",
      network: {
        localAddress: "192.168.12.153:64732",
        remoteAddress: "193.92.101.27:30303"
      },
      protocols: {
        eth: {...}
      }
  }, {
      caps: ["eth/62", "eth/63", "les/1", "les/2"],
      id: "a24ac7c5484ef4ed",
      name: "Geth/v1.7.3-unstable-0dbf55d4/linux-amd64/go1.9.2",
      network: {
        localAddress: "192.168.12.153:64697",
        remoteAddress: "52.169.42.101:30303"
      },
      protocols: {
        eth: {...}
      }
  }],
  addPeer: function(),
  exportChain: function(),
  getDatadir: function(callback),
  getNodeInfo: function(callback),
  getPeers: function(callback),
  importChain: function(),
  removePeer: function(),
  sleep: function github.com/ethereum/go-ethereum/console.(*bridge).Sleep-fm(),
  sleepBlocks: function github.com/ethereum/go-ethereum/console.(*bridge).SleepBlocks-fm(),
  startRPC: function(),
  startWS: function(),
  stopRPC: function(),
  stopWS: function()
}

@tuyen-vuduc no, you are not :(

Please use https://remix.ethereum.org or other Solidity development tools. Geth does not support compiling source code.

@karalabe If true, can we add a note this guide that this is out of date, and how to proceed with the guide? Do we need to write our code to a file outside of the console, build with solc, and then load the binary into the console? I would be happy to make the pr but have no idea how to load a binary into a var in the console.

Compiling Contract documentation doesn't give any information how developers can use Solidity development tools to compile the code...

The guide is still outdated... It is going to be a year now since this feature was removed. How is everyone else working this around? solcjs? Remix as online compiler?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JMaxU picture JMaxU  路  3Comments

cheershendtco picture cheershendtco  路  3Comments

keitaj picture keitaj  路  3Comments

prene picture prene  路  3Comments

tymat picture tymat  路  3Comments