An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
besu/docs/DocumentationForRelease0.8....

3267 lines
529 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Pantheon Documentation v0.8.2</title>
<style>/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:bef
/*# sourceMappingURL=bootstrap.min.css.map */</style>
<style>/*
Original highlight.js style (c) Ivan Sagalaev <maniac@softwaremaniacs.org>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #F0F0F0;
}
/* Base color: saturation 0; */
.hljs,
.hljs-subst {
color: #444;
}
.hljs-comment {
color: #888888;
}
.hljs-keyword,
.hljs-attribute,
.hljs-selector-tag,
.hljs-meta-keyword,
.hljs-doctag,
.hljs-name {
font-weight: bold;
}
/* User color: hue: 0 */
.hljs-type,
.hljs-string,
.hljs-number,
.hljs-selector-id,
.hljs-selector-class,
.hljs-quote,
.hljs-template-tag,
.hljs-deletion {
color: #880000;
}
.hljs-title,
.hljs-section {
color: #880000;
font-weight: bold;
}
.hljs-regexp,
.hljs-symbol,
.hljs-variable,
.hljs-template-variable,
.hljs-link,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #BC6060;
}
/* Language color: hue: 90; */
.hljs-literal {
color: #78A960;
}
.hljs-built_in,
.hljs-bullet,
.hljs-code,
.hljs-addition {
color: #397300;
}
/* Meta color: hue: 200 */
.hljs-meta {
color: #1f7199;
}
.hljs-meta-string {
color: #4d99bf;
}
/* Misc effects */
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
</style>
<style>/*
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #333;
background: #f8f8f8;
}
.hljs-comment,
.hljs-quote {
color: #998;
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
color: #333;
font-weight: bold;
}
.hljs-number,
.hljs-literal,
.hljs-variable,
.hljs-template-variable,
.hljs-tag .hljs-attr {
color: #008080;
}
.hljs-string,
.hljs-doctag {
color: #d14;
}
.hljs-title,
.hljs-section,
.hljs-selector-id {
color: #900;
font-weight: bold;
}
.hljs-subst {
font-weight: normal;
}
.hljs-type,
.hljs-class .hljs-title {
color: #458;
font-weight: bold;
}
.hljs-tag,
.hljs-name,
.hljs-attribute {
color: #000080;
font-weight: normal;
}
.hljs-regexp,
.hljs-link {
color: #009926;
}
.hljs-symbol,
.hljs-bullet {
color: #990073;
}
.hljs-built_in,
.hljs-builtin-name {
color: #0086b3;
}
.hljs-meta {
color: #999;
font-weight: bold;
}
.hljs-deletion {
background: #fdd;
}
.hljs-addition {
background: #dfd;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
</style>
<style> /*General for HTML and PDF*/
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
margin-top: 0 !important; }
body > *:last-child {
margin-bottom: 0 !important; }
a {
color: #4183C4; }
a.absent {
color: #cc0000; }
a.anchor {
display: block;
padding-left: 30px;
margin-left: -30px;
cursor: pointer;
position: absolute;
top: 0;
left: 0;
bottom: 0; }
h1, h2, h3, h4, h5, h6 {
margin: 20px 0 10px;
padding: 0;
font-weight: bold;
-webkit-font-smoothing: antialiased;
cursor: text;
position: relative; }
h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor {
background: url("../../images/modules/styleguide/para.png") no-repeat 10px center;
text-decoration: none; }
h1 tt, h1 code {
font-size: inherit; }
h2 tt, h2 code {
font-size: inherit; }
h3 tt, h3 code {
font-size: inherit; }
h4 tt, h4 code {
font-size: inherit; }
h5 tt, h5 code {
font-size: inherit; }
h6 tt, h6 code {
font-size: inherit; }
h1 {
font-size: 28px;
color: black; }
h2 {
font-size: 24px;
border-bottom: 1px solid #cccccc;
color: black; }
h3 {
font-size: 18px; }
h4 {
font-size: 16px; }
h5 {
font-size: 14px; }
h6 {
color: #777777;
font-size: 14px; }
pre.hljs {
border:none;
padding: 12px;
}
code {
background-color: #EDEDED;
}
p, blockquote, ul, ol, dl, li, table, pre.hljs {
margin: 15px 0; }
hr {
background: transparent url("../../images/modules/pulls/dirty-shade.png") repeat-x 0 0;
border: 0 none;
color: #cccccc;
height: 4px;
padding: 0; }
body > h2:first-child {
margin-top: 0;
padding-top: 0; }
body > h1:first-child {
margin-top: 0;
padding-top: 0; }
body > h1:first-child + h2 {
margin-top: 0;
padding-top: 0; }
body > h3:first-child, body > h4:first-child, body > h5:first-child, body > h6:first-child {
margin-top: 0;
padding-top: 0; }
a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
margin-top: 0;
padding-top: 0; }
h1 p, h2 p, h3 p, h4 p, h5 p, h6 p {
margin-top: 0; }
li p.first {
display: inline-block; }
ul, ol {
padding-left: 30px; }
ul :first-child, ol :first-child {
margin-top: 0; }
ul :last-child, ol :last-child {
margin-bottom: 0; }
dl {
padding: 0; }
dl dt {
font-size: 14px;
font-weight: bold;
font-style: italic;
padding: 0;
margin: 15px 0 5px; }
dl dt:first-child {
padding: 0; }
dl dt > :first-child {
margin-top: 0; }
dl dt > :last-child {
margin-bottom: 0; }
dl dd {
margin: 0 0 15px;
padding: 0 15px; }
dl dd > :first-child {
margin-top: 0; }
dl dd > :last-child {
margin-bottom: 0; }
blockquote {
border-left: 4px solid #dddddd;
padding: 0 15px;
font-size: 14px;
color: #777777; }
blockquote > :first-child {
margin-top: 0; }
blockquote > :last-child {
margin-bottom: 0; }
table {
padding: 0; }
table tr {
border-top: 1px solid #cccccc;
background-color: white;
margin: 0;
padding: 0; }
table tr:nth-child(2n) {
background-color: #f8f8f8; }
table tr th {
font-weight: bold;
border: 1px solid #cccccc;
text-align: left;
margin: 0;
padding: 6px 13px; }
table tr td {
border: 1px solid #cccccc;
text-align: left;
margin: 0;
padding: 6px 13px; }
table tr th :first-child, table tr td :first-child {
margin-top: 0; }
table tr th :last-child, table tr td :last-child {
margin-bottom: 0; }
img {
max-width: 100%; }
span.frame {
display: block;
overflow: hidden; }
span.frame > span {
border: 1px solid #dddddd;
display: block;
float: left;
overflow: hidden;
margin: 13px 0 0;
padding: 7px;
width: auto; }
span.frame span img {
display: block;
float: left; }
span.frame span span {
clear: both;
color: #333333;
display: block;
padding: 5px 0 0; }
span.align-center {
display: block;
overflow: hidden;
clear: both; }
span.align-center > span {
display: block;
overflow: hidden;
margin: 13px auto 0;
text-align: center; }
span.align-center span img {
margin: 0 auto;
text-align: center; }
span.align-right {
display: block;
overflow: hidden;
clear: both; }
span.align-right > span {
display: block;
overflow: hidden;
margin: 13px 0 0;
text-align: right; }
span.align-right span img {
margin: 0;
text-align: right; }
span.float-left {
display: block;
margin-right: 13px;
overflow: hidden;
float: left; }
span.float-left span {
margin: 13px 0 0; }
span.float-right {
display: block;
margin-left: 13px;
overflow: hidden;
float: right; }
span.float-right > span {
display: block;
overflow: hidden;
margin: 13px auto 0;
text-align: right; }
.nav-container ul, .nav-container ol {
margin-left: 0px;
padding-left: 0px;
}
.nav-container .toc:after {
content: "Table of contents";
}
.nav {
margin:0;
}
.nav-inner > .nav, .nav-inner > .nav > li > .nav {
border-bottom: 1px solid #e0e0e0;
margin-bottom: 2px;
margin-top: 2px;
}
.nav-inner > .nav > li:last-child > .nav {
border-bottom: none;
}
.nav > li {
margin: 0;
}
.nav > li > a {
display: block;
padding: 3px 18px;
font-size: 1em;
font-weight: 500;
}
.nav > li > .nav > li > a {
padding:2px 28px;
font-size: 0.92em;
font-weight: 400;
}
.nav > li > .nav > li > .nav > li > a {
padding:2px 36px;
font-size: 0.86em;
font-weight: 400;
}
.nav > li > .nav > li > .nav > li > .nav > li > a {
padding:2px 44px;
font-size: 0.86em;
font-weight: 400;
}
.nav li span {
margin: 0 0;
padding: 3px 18px;
font-size: inherit;
color:#888
}
/*For HTML*/
.html-doc {
padding-top: 60px !important;
}
.html-doc .footer {
font-size: 85%;
margin-top: 20px;
width: 250px;
}
.page:before {
content:"";
display:block;
height:55px; /* fixed header height*/
margin:-55px 0 0; /* negative fixed header height */
}
.page {
height:1px;
font-size:1px;
width: 1px;
padding:50px 0 0 0;
margin: -50px 0 0 0;
}
.html-doc .nav-container {
margin-top: 10px;
position: relative;
}
.html-doc .logo-img {
padding: 10px;
margin:7px 0 0 0;
max-width:75%;
max-height:25%;
}
.html-doc .nav-container .toc:after {
display: block;
color:#888;
text-transform: uppercase;
padding: 4px 18px;
font-weight: 500;
font-size:90%
}
.html-doc .nav-container > .nav-inner {
position: fixed;
}
.html-doc .nav li a:before, .html-doc .nav li span:before {
content: "\00B7 ";
}
.html-doc .nav li.active > a {
color:darkred;
}
.html-doc .nav li.active > a:before {
content: "\25b8 ";
}
.navbar-default .navbar-nav>li>a.generated-by,
.navbar-default .navbar-nav>li>a.generated-by:visited {
font-size: 85%;
color:#ADADAD;
text-shadow: 1px 1px 0 #fff;
}
.navbar-default .navbar-nav>li>a.generated-by:hover {
color:#666
}
@media (max-width: 992px) {
.html-doc .nav-container > .nav-inner {
position: relative;
}
}
@media (min-width: 768px) {
.navbar > .container .doc-title {
margin-left: 0;
}
.navbar-right {
margin-right: 0;
}
}
@media (min-width: 992px) {
.nav-inner {
min-width: 210px;
}
}
@media (min-width: 1200px) {
.nav-inner {
min-width: 250px;
}
}
/*For PDF*/
.pdf-doc{
padding: 0px;
}
.pdf-doc .navbar-toggle {
display: none;
}
.pdf-doc .coverimg {
max-width:50%;
}
.pdf-doc .covertitle {
padding-top: 40%;
text-align: right;
font-size: 40px;
}
.pdf-doc .nav-container {
page-break-before: always !important;
display: block;
}
.pdf-doc pre.hljs, .pdf-doc code {
font-size: 80%;
}
.pdf-doc .nav > li > a {
padding: 3px 6px;
}
.pdf-doc .nav > li > .pdf-doc .nav > li > a {
padding:2px 16px;
}
.pdf-doc .nav > li > .pdf-doc .nav > li > .pdf-doc .nav > li > a {
padding:2px 24px;
}
.pdf-doc .nav > li > .pdf-doc .nav > li > .pdf-doc .nav > li > .pdf-doc .nav > li > a {
padding:2px 32px;
}
.pdf-doc .nav li span {
padding: 3px 6px;
}
</style>
<style>.nav > li > .nav > li > .nav > li > .nav > li {display: none;}</style>
<script>/*! jQuery v2.2.4 | (c) jQuery Foundation | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){var b;if("object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype||{},"isPrototypeOf"))return!1;for(b in a);return void 0===b||k.call(a,b)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"
}catch(e){}O.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=N.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function W(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&T.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var X=/^(?:checkbox|radio)$/i,Y=/<([\w:-]+)/,Z=/^$|\/(?:java|ecma)script/i,$={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|&#?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push
void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):cb.test(a.nodeName)||db.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var eb=/[\t\r\n\f]/g;function fb(a){return a.getAttribute&&a.getAttribute("class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,fb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,fb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,fb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=fb(this),b&&N.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":N.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+fb(c)+" ").replace(eb," ").indexOf(b)>-1)return!0;return!1}});var gb=/\r/g,hb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(gb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(hb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(n.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var ib=/^(?:focusinfocus|focusoutblur)$/;n.extend(n.event,{trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!ib.test(q+n.event.triggered)&&(q.inde
</script>
<script>/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under the MIT license
*/
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.D
this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e<c&&"top";if("bottom"==this.affixed)return null!=c?!(e+this.unpin<=f.top)&&"bottom":!(e+g<=a-d)&&"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&e<=c?"top":null!=d&&i+j>=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(
</head>
<body id="page-top" class="html-doc">
<!-- Fixed navbar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand doc-title" href="#page-top">Pantheon Documentation v0.8.2</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
</div><!--/.nav-collapse -->
</div>
</div>
<div id="documentation-container" class="container">
<div class="row">
<div class="col-md-3">
<div class="nav-container">
<div class="nav-inner" id="scroll-spy" style="width: min-content; overflow: auto; top: 60px; bottom: 0; padding 10px 0 10px 0;">
<span class="toc"></span>
<ul class="nav"><li class="active"><a href="#Overview">Overview</a></li><li><a href="#Getting-Started">Getting Started</a><ul class="nav"><li><a href="#Installation">Installation</a></li><li><a href="#Quickstart">Basic Quickstart</a></li><li><a href="#Private-Network-Quickstart">Private Network Quickstart</a></li><li><a href="#Starting-Pantheon">Starting Pantheon</a></li><li><a href="#Run-Docker-Image">Running Pantheon from Docker Image</a></li></ul></li><li><span>Configuring Pantheon</span><ul class="nav"><li><a href="#NetworkID-And-ChainID">Network ID and Chain ID</a></li><li><a href="#Node-Keys">Node Keys</a></li><li><a href="#Networking">Networking</a></li><li><a href="#Accounts-for-Testing">Accounts for Testing</a></li><li><a href="#Logging">Logging</a></li><li><a href="#Testing-Developing-Nodes">Testing and Developing Nodes</a></li><li><a href="#Proof-of-Authority">Proof of Authority</a></li><li><a href="#Passing-JVM-Options">Passing JVM Options</a></li></ul></li><li><span>Using Pantheon</span><ul class="nav"><li><a href="#Transactions">Creating and Sending Transactions</a></li><li><a href="#Account-Management">Using Wallets for Account Management</a></li><li><a href="#Mining">Mining</a></li><li><a href="#RPC-PubSub">RPC Pub/Sub</a></li><li><a href="#Debugging">Debugging Pantheon</a></li></ul></li><li><span>Reference</span><ul class="nav"><li><a href="#Pantheon-CLI-Syntax">Pantheon CLI Reference</a></li><li><a href="#JSON-RPC-API">JSON-RPC API Reference</a></li></ul></li></ul>
</div>
</div>
</div>
<div class="col-md-9">
<p class="page" id="Overview"></p><h1>Overview</h1>
<h1 id="pantheon-overview">Pantheon Overview</h1>
<h2 id="contents">Contents</h2>
<ul>
<li><a href="#what-is-pantheon">What is Pantheon?</a></li>
<li><a href="#what-can-you-do-with-pantheon">What can you do with Pantheon?</a></li>
<li><a href="#what-doesnt-pantheon-support">What doesn&#39;t Pantheon support?</a></li>
</ul>
<h3 id="what-is-pantheon-">What is Pantheon?</h3>
<p>Pantheon is an open-source Ethereum client developed under the Apache 2.0 license and written in Java. It runs on the Ethereum public network, private networks, and test networks such as Rinkeby and Ropsten. Pantheon implements Proof of Work (Ethash) and Proof of Authority (Clique) consensus mechanisms. </p>
<p>You can use Pantheon to develop enterprise applications requiring secure, high-performance transaction processing in a private network. </p>
<p>Our roadmap includes Pantheon with privacy features, alternative consensus mechanisms, and other enterprise features.</p>
<h3 id="what-can-you-do-with-pantheon-">What can you do with Pantheon?</h3>
<p>Pantheon includes a <a href="https://github.com/PegaSysEng/pantheon/wiki/Pantheon-CLI-Syntax">command line interface</a> and <a href="https://github.com/PegaSysEng/pantheon/wiki/JSON-RPC-API">JSON-RPC API</a> for running, maintaining, debugging, and monitoring node operations in an Ethereum network. You can use the API via RPC over HTTP or via WebSockets transport, and Pub/Sub is supported. The API supports typical Ethereum functionalities such as:</p>
<ul>
<li>Ether token mining</li>
<li>Smart contract development</li>
<li>Decentralized application (Dapp) development</li>
</ul>
<p>The Pantheon client supports common smart contract and Dapp development, deployment, and operational use cases, using tools such as <a href="http://truffleframework.com/">Truffle</a>, <a href="https://github.com/ethereum/remix">Remix</a>, and <a href="https://web3j.io/">web3j</a>. The client supports common JSON-RPC API methods such as eth, net, web3, debug, and miner.</p>
<p>Pantheon doesn&#39;t support <a href="https://github.com/PegaSysEng/pantheon/wiki/Account-Management">Account management</a>.</p>
<p class="page" id="Getting-Started"></p><h1>Getting Started</h1>
<h1 id="getting-started">Getting Started</h1>
<p>You can get started with Pantheon by:</p>
<ul>
<li>Cloning the Pantheon repository and <a href="#Installation">building from source</a>. </li>
<li>Cloning the Pantheon repository and using the <a href="#Private-Network-Quickstart">Private Network Quickstart</a>. </li>
<li>Downloading the Pantheon <a href="https://bintray.com/consensys/pegasys-repo/pantheon/0.8.1#files">packaged binaries</a>. </li>
<li>Running from the <a href="#Run-Docker-Image">Pantheon docker image</a>. </li>
</ul>
<p>To run a single node to connect the Ethereum mainnet or a public testnet, running from the Pantheon <a href="#Run-Docker-Image">docker image</a> or <a href="https://bintray.com/consensys/pegasys-repo/pantheon/0.8.1#files">downloading the packaged binaries</a> is the fastest way to get started. </p>
<p>To run a private network on which you can make JSON-RPC requests and send transactions, or explore Pantheon and Ethereum networks, the <a href="#Private-Network-Quickstart">Private Network Quickstart</a> runs a private network of Pantheon nodes in a Docker container. </p>
<p class="page" id="Installation"></p><h1>Installation</h1>
<h1 id="pantheon-installation">Pantheon Installation</h1>
<blockquote>
<p><strong>Note</strong> If you have installed Pantheon from the <a href="https://bintray.com/consensys/pegasys-repo/pantheon/0.8.1#files">packaged binaries</a> or are running the <a href="https://hub.docker.com/r/pegasyseng/pantheon/">Docker image</a>, you do not need to follow the procedures in this section. You can proceed with the <a href="#Quickstart">Basic Quickstart</a> or <a href="#Starting-Pantheon">Starting Pantheon</a>.</p>
</blockquote>
<h2 id="contents">Contents</h2>
<ul>
<li><a href="#prerequisites">Prerequisites</a></li>
</ul>
<h3 id="running-locally">Running Locally</h3>
<ul>
<li><a href="#installation-on-linux--unix--mac-os-x">Installation on Linux / Unix / Mac OS X</a></li>
<li><a href="#installation-on-windows">Installation on Windows</a></li>
</ul>
<h3 id="running-virtually">Running Virtually</h3>
<ul>
<li><a href="#installation-on-vm">Installation on VM</a></li>
</ul>
<h2 id="prerequisites">Prerequisites</h2>
<ul>
<li><p>Disk space and RAM: Your computer should have at least 4 GB RAM. Disk space needed varies depending on the network on which you run nodes. A small test network might require 200 MB while a mainnet node might require 1.5TB. If syncing a node on mainnet, allow 1.5 TB to 2 TB for the full blockchain archive.</p>
</li>
<li><p><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">Java JDK</a></p>
<blockquote>
<p><strong>IMPORTANT:</strong> Pantheon requires Java 8+ to compile; earlier versions are not supported.</p>
</blockquote>
</li>
<li><p><a href="https://git-scm.com/downloads">Git</a> or <a href="https://desktop.github.com/">GitHub Desktop</a></p>
</li>
</ul>
<h2 id="installation-on-linux-unix-mac-os-x">Installation on Linux / Unix / Mac OS X</h2>
<h4 id="clone-the-pantheon-repository">Clone the Pantheon Repository</h4>
<p>Clone the <strong>PegaSysEng/pantheon</strong> repo to your home directory (<code>/home/&lt;user&gt;</code>):</p>
<pre class="hljs">git <span class="hljs-keyword">clone</span> <span class="hljs-title">--recursive</span> https://github.com/PegaSysEng/pantheon.git</pre><h4 id="build-pantheon">Build Pantheon</h4>
<p>After the cloning process completes, go to the <code>pantheon</code> repo directory and run <code>git branch</code> to make sure you&#39;re in the branch in which you cloned the Pantheon source code (by default this is the <code>master</code> branch).</p>
<p>Build the pantheon executable using <code>gradlew</code>. You can use the <code>-x test</code> option to exclude tests, which can take a long time to run and are not necessary for initial build:</p>
<pre class="hljs">./gradlew <span class="hljs-keyword">build </span>-x test</pre><p>Continue with <a href="#Quickstart">Basic Quickstart</a>, <a href="#Private-Network-Quickstart">Private Network Quickstart</a>, or <a href="#Starting-Pantheon">Starting Pantheon</a>.</p>
<h2 id="installation-on-windows">Installation on Windows</h2>
<blockquote>
<p><strong>Note</strong> Pantheon is currently supported only on 64-bit versions of Windows, and requires a 64-bit version of JDK/JRE. We recommend that you also remove any 32-bit JDK/JRE installations.</p>
</blockquote>
<h4 id="install-pantheon">Install Pantheon</h4>
<p>In Git bash, go to your working directory for repositories. Clone the <code>PegaSysEng/pantheon</code> repo into this directory:</p>
<pre class="hljs">git <span class="hljs-keyword">clone</span> <span class="hljs-title">--recursive</span> https://github.com/PegaSysEng/pantheon</pre><p>This creates a <code>pantheon</code> directory under Git revision control that will contain the cloned repo contents.</p>
<h4 id="build-pantheon">Build Pantheon</h4>
<p>Go to the <code>pantheon</code> directory:</p>
<pre class="hljs"><span class="hljs-built_in">cd</span> pantheon</pre><p>Open a Windows command prompt (the following won&#39;t work in Git bash). Build Pantheon with the Gradle wrapper <code>gradlew</code>, omitting tests as follows:</p>
<pre class="hljs"><span class="hljs-symbol">gradlew</span> <span class="hljs-keyword">build </span>-x test</pre><blockquote>
<p><strong>Note</strong> To run <code>gradlew</code>, you must have the <strong>JAVA_HOME</strong> system variable set to the Java installation directory.
For example: <code>JAVA_HOME = C:\Program Files\Java\jdk1.8.0_181</code>.</p>
</blockquote>
<p>After the build completes, your system is ready to run Pantheon. See <a href="#Starting-Pantheon">Starting Pantheon</a> and other sections of <a href="#Getting-Started">Getting Started</a> for guidance on using Pantheon.</p>
<h2 id="installation-on-vm">Installation on VM</h2>
<p>You can run Pantheon on a virtual machine (VM) on a cloud service such as AWS or Azure, or locally using a VM manager such as <a href="https://www.virtualbox.org/">VirtualBox</a>.</p>
<p>If you set up your own VM locally using a VM manager such as <a href="https://www.virtualbox.org/">VirtualBox</a>, there are a few considerations:</p>
<ul>
<li><p>Make sure that Intel Virtualization Technology (VTx) and Virtualization Technology for Directed I/O (VT-d) are enabled in BIOS settings.</p>
</li>
<li><p>On Windows, you might need to disable Hyper-V in the Windows Feature list.</p>
</li>
</ul>
<p>It is recommended that you create a VM with the following attributes:</p>
<ul>
<li><p>Memory Size: Set to 4096 (recommended)</p>
</li>
<li><p>Create a virtual hard disk with at least 10 GB; 20 GB is recommended</p>
</li>
<li><p>Virtual hard disk file type: VDI (if you need to share it with other apps, use VHD)</p>
</li>
<li><p>(Optional) You can create a shared directory in order to copy block files or genesis files from the host computer to the VM. For details on how to create a shared directory, see &quot;Share Folders&quot; in <a href="https://linus.nci.nih.gov/bdge/installUbuntu.html">Install Ubuntu on Oracle VirtualBox</a>.</p>
</li>
</ul>
<p class="page" id="Quickstart"></p><h1>Basic Quickstart</h1>
<h1 id="pantheon-quickstart">Pantheon Quickstart</h1>
<p>This tutorial shows you how to install Pantheon and invoke the Pantheon CLI to run a single node in default mode:</p>
<ul>
<li>The node runs on the Ethereum mainnet and uses the default embedded mainnet genesis file.</li>
<li>The node does not perform mining.</li>
<li>P2P peer discovery is enabled on the default P2P port. There are a maximum of 25 P2P peer connections.</li>
<li>Listen on the default RPC over HTTP host/port.</li>
<li>Use full synchronization mode.</li>
</ul>
<p>During the tutorial, you&#39;ll import a test block file to provide the initial blocks for the node to use, then run the node. You&#39;ll then use <code>curl</code> to make a call using Pantheon JSON-RPC API; this will make a request to verify that the node is running.</p>
<h2 id="installation">Installation</h2>
<p>Install Java, Git, and Pantheon for your platform as described in <a href="#Installation">Installation</a>, then proceed through the following steps.</p>
<h2 id="run-pantheon">Run Pantheon</h2>
<p>In this tutorial, you&#39;ll build and run Pantheon in one terminal (bash) window and run <code>curl</code> commands to make JSON-RPC requests in another terminal window. To do this, either open two separate instances of <code>Terminal</code>, or run a utility such as <a href="https://github.com/tmux/tmux/wiki">tmux</a> to run a split screen terminal.</p>
<p>In the first terminal, go to the <code>~/pantheon</code> folder:</p>
<pre class="hljs"><span class="hljs-built_in">cd</span> pantheon</pre><p>Build Pantheon as described in <a href="#Installation">Installation</a>.</p>
<p>To run <code>pantheon</code>, go to the distribution folder:</p>
<pre class="hljs"><span class="hljs-built_in">cd</span> build/distributions/</pre><p>Expand the distribution archive:</p>
<pre class="hljs">tar -xzf pantheon-&lt;version&gt;.tar.gz</pre><p>Move to the expanded folder and run <code>pantheon</code> using the script to display command help:</p>
<pre class="hljs"><span class="hljs-built_in">cd</span> pantheon-&lt;version&gt;/
bin/pantheon --<span class="hljs-built_in">help</span></pre><p>Import initial blocks for the node to work with from a blocks file. You can use the provided sample blocks file as shown in the following command:</p>
<pre class="hljs">bin/pantheon import ~/pantheon/testutil/src/main/resources/1000.blocks</pre><p>When the import completes successfully, you should see messages containing the following:</p>
<pre class="hljs">ImportSubCommand | Runs import sub <span class="hljs-built_in">command</span> with blocksImportPath
KeyPairUtil | Generated new key &lt;key&gt; and stored it to ~/pantheon/build/distributions/pantheon-&lt;version&gt;/key</pre><p>For more information on using the <code>pantheon import</code> subcommand, see <a href="#Pantheon-CLI-Syntax">Pantheon CLI Syntax</a>.</p>
<p>After the import successfully completes, run Pantheon with only the <code>--rpc-enabled</code> option:</p>
<pre class="hljs">bin/pantheon <span class="hljs-comment">--rpc-enabled</span></pre><p>This runs Pantheon in default mode, meaning it runs in mainnet with the default genesis file, and peer discovery is enabled.</p>
<p>The <code>--rpc-enabled</code> option starts the JSON-RPC service. </p>
<p>The terminal output will indicate that the node is synchronizing.</p>
<h2 id="test-the-pantheon-node">Test the Pantheon Node</h2>
<h4 id="make-json-rpc-requests-using-curl">Make JSON-RPC Requests using curl</h4>
<p>While the node is running, make a request on it using curl and the JSON-RPC API.</p>
<p>Switch to the bottom window using <code>Ctrl+b o</code> and run the following <code>curl</code> command:</p>
<pre class="hljs">curl -X POST --data '{<span class="hljs-string">"jsonrpc"</span>:<span class="hljs-string">"2.0"</span>,<span class="hljs-string">"method"</span>:<span class="hljs-string">"eth_syncing"</span>,<span class="hljs-string">"params"</span>:<span class="hljs-string">[]</span>,<span class="hljs-string">"id"</span>:<span class="hljs-number">1</span>}' <span class="hljs-number">127.0.0.1:8545</span></pre><p>Note the endpoint IP and default port. You should see a result similar to the following:</p>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">1</span>,
<span class="hljs-attr">"result"</span> : {
<span class="hljs-attr">"startingBlock"</span> : <span class="hljs-string">"0x3e7"</span>,
<span class="hljs-attr">"currentBlock"</span> : <span class="hljs-string">"0x3e7"</span>,
<span class="hljs-attr">"highestBlock"</span> : <span class="hljs-string">"0x0"</span>
}
}</pre><p>You can now call other JSON-RPC commands listed in <a href="https://github.com/PegaSysEng/pantheon/wiki/JSON-RPC-API">Pantheon JSON RPC API</a>.</p>
<h2 id="close-the-terminal-session">Close the Terminal Session</h2>
<p>After you&#39;re finished running the demo, you can stop the Pantheon client by returning to the terminal window that runs the node and entering <code>Ctrl+c</code>.</p>
<p class="page" id="Private-Network-Quickstart"></p><h1>Private Network Quickstart</h1>
<h1 id="private-network-quickstart-tutorial">Private Network Quickstart Tutorial</h1>
<p>This tutorial describes how to use Pantheon to run a private network of Pantheon nodes in a Docker container.</p>
<blockquote>
<p><strong>Note</strong> To run the Private Network Quickstart, you must install Pantheon by <a href="https://github.com/PegaSysEng/pantheon/wiki/Installation">cloning and building</a>. </p>
<p>If you have installed Pantheon from the <a href="https://pegasys.tech/">packaged binaries</a> or are running the <a href="https://hub.docker.com/u/pegasyseng/">Docker image</a>, you can proceed with the <a href="#Quickstart">Basic Quickstart</a> or <a href="#Starting-Pantheon">Starting Pantheon</a>.</p>
</blockquote>
<h2 id="prerequisites">Prerequisites</h2>
<p>To run this tutorial, you must have the following installed:</p>
<ul>
<li><p><a href="https://docs.docker.com/compose/install/">Docker and Docker-compose</a> </p>
</li>
<li><p><a href="https://git-scm.com/">Git command line</a></p>
</li>
<li><p><a href="https://curl.haxx.se/download.html">Curl command line</a> </p>
</li>
<li><p>A web browser that supports <a href="https://metamask.io/">Metamask</a> (currently Chrome, Firefox, Opera, and Brave), and has the MetaMask plug-in installed. This tutorial uses screenshots from Brave.</p>
</li>
</ul>
<h2 id="clone-pantheon-source-code">Clone Pantheon Source Code</h2>
<p>As indicated in <a href="#Installationclone-the-pantheon-repository">the installation section</a>, clone the repository.</p>
<h2 id="build-docker-images-and-start-services-and-network">Build Docker Images and Start Services and Network</h2>
<p>This tutorial uses <a href="https://docs.docker.com/compose/">Docker Compose</a> to simplify assembling images and
running in a private network. To run the containers, go to the <code>pantheon</code> directory and run the following commands:</p>
<blockquote>
<p>On Linux/Mac, run the following shell command provided with the code:</p>
</blockquote>
<pre class="hljs">quickstart/runPantheonPrivateNetwork.sh</pre><blockquote>
<p>On Windows, run the following docker-compose commands:</p>
</blockquote>
<pre class="hljs">// Run the Docker containers
quickstart\docker-compose up -d --scale node=4
// List the endpoints
quickstart\docker-compose port explorer 80</pre><p>This script builds Pantheon, builds the images and runs the containers. It will also scale the regular node container to four containers to simulate a network with enough peers to synchronize.</p>
<p>When the process ends, it lists the running services:</p>
<pre class="hljs"> Name Command State Ports
-----------------------------------------------------------------------------------------------------------------------------
quickstart_bootnode_1 /opt/pantheon/bootnode_sta ... Up <span class="hljs-number">30303</span>/tcp, <span class="hljs-number">8545</span>/tcp, <span class="hljs-number">8546</span>/tcp
quickstart_explorer_1 nginx -g daemon off; Up <span class="hljs-number">0.0</span><span class="hljs-number">.0</span><span class="hljs-number">.0</span>:<span class="hljs-number">32770</span>-&gt;<span class="hljs-number">80</span>/tcp
quickstart_minernode_1 /opt/pantheon/node_start.s ... Up <span class="hljs-number">30303</span>/tcp, <span class="hljs-number">8545</span>/tcp, <span class="hljs-number">8546</span>/tcp
quickstart_node_1 /opt/pantheon/node_start.s ... Up <span class="hljs-number">30303</span>/tcp, <span class="hljs-number">8545</span>/tcp, <span class="hljs-number">8546</span>/tcp
quickstart_node_2 /opt/pantheon/node_start.s ... Up <span class="hljs-number">30303</span>/tcp, <span class="hljs-number">8545</span>/tcp, <span class="hljs-number">8546</span>/tcp
quickstart_node_3 /opt/pantheon/node_start.s ... Up <span class="hljs-number">30303</span>/tcp, <span class="hljs-number">8545</span>/tcp, <span class="hljs-number">8546</span>/tcp
quickstart_node_4 /opt/pantheon/node_start.s ... Up <span class="hljs-number">30303</span>/tcp, <span class="hljs-number">8545</span>/tcp, <span class="hljs-number">8546</span>/tcp
quickstart_rpcnode_1 /opt/pantheon/node_start.s ... Up <span class="hljs-number">30303</span>/tcp, <span class="hljs-number">0.0</span><span class="hljs-number">.0</span><span class="hljs-number">.0</span>:<span class="hljs-number">32769</span>-&gt;<span class="hljs-number">8545</span>/tcp, <span class="hljs-number">0.0</span><span class="hljs-number">.0</span><span class="hljs-number">.0</span>:<span class="hljs-number">32768</span>-&gt;<span class="hljs-number">8546</span>/tcp</pre><p>This is followed by a list of the endpoints:</p>
<pre class="hljs"><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-emphasis">***</span>*
JSON-RPC HTTP service endpoint : http://localhost:32770/jsonrpc *
JSON-RPC WebSocket service endpoint : ws://localhost:32770/jsonws *
Web block explorer address : http://localhost:32770 *
<span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-strong">*****</span><span class="hljs-emphasis">***</span>*</pre><ul>
<li>Use the <strong>JSON-RPC HTTP service endpoint</strong> to access the RPC node service from your Dapp or from cryptocurrency wallets such as Metamask.</li>
<li>Use the <strong>JSON-RPC WebSocket service endpoint</strong> to access the web socket node service from your Dapp. Use the form <code>ws://localhost:32770/jsonws</code>.</li>
<li>Use the <strong>Web block explorer address</strong> to display the block explorer web application. View the block explorer by entering the URL in your web browser.</li>
</ul>
<blockquote>
<p>On Linux/Mac, to display the list of endpoints again, run the following shell command:</p>
</blockquote>
<pre class="hljs">quickstart/listQuickstartServices.sh</pre><blockquote>
<p>On Windows, to display the list of endpoints again, run the following docker-compose command:</p>
</blockquote>
<pre class="hljs">quickstart\docker-compose port explorer 80</pre><h2 id="block-explorer">Block Explorer</h2>
<p>This tutorial uses the <a href="https://aleth.io/">Alethio light block explorer</a>.</p>
<h3 id="run-the-block-explorer">Run the Block Explorer</h3>
<p>Access the explorer by copying and pasting the <code>Web block explorer address</code> displayed when starting the private network to your browser.</p>
<p>The block explorer displays a summary of the private network:</p>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA10AAACnCAYAAADqmja9AAABfGlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGAqSSwoyGFhYGDIzSspCnJ3UoiIjFJgv8PAzcDDIMRgxSCemFxc4BgQ4MOAE3y7xsAIoi/rgsxK8/x506a1fP4WNq+ZclYlOrj1gQF3SmpxMgMDIweQnZxSnJwLZOcA2TrJBUUlQPYMIFu3vKQAxD4BZIsUAR0IZN8BsdMh7A8gdhKYzcQCVhMS5AxkSwDZAkkQtgaInQ5hW4DYyRmJKUC2B8guiBvAgNPDRcHcwFLXkYC7SQa5OaUwO0ChxZOaFxoMcgcQyzB4MLgwKDCYMxgwWDLoMjiWpFaUgBQ65xdUFmWmZ5QoOAJDNlXBOT+3oLQktUhHwTMvWU9HwcjA0ACkDhRnEKM/B4FNZxQ7jxDLX8jAYKnMwMDcgxBLmsbAsH0PA4PEKYSYyjwGBn5rBoZt5woSixLhDmf8xkKIX5xmbARh8zgxMLDe+///sxoDA/skBoa/E////73o//+/i4H2A+PsQA4AJHdp4IxrEg8AAAGdaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA1LjQuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjg2MTwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4xNjc8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KRb1+IQAAQABJREFUeAHtnQt8FcWh/38YSHhjlJAKRIGgRFNjTVEI1RIfyBUUyqWAXKO2oF4uVqXQW29K/Rj/1abWK6W2UlrBWsCioEVRtIjFUL0ELQ238QajPDWADSCBEB4nEvn/Zh/n7Hklh+QkBPgN5Ozs7Lz2u7Oz85uZnW1z+IjvOGREQAREQAREQAREQAREQAREQASahcBZzRKrIhUBERABERABERABERABERABEbAISHSpIIiACIiACIiACIiACIiACIhAMxKQ6GpGuIpaBERABERABERABERABERABCS6VAZEQAREQAREQAREQAREQAREoBkJSHQ1I1xFLQIiIAIiIAIiIAIiIAIiIAISXSoDIiACIiACIiACIiACIiACItCMBCS6mhGuohYBERABERABERABERABERABiS6VAREQAREQAREQAREQAREQARFoRgISXc0IV1GLgAiIgAiIgAiIgAiIgAiIgESXyoAIiIAIiIAIiIAIiIAIiIAINCMBia5mhKuoRUAEREAEREAEREAEREAERECiS2VABERABERABERABERABERABJqRgERXM8JV1CIgAiIgAiIgAiIgAiIgAiIg0aUyIAIiIAIiIAIiIAIiIAIiIALNSECiqxnhKmoREAEREAEREAEREAEREAERaCsEIiACIiACIiACIiACItBaCQz+UWKLZ23dT2tbPE0leHoTkOhq4Pp2aN/yN3oDWTrjDx85qoowUiFoybKqaxDpCshNBETgVCJw/PhxZOV8u8Wy/MG6l1osrdMtoTZtgOJHW+bZz2KBnJlq+51uZag1nI9EV2u4CsqDCIiACLQAATUmbMgt2YBrgcuqJERABERABE4BAnqn6xS4SMqiCIiACIiACIiACIiACIjAqUtAouvUvXbKuQiIgAiIgAiIgAiIgAiIwClAQKLrFLhIyqIIiIAIiIAIiIAIiIAIiMCpS0Ci69S9dsq5CIiACIiACIiACIiACIjAKUBAC2mcAhepyVmsq8TKl1dhT207XP4vE5CZ3OQYFcGpTMBXheLVK7By/Rb4eB4pqenIuXYYcvqnnspnpbyLgAiIQPMRyBiGp340Bjl9nQfosUOoKC3Fz+5/EsXNl6pibgyBAwlYufosrN3JJQ9pErsex/DBX2LgRXWNiU1hRCBuBCS64oby5Ee0Y3MpKqqAtIws9O7iyY+vEnN+8gLK6DQ9cyRFV2fPQVnPJAK+T1dh/KgnrbIQOO/1mDPnBWRPexRLvpMVcJZNBEggoxfQtRNQ/TFQ7hDJuIhutL9Pt4bMiOuBWy4HejGAWYT5YDXDbQAK3goPeSX9fs/4ZXrGVB8AXl8BPB0hnbvGAyP6Mx8m0mPAzs+A5+fTvxVSPyIQRwIT81H2wBAkBUXZGZlDh2Hhe1mYc8edmOXeHEF+tNPSBA5+0A7DFttiy5/2rjZ4tTwBl17aBk9NPGbVQ/5jsohACxLQ9MIWhN28SdVg5T0zcdtdM7F8W01wUgkczXBckmiXOVMJ1GLlEwHBlT1xAmY9MgbZDo6S2TOxdFvLfAflTL0Cp9x5U3A9PYN/U4DCf3NyzwKzgPvG7fkx9Z/RDBNuBHDZeUB3Cikj3nrRPoZur08NDnvXZMbp+qVA686/fmkUYSatfwn2O+tHdB/M491tf93PYRqZTOu/gRnMs4wIxI/AMLwyLSC4fFUVKP5bOXYcdlJISsXkn+fHLznF1HgCh9riIY/guvny4yi89jiGOMMLH3xwFp77uxpBjQeskE0lINHVVIKtJnxndHUaG107Rv+oX1JS9GOt5lSUkeYh4NuK5WvsqHMfeBxLHsjDqJsmYck7D4HtVctUVHKoVEYEXAKccerv3edokjFmdMl12/aJ7Rbxl6JowkWBIzt3Av/gn5nSakwvxvP09bYd9HuXWwjptLMC+HCvc4ybK6+hUHN2x1D8XUexZZkv6W8z/R9x9vlEm5Dn2LURgXgQGJyF/k6B920rQuY1U9m5+Z/IHTITJU51mdQrHSF9CPFIWXGcIIFaTidc64S5jyNaM8d9gWuu/wKzflyHmx33FzeEjIKdYBryLgJNIeDo/6ZEobDwbcGcgl9hM/ohd1gqihetQNHOQ+jRKw2j8iYh79osfyPFosXpfkWvvYBFS9ejrOoQkNwJOd+4AZMnjkdm94Ao2rFmLgr+VIGuPS9Gbv99mL+0HCkda7Cny8X4/r1T6JZsR/dpEQqeeBkbS+xr8dRPf4iyvp3gOzsXhfcOC0q75N1l2P2rFViDc5BUWYtLRo/H9PG56BrS+ePbVYpFC1/A8tXl2M1oe/TKQN7dkzBucLqdiPf34BYsX7wIi1bb0xuN31F5E0LOuxZFvyvEIo6k9B4wEP0PrsHSDbVIOlyDrpffgPy785Bun4435tPWXltTgzq0Q4fObvO1JU61FtVOMrlX9A4k2CULk29MxPQ3arGnyoySniLvdh3zoabmCyR27ozEk1ST1R2twRGKkQ7MQ8gtZPE9Odc5cGmbasu4ICCw/vE/dmxJHK1yzVanznH3vdsR/QJh33+TourPzlEKrfc5omVKfvev2G5ev1vXU2D90XY3o1x3GeHWjmKP4Za9RQHG0S/XvE5/+U4eni7gMY6OJXFY/y56eNr1dKZvm3ifuGW8M8t408wxHKmhOm7bAR3aN+aGZfj9R4H27RsZvnG5zxmc5jxDa1G85AlPJKX4xeoKLBzLApmQjP438tAbnsOt3cpycYT1Z8LZrD/jmdcmlremZGXvVkdQteU7XJeyR8Y1iXW49YoEvPo34PPKNjhId+8bGK43bUWguQk0puZrXJ5qdmLJms/Z0Aw1bTBwaF9UvrMVFccTce2IDKvJV7drG5ZsOIjEc1Mw9mtf4qW/fI5ab9A2Cci49AJcntYZtZ9sxkv/5471ezx1OwcTr/I0Lj2H
<p>Notice the explorer indicates 6 peers: the 4 regular nodes, the mining node and the bootnode.</p>
<p>Click on the block number to the right of <strong>Best Block</strong> to display the block details. </p>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAjAAAADlCAYAAABNnc3aAAABfGlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGAqSSwoyGFhYGDIzSspCnJ3UoiIjFJgv8PAzcDDIMRgxSCemFxc4BgQ4MOAE3y7xsAIoi/rgsxK8/x506a1fP4WNq+ZclYlOrj1gQF3SmpxMgMDIweQnZxSnJwLZOcA2TrJBUUlQPYMIFu3vKQAxD4BZIsUAR0IZN8BsdMh7A8gdhKYzcQCVhMS5AxkSwDZAkkQtgaInQ5hW4DYyRmJKUC2B8guiBvAgNPDRcHcwFLXkYC7SQa5OaUwO0ChxZOaFxoMcgcQyzB4MLgwKDCYMxgwWDLoMjiWpFaUgBQ65xdUFmWmZ5QoOAJDNlXBOT+3oLQktUhHwTMvWU9HwcjA0ACkDhRnEKM/B4FNZxQ7jxDLX8jAYKnMwMDcgxBLmsbAsH0PA4PEKYSYyjwGBn5rBoZt5woSixLhDmf8xkKIX5xmbARh8zgxMLDe+///sxoDA/skBoa/E////73o//+/i4H2A+PsQA4AJHdp4IxrEg8AAAGdaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA1LjQuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjU2MDwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4yMjk8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4K5CNXHgAAQABJREFUeAHsvQt8VcW5PvyEwN7kSiAhNCSRECQkChKQBmiJqCAHiIVClcI51vxVpJWCVoVfQfov0e8g9IPaWjnUD7EWtYUTFYTK5SB4Cx4wRQSDhIsENAkpIQjkBntD4HtmXfZaO9kJO9xy4Z3fb++91sw7s2aemTXzzDvvzA6oPuO6CHGCgCAgCAgCgoAgIAi0IATatKC8SlYFAUFAEBAEBAFBQBDQEBACIw1BEBAEBAFBQBAQBFocAkJgWlyVSYYFAUFAEBAEBAFBQAiMtAFBQBAQBAQBQUAQaHEICIFpcVUmGRYEBAFBQBAQBAQBITDSBgQBQUAQEAQEAUGgxSEgBKbFVZlkWBAQBAQBQUAQEASEwEgbEAQEAUFAEBAEBIEWh4AQmBZXZZJhQUAQEAQEAUFAEBACI21AEBAEBAFBQBAQBFocAkJgWlyVSYYFAUFAEBAEBAFBQAiMtAFBQBAQBAQBQUAQaHEICIFpcVUmGRYEBAFBQBAQBAQBITDSBgQBQUAQEAQEAUGgxSEgBKbFVZlkWBAQBAQBQUAQEASEwEgbEAQEAUFAEBAEBIEWh4AQmBZXZZJhQUAQEAQEAUFAEBACI21AEBAEBAFBQBAQBFocAkJgWlyVSYYFAUFAEBAEBAFBQAiMtAFBQBAQBAQBQUAQaHEICIFpcVUmGRYEBAFBQBAQBASBtgKBIFAbgUHPOGp73RD3AQHAtnnuG6KsUkhBQBAQBFo6AqKBaek1KPkXBAQBQUAQEARuQASEwNyAlS5FFgQEAUFAEBAEWjoCQmBaeg1K/gUBQUAQEAQEgRsQASEwN2ClS5EFAUFAEBAEBIGWjoAQmJZeg5J/QUAQEAQEAUHgBkRAdiHdgJV+tYucHAuEhwDlB4B9RuLJSfTjdS796nPJw4Gsfgy94FvCSe/1K4FXivXw5EHA04OBMEW7TwETX/Udb/7jQDIjlzHeo3/3LSO+1weB8vwtWJ9XCkd0b4y/s8/1eejVekpNKTa/twVlrnboO+I+pERcrYRbbjoFm5Zh7qo8pI2djOmjWlh9tlzYJef1ICAEph5gxNtPBEheXnlaJysFO4BxijD0B15/AFAEJD+HRGO177QSo4GUGN9hpm9iF16RiLzyDJAWZfryl/HG8ad20mk/AkYn6HJRVfqvfDcdAsWfr8C8xSeBaDeGk8AoUtu8XBUK9uxHGUKQnNIL4YG23LmOYen8t5FPr+m3jCKBIUu/kZ17P+b+dgN2EYNdu5Zh+NAXkRJ8bQEpPpSHYk5WYpP6IDbs2j5LUm95CMgSUsurs+aVYxIMRVQ0d17/GX2z5Xf4GyPMx0/Zd+Qm5fyoX/Up48flQ5CEyIu8KJEawJfoo2lW/P9eYl3LVdMg4HR01B8c4bDaSdNkxfdTqwswa/I8PDI5CwW1GxSndyZndtqJje+UWr+vIxrDOenQXS90vsbkBajC5iez8Mgvs7DuG5mNmMjLr4WAaGAsLOTqMhBI7maRld2f6gk4bRPVgp31J5q7kdoSfuxu9e+su2IuP81W8anl2V1CcpPH676Mo7QyvtxwEh3j2eWFwGJfMuInCNgRcDoMkhKNcA8Ttwvo105Hu7qeN5xPR2Sufh3jqvnOB4dcB0IagrCuBLmUGt4gwf+Ga25+FFgIjB8gXYlIzdlKnKFmIig0FL4mcWZ4KMNblCOpWPkQ0DnIyvXoR8kv3Jy1djD8aNsy8Tf049LStFpExYplXSnykmj0U4qAjH7ZCCsGHlyoX2c1sOz+wiArrS3rrGu5ao4IVGHXprexdFUO8o+q2XUIBo4aiSkP3IfEWksF5YV5WP3WO9i8i0tRnPWHRcch494xGJ7Wy2sQLd6zAX/N/gC7j7g5wKplh/4YP3YM0noYWqBaMJTnr8Xzr25BjuZfhLm/zkJicBVi734CU+6M85LetW0tjv95I2U7wlnqRvK992H6T9K9l5zgRsHWtVj+bg4+OcBRl2VKSWUeJt2H4Ske1QWKty7DvHeLEN61F9J7nMTyd/Yjis8tC+2F6Y9Npp/v/Hoy5C5Fzoa3seKdncg/Rey4tDVw8DBkTvgJUiLrP0XbfG7nHr2Q1vUkVr6TgyLmMS6hF6Y8PBXp8VVYt2I5Vm4qIsa0IUMvzHgiE2nx1oykeNvbzPsepN5rYWSm6095ij9i2d/b7xVflassdwV+m70T4beMwbMPpwOFOXj+xbXIV+tVdP/fwjnI7xYCV0Q6nn1smKfetTr/60Zs1vAG4lLTMf1h5jnByrOeQu1v/+pKi0W8N2cvx/JNO1HE5azOSenITA9BzueHUY44zPnNZMTaYC/IZRvI3mK1gTuHYXpmw3VTO3dy7x8CAdVnXBf9E73RpCqx7f0CsC+0HM+a7xoThSH9YkhGjPDzQfjRqJ6oSz9OYcdHhThYZcIbiJ633IQB3Y3e+fx32JZTjCPVRngAw1OM8LMleHfLcbg7RmLCD8gU+KwdHxbgIGc+ibf1wsD4BqaKVm4v+8qvvxLgss7uB/x7RDG1KKPfbFh25Xzaw5jFoiq/72zf8lkzafsSw7Bz1M78mka+phjzk8v8qCRouoA0kqFk+o27mR5ngPn/MAXr/70efyVQ8L95+Oyk2SasvAR26IQJQyL0Nme0Kcc3X+OdPdUIDIvAhDtu0oVPfIt3tp+Cu10wfjziZpR99hW2lnE9rZbrcnN33N2rFhOoJXM9bguyZ2LsCwVA0n3Y8fokY+CpwqpfPIi5xuDknY+OeHXdMqRF6r7lny/DD3+5wVvEuIuiIenG2aO0NHP/MhmPLCXB8eHGP7cIz47oXiekYM0TGDu/qI4/pmQh72EyZXcept6RZRCcumKqTJ+yTOFaEAf/3z6IWZt8yNFr4oIXMccgRQXZfO4LPp5rRJ2xbBkye9dDYmiHMuuOZ+Cbnzvwh7eWY3i8
<p>You can explore blocks by clicking on the blocks under <strong>Bk</strong> down the left-hand side. </p>
<p>You can search for a specific block, transaction hash, or address by clicking the magnifying glass in the top left-hand corner. </p>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfEAAADBCAYAAADfP4lkAAABfGlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGAqSSwoyGFhYGDIzSspCnJ3UoiIjFJgv8PAzcDDIMRgxSCemFxc4BgQ4MOAE3y7xsAIoi/rgsxK8/x506a1fP4WNq+ZclYlOrj1gQF3SmpxMgMDIweQnZxSnJwLZOcA2TrJBUUlQPYMIFu3vKQAxD4BZIsUAR0IZN8BsdMh7A8gdhKYzcQCVhMS5AxkSwDZAkkQtgaInQ5hW4DYyRmJKUC2B8guiBvAgNPDRcHcwFLXkYC7SQa5OaUwO0ChxZOaFxoMcgcQyzB4MLgwKDCYMxgwWDLoMjiWpFaUgBQ65xdUFmWmZ5QoOAJDNlXBOT+3oLQktUhHwTMvWU9HwcjA0ACkDhRnEKM/B4FNZxQ7jxDLX8jAYKnMwMDcgxBLmsbAsH0PA4PEKYSYyjwGBn5rBoZt5woSixLhDmf8xkKIX5xmbARh8zgxMLDe+///sxoDA/skBoa/E////73o//+/i4H2A+PsQA4AJHdp4IxrEg8AAAGdaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA1LjQuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjQ5NzwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4xOTM8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KCAo8QwAAORFJREFUeAHtnQ14VNWd/78QyGBIIgGSVCBUCKvBWKxTtAS1TO1SyotBSgOyDdY/bw8NlbKh1s2ij/FRmrWueai7ZHm2wH+FuAiIEVbUiGtD9U9cZWPFRqglYgloQ6LBJARmMPD/nfsyc2cySWbyOjd8z/NM7tu55/zO55x7vuft3gy4LA50JEACJEACJEACtiMw0HYW02ASIAESIAESIAGNAEWcBYEESIAESIAEbEqAIm7TjKPZJEACJEACJEARZxkgARIgARIgAZsSoIjbNONoNgmQAAmQAAlQxFkGSIAESIAESMCmBCjiNs04mk0CJEACJEACFHGWARIgARIgARKwKQGKuE0zjmaTAAmQAAmQAEWcZYAESIAESIAEbEqAIm7TjKPZJEACJEACJEARZxkgARIgARIgAZsSoIjbNONoNgmQAAmQAAlQxFkGSIAESIAESMCmBCjiNs04mk0CJEACJEACFHGWARIgARIgARKwKQGKuE0zjmaTAAmQAAmQwKBuQ9BSg9IXD6ABg9sO0nMRjvTpyJyU3Laf/nKluQr79pajIToZM+6ejsSodhJmsKv1DMbN0+chfWR0O567eMka1w8WIj2hi+FFyO2n3t6PshP1SJw0HTPSr4DyFSHcu9uMhuP7kf+r/cD105H/4DzEd3cEHYRX+cZOvFdzUcrRbClHvfxwNEqd8ZKqM8ZIneFqv87oIB0Rd9lb7wxFxpx5SI1rx8Jw/LYTzJVyqftE3F2Dosd2orIDcok5kzon4s3VqKisAWKS4UxP6SCWvr/srjuG3Cd2iiEJuGGmiHhMOzZZ2OWmz+5ZEQ+MKyG2HcPscsmDygNbkb/Hg3QpXxEn4jYruz2e623yaELprzZhX4VYULEV6XOmY2l6b5bPJrz378XIPwajHPWuiLvrrXWGiHh7dUaPZ1I3R+BX70xHzqR28jUcv91sph2D6z4Rl55mokHAOV96QynRcHsCkMiJxEmdezDcJw5gwfISIHkeKkqX9HoLPSAlHR821ht+YuHoyLeFnaO9HntH4YRyvTfjCsWebvHjQe0JvbA5enAQo7Om2q7sdjahId7XNo9YpE6R+qFCPTvRSE1up6IPMa5wvTkM4eyTchROnRFuwvrafzj1Tjh++zpdERB/94m4JTGZi1Yie0L31qaOmKF6DKOHdiyKFlv6bNer3NEY4t3vM2v6fcRexH1S+7aP13Zlt/3kdPlqezycK7ahYlETEBWL+L7sifZFOfIWYvS/OmNQGHoQjt8ul0b7B9AjIu7WuuAdZJq7GkX5T+E4hiL9tsn48kAJDmI4HDUe3DB3AXIXuBCv9Uo9KPv3AhS/XaXTrtiFVXnHEN/swYy1eZgx1mitS3ilO4qx5dXDqFYN+YRkZGVlY9n8qZZeuxFWpQcZc2VepmY/it72IL4RyMp/RMIKZrMHVQdLsPmFgyg7JsP5yl7nZGRlLwxx2LYae3dtxam9ZSivP4ek0WnIXrEEWVNSQys9ap5M0lX8xhEtXer+TIk7+85JrRszMgxV9sJOFO1VDCSuhBRMy7obi+fI0JylgggW8am3i1G49ygampORV7AaqUEq0FMHNyH/hWrEj5oI14QvsGX3MRnya0Jt3ET8/f0r5ZxllOXTQ8h7YhfcE2aj4P7pPlvr5Pxju1Abk4a8/JVIFbvMcBMnTETGqC9QvPsgqoVzyriJyFlxP1xjz2Hf9q0oflXilunuWqThH9YuQYaZ95YEVb/9GrbUbcfml2RMVMLImDMbq+5bGGQOrgkVr+xC0e4yVJ4+16Zf3TZJ582zkTVOpoyeOYz4OA/GzM1D7p0dTet0XHY7Dj+08uc+WYa8pw5o002u7wzHvmdeQ4P0ZN010cj6qTSqp6VZKMluYzX27SnGvt9XyzoWcXEJmDFd0jhTnhftuTO8qzL10k7Jk8OolDKFBGF62/exdNGC1tM+HZa/jnmodBQ89aKMZ89G/gpLuRFzGk4cQnHxLpS+VY0zcpySNhlL5Vnymz4JuV4x0tfGpvqIxCXlaPd79XA0NyH+5u8jb0U2Ui1FXN1aW1mG7cUv4mCFblNSWhqy5i5EVuDzGSpvzR5h/mIxNu5+Dafay8NgtodUX3SmHgwjrWJX1UGxX8pguTxbqs7Kmp0qz21wF5JfI18rZHoyc9FsNOwtRlmzlInmNBT+eiXGaPVbaM+0sqLh5BHs3rETpZK/kLouPjkFmaIJM6ak+eoqqPBelHrnEKpEIxwyOnTDlGlYnDVbykEwrQievp4+O+CyuG6JxH0Ey769DmUSWP7zezruiTcfwYKp66Cmv4K6tIWoeC5bBLgJW2YsQoHSzwCXs20HctXcioS1TMIqC7iuHSbPRnnpSmOovwnF9yzS5rwCveY/v0NsDhy+a8K+vEXIfSXQt36cXViE/DYqcvfxYqT/SM2JB3fpa9Zj732T9IsWdnnP7vDNA356ABmzng5e+Kdlo/I3C30Fzi3zad9+APuCRpeKvYc2IF0Jc5C4at/dhIzl+/U7ncJ9q+Le2lXtyMGMJ6pbXzDO5G3bhqXGdIn7xE6kzysGvPmoe3JXylznj0vkIAW7DhXBKTZ1FG7wCKOx8eU9mDFKXW3C7iWLkNdmYUrB9jeLkOFdTNOe/wRsf30bMkbqsbZlm+vhJ7F5foAwtjK047LbfvhjQi5/7kopbz9uu7w5pbztMstb/WHM/e6jbaxfmYrSQ3l6I67dMiX89+3wNXzb9WuWv455eJ+bgHJz6o0CuHIPtSKsTvjlRcj1SrCg2isXyr+UWSlHTqMcVb20DjMeOhIsICQuWo2yB41GSIi8vWkPGiLgl4fB/IRcX4RbD8ozGmpaxa7yf7kXi7eonlRwZ63jQvbbZr6movR/NkhnoL2883+mG6S+c5r1XYCJifNXouzh2VKv1mPLPfeiQPUF
<h2 id="run-json-rpc-requests">Run JSON-RPC Requests</h2>
<p>Now we&#39;re ready to run requests.</p>
<p>You can run RPC requests on <code>rpcnode</code>, the node that is exposed to the host in order to listen for requests. This tutorial uses <a href="https://curl.haxx.se/download.html">cURL</a> to make JSON-RPC requests.</p>
<blockquote>
<p><strong>On Windows:</strong> We suggest using Postman or a similar client to make RPC requests from Windows. Using curl via Command Prompt or Windows PowerShell might not work.</p>
</blockquote>
<p>This tutorial uses the placeholder <code>http://localhost:http-rpc-port</code>. When you run this tutorial, replace <code>http-rpc-port</code> with the JSON-RPC HTTP service endpoint provided when you list the endpoints. (For example, <code>http://localhost:32770/jsonrpc</code>.) The dynamic docker port mapping changes each time you run the network.</p>
<h3 id="requesting-the-node-version">Requesting the Node Version</h3>
<p>Run the following command from the host shell :</p>
<pre class="hljs">curl -X POST --data <span class="hljs-string">'{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}'</span> http://localhost:http-rpc-port</pre><p>The result should be as follows: </p>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">1</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"pantheon/1.0.0"</span>
}</pre><p>Here we simply query the version of the Pantheon node, which confirms the node is running.</p>
<p>Now if this works, let&#39;s see some more interesting requests.</p>
<h3 id="counting-peers">Counting Peers</h3>
<p>Peers are the number of other nodes connected to the RPC node.</p>
<p>Poll the peer count using <code>net_peerCount</code>:</p>
<pre class="hljs">curl -X POST --data <span class="hljs-string">'{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}'</span> http://localhost:http-rpc-port</pre><p>The result should be the following response, indicating that there are 6 peers:</p>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">1</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"0x6"</span>
}</pre><h3 id="requesting-the-most-recent-mined-block-number">Requesting the Most Recent Mined Block Number</h3>
<p>This provides the count of blocks already mined.</p>
<p>To do so, call <code>eth_blockNumber</code> to retrieve the number of the most recent block:</p>
<pre class="hljs">curl -X POST --data <span class="hljs-string">'{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'</span> http://localhost:http-rpc-port</pre><p>The result of this call should be:</p>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">1</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"0x8b8"</span>
}</pre><p>Here the hexadecimal value <code>0x8b8</code> translates to <code>2232</code> in decimal; that many blocks have already been mined.</p>
<h3 id="checking-the-miner-account-balance-coinbase-">Checking the Miner Account Balance (Coinbase)</h3>
<p>Then call <code>eth_getBalance</code> to retrieve the balance of the mining address defined in the miner node:</p>
<pre class="hljs">curl -X POST --data <span class="hljs-string">'{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73","latest"],"id":1}'</span> http://localhost:http-rpc-port</pre><p>The result of this call should be something like :</p>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">1</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"0x79f905c6fd34e80000"</span>
}</pre><p><em>0x79f905c6fd34e80000 = 2250000000000000000000 Wei (2250 Ether)</em> (you can use a unit <a href="https://etherconverter.online/">converter</a> )</p>
<p>Wait a few seconds until new blocks are mined and make this call again. The balance should increase,
meaning that the miner address successfully received the mining reward.</p>
<p><em>Also you can see this information in the block explorer. It does exactly the same thing as we
did manually, connecting to the rpc node using http JSON-RPC, but displays information on a web page.</em></p>
<h3 id="additional-requests">Additional Requests</h3>
<p>Now that you are familiar with basic RPC requests you can run JSON-RPC commands to send transactions.
In order to send transactions, you will first need to create an account or use one of the 3 accounts
created during the genesis of this test network.</p>
<h4 id="account-1">Account 1</h4>
<p>This is the mining node coinbase account:</p>
<ul>
<li>Address: 0xfe3b557e8fb62b89f4916b721be55ceb828dbd73</li>
<li>Private key : 0x8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63</li>
<li><p>Initial balance : 0xad78ebc5ac6200000 (200000000000000000000 in decimal) </p>
<h4 id="account-2">Account 2</h4>
</li>
<li><p>Address: 0x627306090abaB3A6e1400e9345bC60c78a8BEf57</p>
</li>
<li>Private key : 0xc87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3</li>
<li><p>Initial balance : 0x90000000000000000000000 (2785365088392105618523029504 in decimal)</p>
<h4 id="account-3">Account 3</h4>
</li>
<li><p>Address: 0xf17f52151EbEF6C7334FAD080c5704D77216b732</p>
</li>
<li>Private key : 0xae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f</li>
<li>Initial balance : 0x90000000000000000000000 (2785365088392105618523029504 in decimal)</li>
</ul>
<blockquote>
<p><strong>Note:</strong> Pantheon does not provide an accounts management system, so if you want to create your own account, you will have to use a third party tool like Metamask.</p>
</blockquote>
<h3 id="creating-a-transaction-using-metamask">Creating a Transaction Using MetaMask</h3>
<p>After you sign in to MetaMask, connect to the private network RPC endpoint by:</p>
<ol>
<li>In the MetaMask network list, select <strong>Custom RPC</strong>.</li>
<li>In the <strong>New RPC URL</strong> field, enter the <code>JSON-RPC HTTP service endpoint</code> displayed when you started the private network.</li>
</ol>
<p>Save the configuration and return to the MetaMask main screen. Your current network is now set to the private network RPC node.</p>
<p><a href="https://metamask.zendesk.com/hc/en-us/articles/360015489331-Importing-an-Account-New-UI-">Import one of the existing accounts above into metamask</a>
using the corresponding private key. </p>
<p><strong>NOTE that here we don&#39;t really care about securing the keys as it&#39;s just a tutorial, but be sure
to secure your accounts when you run into a real usecase. This will be discussed in a more advanced
chapter.</strong></p>
<p>Once this is done, try to <a href="https://metamask.zendesk.com/hc/en-us/articles/360015289452-Creating-Additional-MetaMask-Wallets-New-UI-">create another account from scratch</a>
to send some ether to.</p>
<p><em>Of course remember that here we are dealing with valueless ether as we are not
on the main network but on a local private network.</em></p>
<p>In MetaMask, select the new account and copy the account address by clicking the <strong>...</strong> button and selecting <strong>Copy Address to clipboard</strong>.</p>
<p>In the block explorer, search for the new account by clicking on the magnifying glass and pasting the account address into the search box. The account is displayed with a zero balance. </p>
<p><a href="https://metamask.zendesk.com/hc/en-us/articles/360015488991-Sending-Ether-New-UI-">Send some ether</a>
from the first account (containing some ether) to the new one (that have a zero balance).</p>
<p>Click refresh on the browser page displaying the new account. The updated balance is displayed and reflects the transaction completed using MetaMask. </p>
<h3 id="playing-with-the-truffle-pet-shop-tutorial">Playing with the Truffle Pet Shop Tutorial</h3>
<p>This step is inspired by <a href="https://truffleframework.com/tutorials/pet-shop">the PetShop tutorial on Truffle website</a>.</p>
<p>Use the following instructions to run it with the quick-start Pantheon Docker network and a wallet to manage keys.</p>
<h4 id="prerequisites">Prerequisites</h4>
<ul>
<li>Install Truffle :</li>
</ul>
<pre class="hljs">npm install -g truffle</pre><ul>
<li>Grab the tutorial <a href="https://truffleframework.com/tutorials/pet-shop#creating-a-truffle-project-using-a-truffle-box">as indicated in the Truffle site</a>:</li>
</ul>
<pre class="hljs">mkdir pet-shop-tutorial
<span class="hljs-built_in">cd</span> pet-shop-tutorial
truffle unbox pet-shop</pre><ul>
<li>Install the <a href="https://www.npmjs.com/package/truffle-privatekey-provider">Wallet</a> by running the following command:</li>
</ul>
<pre class="hljs">npm install truffle-privatekey-provider</pre><h4 id="modify-the-pet-shop-example">Modify the Pet Shop Example</h4>
<p>We are going to modify the <code>truffle.js</code> file to add our wallet provider.
So modify the file to look like the following :</p>
<pre class="hljs"><span class="hljs-keyword">const</span> PrivateKeyProvider = <span class="hljs-built_in">require</span>(<span class="hljs-string">"truffle-privatekey-provider"</span>);
<span class="hljs-keyword">const</span> privateKey = <span class="hljs-string">"8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63"</span>;
<span class="hljs-keyword">const</span> privateKeyProvider = <span class="hljs-keyword">new</span> PrivateKeyProvider(privateKey, <span class="hljs-string">"[YOUR HTTP RPC NODE ENDPOINT]"</span>);
<span class="hljs-built_in">module</span>.exports = {
<span class="hljs-comment">// See &lt;http://truffleframework.com/docs/advanced/configuration&gt;</span>
<span class="hljs-comment">// for more about customizing your Truffle configuration!</span>
networks: {
<span class="hljs-attr">development</span>: {
<span class="hljs-attr">host</span>: <span class="hljs-string">"127.0.0.1"</span>,
<span class="hljs-attr">port</span>: <span class="hljs-number">7545</span>,
<span class="hljs-attr">network_id</span>: <span class="hljs-string">"*"</span> <span class="hljs-comment">// Match any network id</span>
},
<span class="hljs-attr">quickstartWallet</span>: {
<span class="hljs-attr">provider</span>: privateKeyProvider,
<span class="hljs-attr">network_id</span>: <span class="hljs-string">"*"</span>
},
}
};</pre><p>Then replace the <code>[YOUR HTTP RPC NODE ENDPOINT]</code> placeholder with your HTTP RPC node endpoint. <code>http://localhost:32770/jsonrpc</code> in this case.</p>
<p>The private address indicated in the file is the miner address so we know we will have funds in it. You don&#39;t need to change it.</p>
<p>Once this is done, you can go through the regular tutorial steps.</p>
<p>When you have to run a truffle command, you only have to indicate the right network to use, as in the following command using the <code>--network quickstartWallet</code> option :</p>
<pre class="hljs">truffle migrate --network quickstartWallet</pre><p>You&#39;re now able to see the transactions and contracts deployed on your local docker network on the block explorer.</p>
<h2 id="shut-down-the-network-and-remove-the-containers">Shut Down the Network and Remove the Containers</h2>
<p>To shut down the network and delete all containers:</p>
<blockquote>
<p>On Linux/Mac, run the following shell command:</p>
</blockquote>
<pre class="hljs">quickstart/removePantheonPrivateNetwork.sh</pre><blockquote>
<p>On Windows, run the following docker-compose command:</p>
</blockquote>
<pre class="hljs">quickstart\docker-compose down</pre><blockquote>
<p><strong>Note</strong> On Windows, the quickstart creates a volume called <code>quickstart_public-keys</code>. Remove this volume using <code>docker volume rm quickstart_public-keys</code>.</p>
</blockquote>
<h2 id="stop-and-restart-the-private-network-without-removing-the-containers">Stop and restart the Private Network without Removing the Containers</h2>
<p>To shut down the network without deleting the containers:</p>
<blockquote>
<p>On Linux/Mac, run the following shell command:</p>
</blockquote>
<pre class="hljs">quickstart/stopPantheonPrivateNetwork.sh</pre><blockquote>
<p>On Windows, run the following docker command:</p>
</blockquote>
<pre class="hljs">docker-compose stop</pre><p>(This command will also stop other running containers unrelated to quickstart.)</p>
<p>To restart the private network:</p>
<blockquote>
<p>On Linux/Mac, run the following shell command:</p>
<pre class="hljs">quickstart/resumePantheonPrivateNetwork.sh</pre></blockquote>
<blockquote>
<p>On Windows, run the following docker command:</p>
<pre class="hljs">docker-compose start</pre></blockquote>
<p class="page" id="Starting-Pantheon"></p><h1>Starting Pantheon</h1>
<h1 id="starting-pantheon">Starting Pantheon</h1>
<p>Pantheon nodes can be used for varying purposes as described in the <a href="#Overview">Overview</a>. Nodes can connect to the Ethereum mainnet, public testnets such as Ropsten, or private networks.</p>
<h2 id="local-block-data">Local Block Data</h2>
<p>When connecting to a network other than the network previously connected to, you must either delete the local block data or use the <code>--datadir</code> option to specify a different data directory. </p>
<p>To delete the local block data, delete the <code>database</code> directory in the <code>pantheon/build/distribution/pantheon-0.8.0-&lt;version&gt;</code> directory.</p>
<h2 id="genesis-configuration">Genesis Configuration</h2>
<p>Pantheon specifies the genesis configuration, and sets the network ID and bootnodes when connecting to <a href="#run-a-node-on-ethereum--mainnet">mainnet</a>, <a href="#run-a-node-on-rinkeby-testnet">Rinkeby</a>, and <a href="#run-a-node-on-ropsten-testnet">Ropsten</a>. </p>
<p>When <code>--dev-mode</code> is specified, Pantheon uses the development mode genesis configuration.</p>
<p>The genesis files defining the genesis configurations are in the <a href="https://github.com/PegaSysEng/pantheon/tree/master/config/src/main/resources">Pantheon source files</a>. </p>
<p>To define a genesis configuration, create a genesis file (for example, <code>genesis.json</code>) and specify the file using the <code>--genesis</code> option.</p>
<h2 id="run-a-node-on-ethereum-mainnet">Run a Node on Ethereum Mainnet</h2>
<p>To run a node on the Ethereum mainnet: </p>
<p><code>$ bin/pantheon</code></p>
<p>To run a node on mainnet with the HTTP JSON-RPC service enabled: </p>
<p><code>$ bin/pantheon --rpc-enabled</code></p>
<h2 id="run-a-node-on-ropsten-testnet">Run a Node on Ropsten Testnet</h2>
<blockquote>
<p><strong>Note</strong> From v0.8.2 or when <a href="#Installation">building from source</a>, use the <a href="#Pantheon-CLI-Syntaxoptions"><code>--ropsten</code> option</a> instead of the following options. For v0.8.1, use the following options.</p>
</blockquote>
<p>Replace <code>&lt;path&gt;</code> with the path to the <code>/pantheon</code> directory. </p>
<p>To run a node on Ropsten: </p>
<p><code>$ bin/pantheon --network-id=3 --genesis=&lt;path&gt;/pantheon/ethereum/core/src/main/resources/ropsten.json --bootnodes=enode://6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f@52.232.243.152:30303,enode://94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09@192.81.208.223:30303</code></p>
<p>To run a node on Ropsten with the HTTP JSON-RPC service enabled and allow Remix to access the node: </p>
<p><code>$ bin/pantheon --rpc-enabled --rpc-cors-origins &quot;http://remix.ethereum.org&quot; --network-id=3 --genesis=&lt;path&gt;/pantheon/ethereum/core/src/main/resources/ropsten.json --bootnodes=enode://6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f@52.232.243.152:30303,enode://94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09@192.81.208.223:30303</code></p>
<h2 id="run-a-node-on-rinkeby-testnet">Run a Node on Rinkeby Testnet</h2>
<p>Replace <code>&lt;path&gt;</code> with the path where the Rinkeby chain data is to be saved. </p>
<p>To run a node on Rinkeby specifying a data directory: </p>
<p><code>$ bin/pantheon --rinkeby --datadir=&lt;path&gt;/rinkebyDataDir</code></p>
<h2 id="run-a-node-for-testing">Run a Node for Testing</h2>
<p>To run a node that mines blocks at a rate suitable for testing purposes: </p>
<p><code>$ bin/pantheon --dev-mode --bootnodes= --miner-enabled --miner-coinbase fe3b557e8fb62b89f4916b721be55ceb828dbd73 --rpc-cors-origins &quot;all&quot; --ws-enabled --rpc-enabled</code></p>
<p class="page" id="Run-Docker-Image"></p><h1>Running Pantheon from Docker Image</h1>
<h1 id="run-pantheon-from-docker-image">Run Pantheon from Docker Image</h1>
<p>A Docker image is provided to run a Pantheon node in a Docker container. </p>
<p>Use this Docker image to run a single Pantheon node without installing Pantheon. </p>
<h2 id="prerequisites">Prerequisites</h2>
<p>To run Pantheon from the Docker image, you must have <a href="https://docs.docker.com/install/">Docker</a> installed. </p>
<h2 id="quickstart">Quickstart</h2>
<p>To run a Pantheon node in a container connected to the Ethereum mainnet: </p>
<pre class="hljs">docker run pegasyseng/pantheon:latest</pre><h2 id="command-line-options">Command Line Options</h2>
<p>You cannot use the following Pantheon command line options when running Pantheon from the Docker image: </p>
<ul>
<li><code>--datadir</code>, see <a href="#persisting-data">Persisting Data</a></li>
<li><code>--config</code>, see <a href="#custom-configuration-file">Custom Configuration File</a></li>
<li><code>--genesis</code>, see <a href="#custom-genesis-file">Custom Genesis File</a>.</li>
<li><code>--rpc-listen</code>, <code>--p2plisten</code>, <code>--ws-listen</code>, see <a href="#exposing-ports">Exposing Ports</a></li>
</ul>
<p>All other <a href="https://github.com/PegaSysEng/pantheon/wiki/Pantheon-CLI-Syntax">Pantheon command line options</a> work in the same way as when Pantheon is installed locally.</p>
<h3 id="persisting-data">Persisting Data</h3>
<p>Specify a Docker volume to persist data between stopping and restarting the container. This is the equivalent of specifying the <code>-datadir</code> option. </p>
<p>If a Docker volume is not specified, all data saved to the data directory is removed each time the container is stopped. </p>
<p>To run Pantheon specifying a volume for the data directory: </p>
<pre class="hljs">docker run --mount type=bind,source=/&lt;pantheonDataDir&gt;,target=/var/lib/pantheon pegasyseng/pantheon:latest
</pre><p>Where <code>&lt;pantheonDataDir&gt;</code> is the volume to which the data is saved. </p>
<h3 id="custom-configuration-file">Custom Configuration File</h3>
<p>Specify a custom configuration file to provide a file containing key/value pairs for command line options. This is the equivalent of specifying the <code>--config</code> option. </p>
<p>To run Pantheon specifying a custom configuration file: </p>
<pre class="hljs">docker run --mount type=bind,source=/&lt;path/myconf.toml&gt;,target=/etc/pantheon/pantheon.conf pegasyseng/pantheon:latest
</pre><p>Where <code>myconf.toml</code> is your custom configuration file and <code>path</code> is the absolute path to the file. For example:</p>
<pre class="hljs">docker run --mount type=bind,source=/Users/username/pantheon/myconf.toml,target=/etc/pantheon/pantheon.conf pegasyseng/pantheon:latest</pre><h3 id="custom-genesis-file">Custom Genesis File</h3>
<p>Specify a custom genesis file to configure the blockchain. This is equivalent to specifying the <code>--genesis</code> option.</p>
<p>To run Pantheon specifying a custom genesis file: </p>
<pre class="hljs">docker run --mount type=bind,source=&lt;/path/mygenesis.json&gt;,target=/etc/pantheon/genesis.json pegasyseng/pantheon:latest</pre><p>Where <code>mygenesis.json</code> is your custom configuration file and <code>path</code> is the absolute path to the file. For example:</p>
<pre class="hljs">docker run --mount type=bind,source=/Users/username/pantheon/mygenesis.json,target=/etc/pantheon/genesis.json pegasyseng/pantheon:latest</pre><h3 id="exposing-ports">Exposing Ports</h3>
<p>Expose ports for P2P peer discovery, JSON-RPC service, and WebSockets. This is required to use the defaults ports or specify different ports (the equivalent of specifying the <code>--rpc-listen</code>, <code>--p2p-listen</code>, <code>--ws-listen</code> options).</p>
<p>To run Pantheon exposing local ports for access: </p>
<pre class="hljs">docker run -p &lt;localportJSON-RPC&gt;:8545 -p &lt;localportWS&gt;:8546 -p &lt;localportP2P&gt;:30303 pegasyseng/pantheon:latest --rpc-enabled --ws-enabled</pre><p>For example, to enable RPC calls to <a href="http://127.0.0.1:8545">http://127.0.0.1:8545</a> and P2P discovery on <a href="http://127.0.0.1:13001">http://127.0.0.1:13001</a>:</p>
<pre class="hljs">docker run -p 8545:8545 -p 13001:30303 pegasyseng/pantheon:latest --rpc-enabled</pre><h2 id="starting-pantheon">Starting Pantheon</h2>
<h3 id="run-a-node-on-ethereum-mainnet">Run a Node on Ethereum Mainnet</h3>
<p>To run a node on the Ethereum mainnet: </p>
<pre class="hljs">docker run -p 30303:30303 --mount type=bind,source=/&lt;myvolume/pantheon&gt;,target=/var/lib/pantheon pegasyseng/pantheon:latest</pre><p>To run a node on mainnet with the HTTP JSON-RPC service enabled: </p>
<pre class="hljs">docker run -p 8545:8545 -p 30303:30303 --mount type=bind,source=/&lt;myvolume/pantheon&gt;,target=/var/lib/pantheon pegasyseng/pantheon:latest --rpc-enabled</pre><h2 id="run-a-node-on-ropsten-testnet">Run a Node on Ropsten Testnet</h2>
<p>Save a local copy of the <a href="https://github.com/PegaSysEng/pantheon/blob/master/config/src/main/resources/ropsten.json">Ropsten genesis file</a>. </p>
<p>To run a node on Ropsten: </p>
<pre class="hljs">docker run -p 30303:30303 --mount type=bind,source=/&lt;myvolume/pantheon/ropsten&gt;,target=/var/lib/pantheon --mount type=bind,source=/&lt;path&gt;/ropsten.json,target=/etc/pantheon/genesis.json pegasyseng/pantheon:latest --network-id=3 --bootnodes=enode://6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f@52.232.243.152:30303,enode://94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09@192.81.208.223:30303</pre><h2 id="run-a-node-on-rinkeby-testnet">Run a Node on Rinkeby Testnet</h2>
<p>To run a node on Rinkeby: </p>
<pre class="hljs">docker run -p 30303:30303 --mount type=bind,source=/&lt;myvolume/pantheon/rinkeby&gt;,target=/var/lib/pantheon pegasyseng/pantheon:latest --rinkeby</pre><h2 id="run-a-node-for-testing">Run a Node for Testing</h2>
<p>To run a node that mines blocks at a rate suitable for testing purposes with WebSockets enabled: </p>
<pre class="hljs">docker run -p 8546:8546 --mount type=bind,source=/&lt;myvolume/pantheon/testnode&gt;,target=/var/lib/pantheon pegasyseng/pantheon:latest --dev-mode --bootnodes= --miner-enabled --miner-coinbase fe3b557e8fb62b89f4916b721be55ceb828dbd73 --rpc-cors-origins "all" --ws-enabled</pre><h2 id="stopping-pantheon-and-cleaning-up-resources">Stopping Pantheon and Cleaning up Resources</h2>
<p>When you&#39;re done running nodes, you can shut down the node container without deleting resources. Alternatively, you can delete the container (after stopping it) and its associated volume. Run <code>docker container ls</code> and <code>docker volume ls</code> to obtain the container and volume names. Then run the following commands:</p>
<p>To stop a container:</p>
<pre class="hljs">docker stop &lt;container-name&gt;</pre><p>To delete a container:</p>
<pre class="hljs">docker rm &lt;container-name&gt;</pre><p>To delete a container volume (optional):</p>
<pre class="hljs">docker volume rm &lt;volume-name&gt;</pre><p class="page" id="NetworkID-And-ChainID"></p><h1>Network ID and Chain ID</h1>
<h1 id="network-id-and-chain-id">Network ID and Chain ID</h1>
<p>Ethereum networks have a network ID and a chain ID. The network ID is specified using the <code>--network-id</code> option and the chain ID is specified in the genesis file.</p>
<p>For most networks including mainnet and the public testnets, the network ID and the chain ID are the same. </p>
<p>The network ID is defined by Pantheon when connecting to the Ethereum mainnet (<code>1</code>), Rinkeby (<code>4</code>), and Ropsten(<code>3</code>).</p>
<p>When using the <code>--dev-mode</code> or <code>--genesis</code> options, specify the network ID using the <code>--network-id</code> option. </p>
<p class="page" id="Node-Keys"></p><h1>Node Keys</h1>
<h1 id="node-keys">Node Keys</h1>
<p>Each node has a node key pair consisting of a node private key and node public key. </p>
<h2 id="node-private-key">Node Private Key</h2>
<p>If a <code>key</code> file does not exist in the data directory and the <code>--node-private-key</code> option is not specified when Pantheon is started, a node private key is generated and written to the <code>key</code> file. If Pantheon is stopped and restarted without deleting the <code>key</code> file, the same private key is used when Pantheon is restarted.</p>
<p>If a <code>key</code> file exists in the data directory when Pantheon is started, the node is started with the private key in the <code>key</code> file. </p>
<blockquote>
<p><strong>Note</strong> The private key is not encrypted. </p>
</blockquote>
<h2 id="node-public-key">Node Public Key</h2>
<p>The node public key is displayed in the log after starting Pantheon. Use the <a href="#Pantheon-CLI-Syntaxcommands"><code>export-pub-key</code></a> subcommand to export the public key to a file. </p>
<p>The node public key is also referred to as the node ID. The node ID forms part of the <a href="#Testing-Developing-Nodesprivate-networks">enode URL</a> for a node. </p>
<h2 id="specifying-a-custom-node-private-key-file">Specifying a Custom Node Private Key File</h2>
<p>Use the <code>--node-private-key</code> option to specify a custom <code>key</code> file in any location. </p>
<p>If the <code>key</code> file exists, the node is started with the private key in the custom <code>key</code> file. If the custom <code>key</code> file does not exist, a node private key is generated and written to the custom <code>key</code> file.</p>
<p>For example, the following command either reads the node private key from the <code>privatekeyfile</code> or writes the generated private key to the <code>privatekeyfile</code>:</p>
<p><code>bin/pantheon --node-private-key &quot;/Users/username/privatekeyfile&quot;</code></p>
<p class="page" id="Networking"></p><h1>Networking</h1>
<h1 id="networking">Networking</h1>
<p>Pantheon uses the network to find and connect to peers. </p>
<h2 id="firewalls-and-incoming-connections">Firewalls and Incoming Connections</h2>
<p>The default logging configuration does not list node connection and disconnection messages. </p>
<p>To enable listing of node connection and disconnection messages, specify the command line option <code>--logging=DEBUG</code>. For more verbosity, specify <code>--logging=TRACE</code>. </p>
<p>The console logs connection and disconnection events when the log level is <code>DEBUG</code> or higher. If <code>Successfully accepted connection from ...</code> is displayed, connections are getting through the firewalls. For example:</p>
<pre class="hljs">2018-10-16 12:37:35.479-04:00 | nioEventLoopGroup-3-1 | <span class="hljs-builtin-name">INFO</span> | NettyP2PNetwork | Successfully accepted<span class="hljs-built_in"> connection </span><span class="hljs-keyword">from</span> 0xa979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c</pre><p>If connections are not getting through the firewalls, ensure the peer discovery port is open on your firewall. </p>
<h2 id="peer-discovery-port">Peer Discovery Port</h2>
<p>The <code>--p2p-listen</code> option specifies the host and port on which P2P peer discovery listens. The default is <code>127.0.0.1:30303</code>.</p>
<h2 id="limiting-peers">Limiting Peers</h2>
<p>Limiting peers reduces the bandwidth used by Pantheon. It also reduces the CPU time and disk access used to manage and respond to peers. </p>
<p>Use the <code>--max-peers</code> command line option to reduce the maximum number of peers. The default is 25.</p>
<p>Use the <code>--max-trailing-peers</code> option to reduce the maximum P2P peer connections for peers that are trailing behind the local chain head. The default is unlimited but the number of trailing peers cannot exceed the value specified by <code>--max-peers</code>.</p>
<p>Trailing peers cannot be used to get new blocks and are more likely to be requesting blocks from you. Limiting trailing peers may reduce the time taken to catch up to the chain head when synchronizing. </p>
<h2 id="no-discovery">No Discovery</h2>
<p>The <code>--no-discovery</code> command line option disables P2P peer discovery. Only use this option if you are running a test node or a test network with fixed nodes.</p>
<p class="page" id="Accounts-for-Testing"></p><h1>Accounts for Testing</h1>
<h3 id="accounts-for-testing">Accounts for Testing</h3>
<p>You can use existing accounts for testing by including them in the genesis file for a private network. Alternatively, Pantheon provides predefined accounts in development mode. </p>
<h4 id="development-mode">Development Mode</h4>
<p> When you start Pantheon with the <a href="#Pantheon-CLI-Syntax"><code>--dev-mode</code> command line option</a>, the <code>dev.json</code> genesis file is used by default. </p>
<p> The <code>dev.json</code> genesis file defines the accounts below that can be used for testing. </p>
<blockquote>
<p><strong>Warning</strong> Do not use the following accounts on mainnet or any public network except for testing. The private keys are displayed here so the accounts are not secure. </p>
</blockquote>
<h5 id="account-1-miner-coinbase-account-">Account 1 (Miner Coinbase Account)</h5>
<ul>
<li>Address: <code>0xfe3b557e8fb62b89f4916b721be55ceb828dbd73</code></li>
<li>Private key : <code>0x8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63</code></li>
<li><p>Initial balance : <code>0xad78ebc5ac6200000</code> (200000000000000000000 in decimal) </p>
<h5 id="account-2">Account 2</h5>
</li>
<li><p>Address: <code>0x627306090abaB3A6e1400e9345bC60c78a8BEf57</code></p>
</li>
<li>Private key : <code>0xc87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3</code></li>
<li><p>Initial balance : <code>0x90000000000000000000000</code> (2785365088392105618523029504 in decimal)</p>
<h5 id="account-3">Account 3</h5>
</li>
<li><p>Address: <code>0xf17f52151EbEF6C7334FAD080c5704D77216b732</code></p>
</li>
<li>Private key : <code>0xae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f</code></li>
<li><p>Initial balance : <code>0x90000000000000000000000</code> (2785365088392105618523029504 in decimal)</p>
<h4 id="genesis-file">Genesis File</h4>
</li>
</ul>
<p>To use existing test accounts, specify the accounts and balances in a genesis file for your test network. For an example of defining accounts in the genesis file, refer to <a href="https://github.com/PegaSysEng/pantheon/blob/master/config/src/main/resources/dev.json"><code>dev.json</code></a>.</p>
<p>Use the <a href="https://github.com/PegaSysEng/pantheon/wiki/Pantheon-CLI-Syntax"><code>--genesis</code> command line option</a> to start Pantheon with the genesis file defining the existing accounts. </p>
<p class="page" id="Logging"></p><h1>Logging</h1>
<h1 id="logging">Logging</h1>
<p>Pantheon uses Log4J2 for logging. There are two methods to configure logging behavior: </p>
<ul>
<li>Basic - changes the log level. </li>
<li>Advanced - configures the output and format of the logs. </li>
</ul>
<blockquote>
<p><strong>Note</strong> For most use-cases, the basic method provides sufficient configurability. </p>
</blockquote>
<h2 id="basic-log-level-setting">Basic Log Level Setting</h2>
<p>Use the <a href="#Pantheon-CLI-Syntax"><code>--logging</code> command line option</a> to specify the logging verbosity. The <code>--logging</code> option changes the volume of events displayed in the log. </p>
<h2 id="advanced-custom-logging">Advanced Custom Logging</h2>
<p>You can provide your own logging configuration using the standard Log4J2 configuration mechanisms. For example, the following Log4J2 configuration is the same as the <a href="https://github.com/PegaSysEng/pantheon/blob/master/pantheon/src/main/resources/log4j2.xml">default configuration</a> except logging of stack traces for exceptions is excluded.</p>
<pre class="hljs"><span class="hljs-meta">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">Configuration</span> <span class="hljs-attr">status</span>=<span class="hljs-string">"INFO"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">Properties</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">Property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"root.log.level"</span>&gt;</span>INFO<span class="hljs-tag">&lt;/<span class="hljs-name">Property</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">Properties</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">Appenders</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">Console</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"Console"</span> <span class="hljs-attr">target</span>=<span class="hljs-string">"SYSTEM_OUT"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">PatternLayout</span> <span class="hljs-attr">pattern</span>=<span class="hljs-string">"%d{yyyy-MM-dd HH:mm:ss.SSSZZZ} | %t | %-5level | %c{1} | %msg %throwable{short.message}%n"</span> /&gt;</span> <span class="hljs-tag">&lt;/<span class="hljs-name">Console</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">Appenders</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">Loggers</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">Root</span> <span class="hljs-attr">level</span>=<span class="hljs-string">"${sys:root.log.level}"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">AppenderRef</span> <span class="hljs-attr">ref</span>=<span class="hljs-string">"Console"</span> /&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">Root</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">Loggers</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">Configuration</span>&gt;</span></pre><p>To use your custom configuration, set the environment variable <code>LOG4J_CONFIGURATION_FILE</code> to the location of your configuration file. </p>
<p>If you have more specific requirements, you can create your own <a href="https://logging.apache.org/log4j/2.x/manual/configuration.html">log4j2 configuration</a>.</p>
<p>For Bash-based executions, you can set the variable for only the scope of the program execution by setting it before starting Pantheon. For example, to set the debug logging and start Pantheon connected to the Rinkeby testnet:</p>
<pre class="hljs">LOG4J_CONFIGURATION_FILE=./debug.xml bin/pantheon --rinkeby</pre><p class="page" id="Testing-Developing-Nodes"></p><h1>Testing and Developing Nodes</h1>
<h1 id="testing-and-developing-nodes">Testing and Developing Nodes</h1>
<h2 id="bootnodes">Bootnodes</h2>
<p>Bootnodes are used to initially discover peers. </p>
<h3 id="mainnet-and-public-testnets">Mainnet and Public Testnets</h3>
<p>For mainnet and Rinkeby, Pantheon predefines a list of enonde URLs. For Ropsten, bootnodes are specified using the <a href="#Starting-Pantheonrun-a-node-on-ropsten-testnet"><code>--bootnodes</code> option</a>. </p>
<h3 id="private-networks">Private Networks</h3>
<p>To start a bootnode for a private network:</p>
<ol>
<li><p>Export the public key to a file:</p>
<pre class="hljs">pantheon export-pub-key bootnode</pre><p>The node public key is exported to the <code>bootnode</code> file. </p>
</li>
<li><p>Start the bootnode, specifying:</p>
<ul>
<li>An empty string for the <code>--bootnodes</code> option because this is the bootnode. </li>
<li><p>The network ID for your private network. </p>
<pre class="hljs">pantheon --bootnodes="" --network-id 123 </pre></li>
</ul>
</li>
</ol>
<p>To specify this bootnode for another node, the enode URL for the <code>--bootnodes</code> option is <code>enode://&lt;id&gt;@&lt;host:port&gt;</code> where:</p>
<ul>
<li><code>&lt;id&gt;</code> is the node public key written to the specified file (<code>bootnode</code> in the above example) excluding the initial 0x. </li>
<li><code>&lt;host:port&gt;</code> is the host and port the bootnode is listening on for P2P peer discovery. Specified by the <code>--p2p-listen</code> option for the bootnode (default is <code>127.0.0.1:30303</code>).</li>
</ul>
<p>For example, if the <code>--p2p-listen</code> option is not specified and the node public key exported is <code>0xc35c3ec90a8a51fd5703594c6303382f3ae6b2ecb9589bab2c04b3794f2bc3fc2631dabb0c08af795787a6c004d8f532230ae6e9925cbbefb0b28b79295d615f</code></p>
<p>Then the enode URL is:
<code>enode://c35c3ec90a8a51fd5703594c6303382f3ae6b2ecb9589bab2c04b3794f2bc3fc2631dabb0c08af795787a6c004d8f532230ae6e9925cbbefb0b28b79295d615f@127.0.0.1:30303</code> </p>
<blockquote>
<p><strong>Note</strong> The default host and port for P2P peer discovery is <code>127.0.0.1:30303</code>. The <code>--p2p-listen</code> option can be used to specify a host and port. </p>
</blockquote>
<p>To start a node specifying the bootnode for P2P discovery:</p>
<pre class="hljs">pantheon --datadir=/tmp/pantheon/30301 --p2p-listen=127.0.0.1:30301 --network-id=123 --bootnodes=enode://c35c3ec90a8a51fd5703594c6303382f3ae6b2ecb99bab2c04b3794f2bc3fc2631dabb0c08af795787a6c004d8f532230ae6e9925cbbefb0b28b79295d615f@127.0.0.1:30303</pre><p class="page" id="Proof-of-Authority"></p><h1>Proof of Authority</h1>
<h2 id="proof-of-authority">Proof of Authority</h2>
<p>Pantheon implements the Clique Proof-of-Authority (PoA) consensus protocol. Clique is used by the Rinkeby testnet and can be used for private networks. </p>
<p>In PoA networks, transactions and blocks are validated by approved accounts, known as signers. Signers take turns to create the next block. Existing signers propose and vote to add or remove signers. </p>
<h3 id="initial-signers">Initial Signers</h3>
<p>Before starting a private network using Clique, create at least one </p>
<p>Specify at least 1 but preferably </p>
<ul>
<li>Must create 1 or more (preferably at least 3) private keys (Pantheon doesn&#39;t do account management so probably externally or start nodes with different data directories to get private key)</li>
<li>32 bytes/64 characters of vanity data</li>
<li>signers nX40 characters for each one - left pad with zeros</li>
<li>followed by 65 bytes/130 - usually this is the signature for the block but because this is the genesis block it&#39;s unsigned </li>
</ul>
<p>Then need to start network with the nodes specified as initial signers - refer to Node Keys topic. </p>
<p>Process as per Slack DM. Trent getting back to me. </p>
<h2 id="genesis-file">Genesis File</h2>
<p>To use Clique in a private network, Pantheon requires a PoA genesis file. When connecting to Rinkeby, Pantheon uses the <a href="https://github.com/PegaSysEng/pantheon/blob/master/ethereum/core/src/main/resources/rinkeby.json"><code>rinkeby.json</code></a> genesis file in the <code>/pantheon/ethereum/core/src/main/resources</code> directory.</p>
<p>A PoA genesis file defines properties specific to Clique:</p>
<pre class="hljs">{
"config": {
....
"clique": {
"period": 15,
"epoch": 30000
}
},
...
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000dd37f65db31c107f773e82a4f85c693058fef7a90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
...
}</pre><p>The properties specific to Clique are:</p>
<ul>
<li><code>period</code> - Block time in seconds. </li>
<li><code>epoch</code> - Number of blocks after which to reset all votes.</li>
<li><code>extraData</code> - Specifies <a href="#specifying-initial-signers">initial signers</a>. </li>
</ul>
<p>To connect to the Rinkeby testnet, start Pantheon with the <code>--rinkeby</code> option. To start a node on a PoA private network, use the <code>--network-id</code> and <code>--genesis</code> options. </p>
<h3 id="adding-and-removing-signers">Adding and Removing Signers</h3>
<p>To propose adding or removing signers using the JSON-RPC methods, you must enable the RPC interface using the <a href="#Pantheon-CLI-Syntaxoptions"><code>--rpc-enabled</code> option</a>. If also using the <a href="#Pantheon-CLI-Syntaxoptions"><code>--rpc-api</code> option</a>, include <code>CLIQUE</code>.</p>
<p>The JSON-RPC methods to add or remove signers are:</p>
<ul>
<li><a href="#JSON-RPC-APIclique_propose">clique_propose</a></li>
<li><a href="#JSON-RPC-APIclique_getsigners">clique_getSigners</a></li>
<li><a href="#JSON-RPC-APIclique_discard">clique_discard</a></li>
</ul>
<p>To propose adding a signer, call <code>clique_propose</code> specifying the address of the proposed signer and <code>true</code>. For example, </p>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"clique_propose","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73", true], "id":1}' &lt;JSON-RPC-endpoint:port&gt;</pre><p>When the next block is created by the signer, a vote is added to the block for the proposed signer. </p>
<p>When more than half of the existing signers propose adding the signer and their votes have been distributed in blocks, the signer is added and can begin signing blocks. </p>
<p>Use <code>clique_getSigners</code> to return a list of the signers and to confirm that your proposed signer has been added. </p>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"clique_getSigners","params":["latest"], "id":1}' &lt;JSON-RPC-endpoint:port&gt;</pre><p>To discard your proposal after confirming the signer was added, call <code>clique_discard</code> specifying the address of the proposed signer. For example:</p>
<pre class="hljs"> curl -X POST --data '{"jsonrpc":"2.0","method":"clique_discard","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73"], "id":1}' &lt;JSON-RPC-endpoint:port&gt;</pre><p>The process for removing a signer is the same as adding a signer except you specify <code>false</code> as the second parameter of <code>clique_propose</code>. </p>
<h4 id="epoch-transition">Epoch Transition</h4>
<p>At each epoch transition, all pending votes collected from received blocks are discarded. Existing proposals remain in effect and signers re-add their vote the next time they create a block. </p>
<p>Define the number of blocks between epoch transitions in the genesis file. </p>
<p class="page" id="Passing-JVM-Options"></p><h1>Passing JVM Options</h1>
<h1 id="passing-jvm-options-to-pantheon">Passing JVM Options to Pantheon</h1>
<p>To perform tasks such as attaching a debugger or configuring the garbage collector, pass JVM options to Pantheon. </p>
<p>Pantheon passes the contents of the <code>PANTHEON_OPTS</code> environmental variable to the JVM. Set standard JVM options in the <code>PANTHEON_OPTS</code> variable. </p>
<p>For Bash-based executions, you can set the variable for only the scope of the program execution by setting it before starting Pantheon. For example:</p>
<pre class="hljs">PANTHEON_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,<span class="hljs-built_in">suspend</span>=n,address=5005 bin/pantheon --rinkeby</pre><p class="page" id="Transactions"></p><h1>Creating and Sending Transactions</h1>
<h1 id="transactions">Transactions</h1>
<p>You can send signed transactions using the <a href="https://github.com/PegaSysEng/pantheon/wiki/JSON-RPC-API#eth_sendrawtransaction"><code>eth_sendRawTransaction</code></a> JSON-RPC API method.</p>
<p>These examples describe how to create a signed raw transaction that can be passed to <a href="https://github.com/PegaSysEng/pantheon/wiki/JSON-RPC-API#eth_sendrawtransaction"><code>eth_sendRawTransaction</code></a>.</p>
<p><strong>To avoid exposing your private keys, create signed transactions offline.</strong> </p>
<p>The examples use the following libraries to create signed transactions:</p>
<ul>
<li><a href="https://github.com/ethereum/web3.js/">https://github.com/ethereum/web3.js/</a></li>
<li><a href="https://github.com/ethereumjs/ethereumjs-tx">https://github.com/ethereumjs/ethereumjs-tx</a></li>
</ul>
<blockquote>
<p><strong>Note:</strong> Other libraries (such as <a href="https://github.com/web3j/web3j">webj3</a> or <a href="https://github.com/ethereum/ethereumj">ethereumj</a>) and tools (such as <a href="https://kb.myetherwallet.com/offline/making-offline-transaction-on-myetherwallet.html">MyEtherWallet</a> or <a href="https://mycrypto.com/">MyCrypto</a>) can also be used to create signed transactions. </p>
</blockquote>
<p>Example JS scripts are provided to create signed raw transaction strings to: </p>
<ul>
<li><a href="#sending-ether">Send ether</a></li>
<li><a href="#deploying-a-contract">Deploy a contract</a></li>
</ul>
<blockquote>
<p><strong>Note:</strong> <a href="https://nodejs.org/en/download/">Node.js</a> must be installed to run JS scripts. </p>
</blockquote>
<p>The example JS scripts can be used to create raw transactions to send in the private network created by the <a href="#Private-Network-Quickstartprivate-network-quickstart-tutorial">Private Network Quickstart</a>. The <code>JSON-RPC endpoint</code> in the examples must be updated to the endpoint for the private network displayed after running the <code>quickstart/runPantheonPrivateNetwork.sh</code> script. </p>
<p>To create and display the transaction string, run the JS script. For example:</p>
<p><code>node create_signed_raw_transaction.js</code></p>
<p>To send a signed transaction, run:</p>
<pre class="hljs">curl -X POST --data <span class="hljs-string">'{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["raw_transaction_string"],"id":1}'</span> &lt;JSON-RPC-endpoint:port&gt;</pre><p>Where:</p>
<ul>
<li><code>raw_transaction_string</code> is the signed raw transaction string displayed by the JS script. </li>
<li><code>&lt;JSON-RPC-endpoint:port&gt;</code> is the JSON-RPC endpoint.</li>
</ul>
<p>For example: </p>
<pre class="hljs">curl -X POST --data <span class="hljs-string">'{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xf86a808203e882520894f17f52151ebef6c7334fad080c5704d77216b732896c6b935b8bbd400000801ca08ce4a6c12f7f273321c5dc03910744f8fb11573fcce8140aa44486d385d22fb3a051f6bcc918bf3f12e06bfccfd1451bea5c517dffee0777ebd50caf177b17f383"],"id":1}'</span> http://localhost:8545</pre><p>All accounts and private keys in the examples are from the <code>dev.json</code> genesis file in the <code>/pantheon/ethereum/core/src/main/resources</code> directory.</p>
<h2 id="sending-ether">Sending Ether</h2>
<p>The following is an example of JavaScript that displays a signed transaction string to send ether. </p>
<pre class="hljs">const web3 = require(<span class="hljs-string">'web3'</span>)
const ethTx = require(<span class="hljs-string">'ethereumjs-tx'</span>)
// web3 initialization - must point to the HTTP JSON-RPC endpoint
const web3 = new Web3(new Web3.providers.HttpProvider(<span class="hljs-string">'http://127.0.0.1:8545'</span>))
// Sender address and private key
// Second acccount <span class="hljs-keyword">in</span> dev.json genesis file
// Exclude 0x at the beginning of the private key
const addressFrom = <span class="hljs-string">'0x627306090abaB3A6e1400e9345bC60c78a8BEf57'</span>
const privKey = Buffer.from(<span class="hljs-string">'c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3'</span>, <span class="hljs-string">'hex'</span>)
// Receiver address and value to transfer
// Third account <span class="hljs-keyword">in</span> dev.json genesis file
const addressTo = <span class="hljs-string">'0xf17f52151EbEF6C7334FAD080c5704D77216b732'</span>
const valueInEther = 2000
// Get the address transaction count <span class="hljs-keyword">in</span> order to specify the correct nonce
txnCount = web3.eth.getTransactionCount(addressFrom, <span class="hljs-string">"pending"</span>);
// Create the transaction object
var txObject = {
nonce: web3.toHex(txnCount),
gasPrice: web3.toHex(1000),
gasLimit: web3.toHex(21000),
to: addressTo,
value: web3.toHex(web3.toWei(valueInEther, <span class="hljs-string">'ether'</span>))
};
// Sign the transaction with the private key
const tx = new ethTx(txObject);
tx.sign(privKey)
//Convert to raw transaction string
const serializedTx = tx.serialize();
const rawTxHex = <span class="hljs-string">'0x'</span> + serializedTx.toString(<span class="hljs-string">'hex'</span>);
console.log(<span class="hljs-string">"Raw transaction string="</span> + rawTxHex)</pre><h2 id="deploying-a-contract">Deploying a Contract</h2>
<p>The following is an example of JavaScript that displays a signed raw transaction string to deploy a contract.</p>
<pre class="hljs">const web3 = require(<span class="hljs-string">'web3'</span>)
const ethTx = require(<span class="hljs-string">'ethereumjs-tx'</span>)
// web3 initialization - must point to the HTTP JSON-RPC endpoint
const web3 = new Web3(new Web3.providers.HttpProvider(<span class="hljs-string">'http://127.0.0.1:8545'</span>))
// Deployer address and private key
// First account <span class="hljs-keyword">in</span> the dev.json genesis file
const addressFrom = <span class="hljs-string">'0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73'</span>
const privKey = Buffer.from(<span class="hljs-string">'8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63'</span>, <span class="hljs-string">'hex'</span>)
// Compiled contract <span class="hljs-built_in">hash</span> - can obtain from Remix by clicking the Details button <span class="hljs-keyword">in</span> the Compile tab.
// Compiled contract <span class="hljs-built_in">hash</span> is value of data parameter <span class="hljs-keyword">in</span> the WEB3DEPLOY section
const contractData = <span class="hljs-string">'0x608060405234801561001057600080fd5b5060dc8061001f6000396000f3006080604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633fa4f24514604e57806355241077146076575b600080fd5b348015605957600080fd5b50606060a0565b6040518082815260200191505060405180910390f35b348015608157600080fd5b50609e6004803603810190808035906020019092919050505060a6565b005b60005481565b80600081905550505600a165627a7a723058202bdbba2e694dba8fff33d9d0976df580f57bff0a40e25a46c398f8063b4c00360029'</span>
// Get the address transaction count <span class="hljs-keyword">in</span> order to specify the correct nonce
txnCount = web3.eth.getTransactionCount(addressFrom, <span class="hljs-string">"pending"</span>);
var txObject = {
nonce: web3.toHex(txnCount),
gasPrice: web3.toHex(1000),
gasLimit: web3.toHex(126165),
data: contractData
};
const tx = new ethTx(txObject);
tx.sign(privKey)
const serializedTx = tx.serialize();
const rawTxHex = <span class="hljs-string">'0x'</span> + serializedTx.toString(<span class="hljs-string">'hex'</span>);
console.log(<span class="hljs-string">"Raw transaction string="</span> + rawTxHex); </pre><h2 id="eth_call-or-eth_sendrawtransaction">eth_call or eth_sendRawTransaction</h2>
<p>You can interact with contracts using <a href="#JSON-RPC-APIeth_call">eth_call</a> or <a href="#JSON-RPC-APIeth_sendrawtransaction">eth_sendRawTransaction</a>. </p>
<table>
<thead>
<tr>
<th>eth_call</th>
<th>eth_sendRawTransaction</th>
</tr>
</thead>
<tbody>
<tr>
<td>Read-only</td>
<td>Write</td>
</tr>
<tr>
<td>Invokes contract function locally</td>
<td>Broadcasts to network</td>
</tr>
<tr>
<td>Does not change state of blockchain</td>
<td>Updates blockchain (for example, transfers ether between accounts)</td>
</tr>
<tr>
<td>Does not consume gas</td>
<td>Requires gas</td>
</tr>
<tr>
<td>Synchronous</td>
<td>Asynchronous</td>
</tr>
<tr>
<td>Return value of contract function available immediately</td>
<td>Returns transaction hash only. Possible transaction may not be included in a block (for example, if the gas price is too low)</td>
</tr>
</tbody>
</table>
<p class="page" id="Account-Management"></p><h1>Using Wallets for Account Management</h1>
<h2 id="using-wallets-for-account-management">Using Wallets for Account Management</h2>
<p>Pantheon does not implement private key management. Use third-party tools (for example, <a href="https://consensys.zendesk.com/hc/en-us/articles/360004685212-Generating-MetaMask-Wallet-New-UI-">MetaMask</a> and <a href="https://web3j.io/">web3j</a>) for creating accounts. </p>
<p>In Pantheon, you can use the JSON-RPC methods:</p>
<ul>
<li><a href="#JSON-RPC-APIeth_getbalance">eth_getBalance</a> to obtain the account balance</li>
<li><a href="#JSON-RPC-APIeth_sendrawtransaction">eth_sendRawTransaction</a> to transfer ether or create and interact with contracts (for more information, refer to <a href="#Transactionstransactions">Transactions</a>). </li>
</ul>
<p class="page" id="Mining"></p><h1>Mining</h1>
<h1 id="mining">Mining</h1>
<p>Start Pantheon with the following options to enable mining: </p>
<pre class="hljs">bin/pantheon --miner-enabled --miner-coinbase &lt;account&gt;</pre><p>Where <code>&lt;account&gt;</code> is the account to which mining rewards are to be paid. For example, <code>fe3b557e8fb62b89f4916b721be55ceb828dbd73</code>.</p>
<p>JSON-RPC API methods for mining are: </p>
<ul>
<li><a href="#JSON-RPC-APIminer_start"><code>miner_start</code></a> to start mining. </li>
<li><a href="#JSON-RPC-APIminer_stop"><code>miner_stop</code></a> to stop mining. </li>
<li><a href="#JSON-RPC-APIeth_mining"><code>eth_mining</code></a> to determine whether the client is actively mining new blocks. </li>
</ul>
<p class="page" id="RPC-PubSub"></p><h1>RPC Pub/Sub</h1>
<h1 id="rpc-pub-sub">RPC Pub/Sub</h1>
<h2 id="contents">Contents</h2>
<ul>
<li>Event Publication and Subscription</li>
<li>Creating Subscriptions</li>
<li>Canceling Subscriptions</li>
</ul>
<h2 id="event-publication-and-subscription">Event Publication and Subscription</h2>
<p>Pantheon supports event publication and subscription with the RPC Pub/Sub methods. Using these methods, your client can wait for events instead of polling for them. You invoke the RPC Pub/Sub methods over WebSockets. (Note that these methods cannot be called over HTTP.)</p>
<ul>
<li>Your client calls <code>eth_subscribe</code> to create a subscription that waits for particular events.</li>
<li>Your client calls <code>eth_unsubscribe</code> to cancel an existing subscription.</li>
<li>The server invokes <code>eth_subscription</code> to publish (report) notifications of event occurrences to your client. Your client never calls this method.</li>
</ul>
<h3 id="subscriptions">Subscriptions</h3>
<p>When you subscribe to particular events (using <code>eth_subscribe</code>), the node returns a subscription ID. For each matching event that occurs, the node uses <code>eth_subscription</code> to return a notification with relevant data and the subscription ID.</p>
<p>Subscriptions require a full duplex connection, so you need to invoke the RPC Pub/Sub methods over WebSockets. You can use a tool such as <a href="https://github.com/websockets/wscat">wscat</a>, a Node.js based command-line tool.</p>
<p>Subscriptions are coupled to a connection. If the connection is closed, all subscriptions that have been created over this connection will be removed.</p>
<p>The types of events that you can subscribe to are:</p>
<h4 id="new-headers-newheads-">New Headers (newHeads)</h4>
<p>This subscription sends a notification each time a new header is appended to the chain. This includes chain reorganizations. You can use the bloom filter to determine if the block contains logs of interest. In case of a chain reorganization the subscription will emit all new headers for the new chain. Therefore the subscription can emit multiple headers on the same height.</p>
<p>You can filter blocks using elements from the <a href="https://github.com/PegaSysEng/pantheon/wiki/JSON-RPC-API#block-object">Block Object</a>. For example, you can use the <code>logsBloom</code> parameter to filter blocks containing logs of interest to you.</p>
<p>The following is an example of <code>newHeads</code> notifications:</p>
<pre class="hljs">&gt;&gt; {"id": 1, "method": "eth_subscribe", "params": ["newHeads"]}
&lt;&lt; {"jsonrpc":"2.0","id":2,"result":"0x1"}
&lt;&lt; {
"jsonrpc": "2.0",
"method": "eth_subscription",
"params": {
"result": {
"difficulty": "0x15d9223a23aa",
"extraData": "0xd983010305844765746887676f312e342e328777696e646f7773",
"gasLimit": "0x47e7c4",
"gasUsed": "0x38658",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"miner": "0xf8b483dba2c3b7176a3da549ad41a48bb3121069",
"nonce": "0x084149998194cc5f",
"number": "0x1348c9",
"parentHash": "0x7736fab79e05dc611604d22470dadad26f56fe494421b5b333de816ce1f25701",
"receiptRoot": "0x2fab35823ad00c7bb388595cb46652fe7886e00660a01e867824d3dceb1c8d36",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"stateRoot": "0xb3346685172db67de536d8765c43c31009d0eb3bd9c501c9be3229203f15f378",
"timestamp": "0x56ffeff8",
"transactionsRoot": "0x0167ffa60e3ebc0b080cdb95f7c0087dd6c0e61413140e39d94d3468d7c9689f"
},
"subscription": "0x1"
}
}</pre><h4 id="logs-logs-">Logs (logs)</h4>
<p>Returns logs included in new imported blocks and match the given filter criteria. In a chain reorganization, previous sent logs from the old chain are resent with the removed property set to <code>true</code>. Logs from transactions included in the new chain are sent. Therefore a subscription can send logs for the same transaction multiple times.</p>
<p><code>logs</code> subscriptions can take as a parameter an <code>object</code> with the following fields:</p>
<ul>
<li><code>address</code> - (optional) Either an address or an array of addresses. Returns only logs created from these addresses.</li>
<li><code>topics</code> - (optional) Returns only logs that match the specified topics.</li>
</ul>
<p>The following is an example of <code>logs</code> notifications:</p>
<pre class="hljs">&gt;&gt; {"id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "topics": ["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]}]}
&lt;&lt; {"jsonrpc":"2.0","id":2,"result":"0x3"}
&lt;&lt; {"jsonrpc":"2.0","method":"eth_subscription","params": {"subscription":"0x3","result":{"address":"0x8320fe7702b96808f7bbc0d4a888ed1468216cfd","blockHash":"0x61cdb2a09ab99abf791d474f20c2ea89bf8de2923a2d42bb49944c8c993cbf04","blockNumber":"0x29e87","data":"0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003","logIndex":"0x0","topics":["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"],"transactionHash":"0xe044554a0a55067caafd07f8020ab9f2af60bdfe337e395ecd84b4877a3d1ab4","transactionIndex":"0x0"}}}</pre><h4 id="pending-transactions-pendingtransactions-">Pending Transactions (pendingTransactions)</h4>
<p>Returns the hash of transactions in the pending state and signed with a key available in the node. If a transaction that was previously part of the canonical chain isn&#39;t in the new canonical chain after a reorganization, it will be sent again.</p>
<p><code>pendingTransactions</code> takes no parameters.</p>
<p>The returned data is a transaction hash.</p>
<p>The following is an example of <code>pendingTransactions</code> notifications:</p>
<pre class="hljs">&gt;&gt; {"id": 1, "method": "eth_subscribe", "params": ["pendingTransactions"]}
&lt;&lt; {"jsonrpc":"2.0","id":2,"result":"0x2"}
&lt;&lt; {
"jsonrpc":"2.0",
"method":"eth_subscription",
"params":{
"subscription":"0x2",
"result":"0xd6fdc5cc41a9959e922f30cb772a9aef46f4daea279307bc5f7024edc4ccd7fa"
}
}</pre><h4 id="syncing-syncing-">Syncing (syncing)</h4>
<p>Indicates whether the node is currently synchronizing. The result can either be a <code>boolean</code> indicating that the synchronization has finished (<code>false</code>) or an <code>object</code> with various progress indicators, indicating that synchronization is in progress.</p>
<pre class="hljs">&gt;&gt; {"id": 1, "method": "eth_subscribe", "params": ["syncing"]}
&lt;&lt; {"jsonrpc":"2.0","id":2,"result":"0x4"}
&lt;&lt; {
"jsonrpc":"2.0",
"method":"eth_subscription",
"params":{"subscription":"0x6",
"result":{"startingBlock":"0x0",
"currentBlock":"0x3e80",
"highestBlock":"0x67b93c"}
}
}</pre><h3 id="notifications">Notifications</h3>
<p>Notifications are sent for current events only, not past events.</p>
<p>Notifications are stored in an internal buffer to be sent to the client. If the client falls behind and the number of buffered notifications reaches a limit (currently 10k), the connection will be closed. Keep in mind that subscribing to certain events can cause a flood of notifications; for example, listening for all logs when the node synchronizes.</p>
<h2 id="creating-subscriptions">Creating Subscriptions</h2>
<p><code>eth_subscribe</code> creates a subscription that waits for particular events. If successful, it returns the subscription ID.</p>
<h4 id="parameters">Parameters</h4>
<p>When you call <code>eth_subscribe</code>, supply the type of event to subscribe to, plus optional arguments.</p>
<p><code>subscriptionType</code> : <code>string</code> - A type of event to which to subscribe:</p>
<ul>
<li><code>newHeads</code></li>
<li><code>logs</code></li>
<li><code>pendingTransactions</code></li>
<li><code>syncing</code></li>
</ul>
<p>Optional arguments are described above for each of the subscription types.</p>
<h4 id="returns">Returns</h4>
<p><code>subscriptionID</code> : - The ID of the subscription.</p>
<h4 id="request">Request</h4>
<pre class="hljs">&gt;&gt; {"id": 1, "method": "eth_subscribe", "params": ["newHeads", {"includeTransactions": true}]}</pre><h4 id="result">Result</h4>
<pre class="hljs">&lt;&lt; {"id": 1, "jsonrpc": "2.0", "result": "0x5"}</pre><h2 id="canceling-subscriptions">Canceling Subscriptions</h2>
<p><code>eth_unsubscribe</code> cancels an existing subscription. It returns a boolean indicating whether the subscription was cancelled successfully.</p>
<blockquote>
<p><strong>Note:</strong> Only the connection that created a subscription is able to unsubscribe from it. If another connection tries to unsubscribe, it will receive a <code>SubscriptionNotFound</code> response with no information about existing subscriptions.</p>
</blockquote>
<h4 id="parameters">Parameters</h4>
<p><code>subscriptionID</code> : - The ID of the subscription to cancel. You receive this ID from <code>eth_subscribe</code>.</p>
<h4 id="returns">Returns</h4>
<p><code>result</code> : <code>boolean</code> - <code>true</code> if the subscription was cancelled successfully; otherwise <code>false</code>.</p>
<h4 id="request">Request</h4>
<pre class="hljs">&gt;&gt; {"id": 1, "method": "eth_unsubscribe", "params": ["0x1"]}</pre><h4 id="result">Result</h4>
<pre class="hljs">&lt;&lt; {"jsonrpc":"2.0","id":1,"result":true}</pre><h2 id="publishing-subscriptions">Publishing Subscriptions</h2>
<p><code>eth_subscription</code> is the method the node uses to publish (report) notifications of event occurrences. You do not call this method. The node invokes <code>eth_subscription</code> to return a notification with relevant data and the subscription ID for each matching event that occurs.</p>
<h4 id="parameters">Parameters</h4>
<p>None</p>
<h4 id="returns">Returns</h4>
<p><code>subscription</code> : <code>string</code> - The subscription ID. </p>
<p><code>result</code> : <code>object</code> - An object containing relevant block data. For example, for pending transactions the returned data is a transaction hash. For detailed information on this data, see <a href="https://github.com/PegaSysEng/pantheon/wiki/JSON-RPC-API#block-object">Block Object</a>.</p>
<p class="page" id="Debugging"></p><h1>Debugging Pantheon</h1>
<h1 id="faq">FAQ</h1>
<h3 id="my-command-line-options-are-not-working-as-i-expected-">My command line options are not working as I expected?</h3>
<p>Ensure quotes have not been automatically converted to smart quotes or hyphens combined if copying and pasting. </p>
<p class="page" id="Pantheon-CLI-Syntax"></p><h1>Pantheon CLI Reference</h1>
<h2 id="pantheon-command-line-interface-reference">Pantheon Command Line Interface Reference</h2>
<p>This reference describes the syntax of the Pantheon Command Line Interface (CLI) options and subcommands.</p>
<pre class="hljs">pantheon <span class="hljs-string">[OPTIONS]</span> <span class="hljs-string">[COMMAND]</span></pre><p>Runs the Pantheon Ethereum full node client.</p>
<h2 id="options">Options</h2>
<dl>
<dt><code>--banned-nodeids=&lt;bannedNodeId&amp;gt[,&lt;bannedNodeId&gt;...]...</code></dt>
<dd>List of node IDs to ban from the P2P network. The node ID is the public key of the node. The banned node IDs can be specified with or without the <code>0x</code> prefix.</dd>
&gt;<strong>Note</strong> This option is only available from v0.8.2 or when <a href="#Installation">building from source</a>.
<dt><code>--bootnodes=&lt;enode://id@host:port&gt;[,&lt;enode://id@host:port&gt;...]...</code></dt>
<dd>List of comma-separated enode URLs for P2P discovery bootstrap. </dd>
<dd>When connecting to mainnet and Rinkeby, the default is a predefined list of enode URLs. Specify bootnodes when <a href="https://github.com/PegaSysEng/pantheon/wiki/Starting-Pantheon#run-a-node-on-ropsten-testnet">connecting to Ropsten</a> or a <a href="https://github.com/PegaSysEng/pantheon/wiki/Testing-Developing-Nodes#bootnodes">private network.</a></dd>
<br>
<dt><code>--config=&lt;PATH&gt;</code></dt>
<dd>The path to the TOML configuration file. The default is <code>none</code>. The TOML file is composed of key/value pairs. Each key is the same as the corresponding CLI option name without the leading dashes (<code>--</code>). The config option is not used in the config file. Values must be treated according to TOML specifications for string, numbers, arrays and Booleans.
Example:
<code># Valid TOML config file
datadir=&quot;~/pantheondata&quot; # Path
# Network
bootnodes=[&quot;enode://001@123:4567&quot;, &quot;enode://002@123:4567&quot;, &quot;enode://003@123:4567&quot;]
p2p-listen=&quot;1.2.3.4:1234&quot; # IP:port
max-peers=42
rpc-listen=&quot;5.6.7.8:5678&quot; # IP:port
ws-listen=&quot;9.10.11.12:9101&quot; # IP:port
# Chain
genesis=&quot;~/genesis.json&quot; # Path to the custom genesis file
sync-mode=&quot;fast&quot;# should be FAST or FULL (or fast or full)
# Mining
miner-enabled=true
miner-coinbase=&quot;0x0000000000000000000000000000000000000002&quot;</code>
</dd>
<br>
&gt; <strong>Note:</strong> This option is not used when running Pantheon from the <a href="#Run-Docker-Imagecustom-configuration-file">Docker image</a>.
<dt><code>--datadir=&lt;PATH&gt;</code></dt>
<dd>The path to the Pantheon data directory. The default location is the <code>/build/distributions/pantheon-<version></code> directory in the Pantheon installation directory.</dd>
&gt; <strong>Note:</strong> This option is not used when running Pantheon from the <a href="#Run-Docker-Imagepersisting-data">Docker image</a>.
<br>
<dt><code>--dev-mode</code></dt>
<dd>
Set this option to <code>true</code> to run in development mode. For example, specify this option to perform CPU mining more easily in a private test network. In development mode, a custom genesis configuration specifies the chain ID. When using this option, also set the <code>--network-id</code> option to the network you use for development. Default is <code>false</code>.
</dd>
&gt; <strong>Note:</strong> The <code>--dev-mode</code> option overrides the <code>--genesis</code> option. If both are specified, the development mode configuration is used.<br><br>
<dt><code>--genesis=&lt;PATH&gt;</code></dt>
<dd>The path to the genesis file. The default is the embedded genesis file for the Ethereum mainnet. When using this option, it is recommended to also set the <code>--network-id</code> option.</dd>
&gt; <strong>Note:</strong> This option is not used when running Pantheon from the <a href="#Run-Docker-Imagecustom-genesis-file">Docker image</a>.
&gt; <strong>Note:</strong> The <code>--genesis</code> option is overriden by the <code>--dev-mode</code> option. If both are specified, the specified genesis file is ignored and the development mode configuration used.
<br>
<dt><code>--max-peers=&lt;INTEGER&gt;</code></dt>
<dd>Specifies the maximum P2P peer connections that can be established. The default is 25.</dd>
<br>
<dt><code>--max-trailing-peers=&lt;INTEGER&gt;</code></dt>
<dd>Specifies the maximum P2P peer connections for peers that are trailing behind the local chain head. The default is unlimited but the number of trailing peers cannot exceed the value specified by <code>--max-peers</code>.</dd>
<br>
<dt><code>--miner-coinbase=&lt;Ethereum account address&gt;</code></dt>
<dd>The account to which mining rewards are to be paid. You must specify a coinbase if you enable mining.</dd>
<br>
<dt><code>--miner-enabled</code></dt>
<dd>Set this option to <code>true</code> when the node performs mining. The default is <code>false</code>.</dd>
<br>
<dt><code>--miner-extraData=&lt;Extra data&gt;</code></dt>
<dd>A hex string representing the 32 bytes to be included in the extra data field of a mined block. The default is 0x.</dd>
<br>
<dt><code>--miner-minTransactionGasPriceWei=&lt;minTransactionGasPrice&gt;</code></dt>
<dd>The minimum price that a transaction offers for it to be included in a mined block The default is 1000.</dd>
<br>
<dt><code>--network-id=&lt;INTEGER&gt;</code></dt>
<dd>P2P network identifier. The default is set to mainnet with value <code>1</code>.</dd>
<br>
<dt><code>--no-discovery</code></dt>
<dd>Disables P2P peer discovery. The default is <code>false</code>.</dd>
<br>
<dt><code>--node-private-key=&lt;PATH&gt;</code></dt>
<dd><code>&lt;PATH&gt;</code> is the path of the private key file of the node. The default is the key file in the data directory. If no key file exists, a key file containing the generated private key is created; otherwise, the existing key file specifies the node private key.
</dd>
&gt; <strong>Note</strong> The private key is not encrypted.
&gt;<strong>Note</strong> This option is only available from v0.8.2 or when <a href="#Installation">building from source</a>.
<br>
<dt><code>--ottoman</code></dt>
<dd>Synchronize against the Ottoman test network. This is only useful if you are using an IBFT genesis file. The default is <code>false</code>.</dd>
&gt; <strong>Note:</strong> IBFT is not currently supported. Support for IBFT is in active development.
<br>
<dt><code>--p2p-listen=&lt;HOST:PORT&gt;</code></dt>
<dd>Specifies the host and port on which P2P peer discovery listens. The default is 127.0.0.1:30303.</dd>
&gt; <strong>Note</strong> This option is not used when running Pantheon from the <a href="#Run-Docker-Imageexposing-ports">Docker image</a>.
<br>
<dt><code>--rinkeby</code></dt>
<dd>Uses the Rinkeby test network. Default is <code>false</code>.</dd>
<dt><code>--ropsten</code></dt>
<dd>Uses the Ropsten test network. Default is <code>false</code>.</dd>
&gt; <strong>Note</strong> This option is only available when <a href="#Installation">building from source</a>. For v0.8.1, refer <a href="#Starting-Pantheonrun-a-node-on-ropsten-testnet">here</a>.
<br>
<dt><code>--rpc-enabled</code></dt>
<dd>Set to <code>true</code> to enable the JSON-RPC service (RPC over HTTP). The default is <code>false</code>.</dd>
<br>
<dt><code>--rpc-listen=&lt;HOST:PORT&gt;</code></dt>
<dd>Specifies the host and port on which JSON-RPC listens. The default is 127.0.0.1:8545.</dd>
&gt; <strong>Note:</strong> This option is not used when running Pantheon from the <a href="#Run-Docker-Imageexposing-ports">Docker image</a>.
<br>
<dt><code>--rpc-api=&lt;api name&gt;[,<api name>...]...</code></dt>
<dd>Comma-separated APIs to enable on the JSON-RPC channel. When you use this option, the <code>--rpc-enabled</code> option must also be specified. The available API options are: <code>ETH</code>, <code>NET</code>, <code>WEB3</code>, <code>CLIQUE</code>, <code>IBFT</code>, <code>DEBUG</code>, and <code>MINER</code>. The default is: <code>ETH</code>, <code>NET</code>, <code>WEB3</code>, <code>CLIQUE</code>, <code>IBFT</code>.</dd>
&gt; <strong>Note:</strong> IBFT is not currently supported. Support for IBFT is in active development.
<br>
<dt><code>--rpc-cors-origins=&lt;rpcCorsAllowedOrigins&gt;</code></dt>
<dd>
Specifies domain URLs for CORS validation. Domain URLs must be enclosed in double quotes and comma-separated.
Listed domains will be allowed access to node data (whitelisted). If your client interacts with Pantheon using a browser app (such as Remix using a direct connection or a block explorer), you must whitelist the client domains. For example, the following allows Remix to interact with your Pantheon node without using MetaMask:
<code>--rpc-cors-origins &quot;http://remix.ethereum.org&quot;</code>
<strong>Note:</strong> MetaMask runs as native code so does not require CORS validation. If Remix is connecting to the node through MetaMask, it also does not require CORS validation.
The default value is <code>&quot;none&quot;</code>. If you don&#39;t whitelist any domains, you won&#39;t be able to use webapps to interact with your Pantheon node.
You can whitelist one or more domains with a comma-separated list. For example:
<code>--rpc-cors-origins &quot;http://foo.com, https://bar.io&quot;</code>
For development purposes, you can use <code>&quot;all&quot;</code> to accept requests from any domain, but we don&#39;t recommend this for production code.
</dd>
<br>
<dt><code>--ws-enabled</code></dt>
<dd>Set to <code>true</code> to enable the WS-RPC (WebSockets) service. The default is <code>false</code>.</dd>
<br>
<dt><code>--ws-api=&lt;api name&gt;[,<api name>...]...
</code></dt>
<dd>Comma-separated APIs to enable on Websockets channel. When you use this option, the <code>--ws-enabled</code> option must also be specified. The available API options are: <code>ETH</code>, <code>NET</code>, <code>WEB3</code>, <code>CLIQUE</code>, <code>IBFT</code>, <code>DEBUG</code>, and <code>MINER</code>. The default is: <code>ETH</code>, <code>NET</code>, <code>WEB3</code>, <code>CLIQUE</code>, <code>IBFT</code>.</dd>
&gt; <strong>Note:</strong> IBFT is not currently supported. Support for IBFT is in active development.
<br>
<dt><code> --ws-listen=&lt;HOST:PORT&gt;</code></dt>
<dd>Host and port for WS-RPC (Websocket) to listen on. The default is 127.0.0.1:8546.</dd>
&gt; <strong>Note:</strong> This option is not used when running Pantheon from the <a href="#Run-Docker-Imageexposing-ports">Docker image</a>.
<br>
<dt><code>-h, --help</code></dt>
<dd>Show the help message and exit.</dd>
<br>
<dt><code>-l, --logging=&lt;LEVEL&gt;</code></dt>
<dd>Sets the logging verbosity. Log levels are <code>OFF</code>, <code>FATAL</code>, <code>WARN</code>, <code>INFO</code>, <code>DEBUG</code>, <code>TRACE</code>, <code>ALL</code>. Default is <code>INFO</code>.</dd>
<br>
<dt><code>-V, --version</code></dt>
<dd>Print version information and exit.</dd>
</dl>
<hr>
<h2 id="commands">Commands</h2>
<p>Pantheon subcommands are: </p>
<ul>
<li><p><code>import</code></p>
<p> Imports blocks from the specified file into the blockchain database:</p>
<p> <code>pantheon import &lt;block-file&gt;</code></p>
</li>
<li><p><code>export-pub-key</code></p>
<p> Exports node public key to the specified file. </p>
<p> <code>pantheon export-pub-key &lt;key-file&gt;</code></p>
</li>
</ul>
<p><br></p>
<p>### </p>
<hr>
<p>Pantheon is licensed under Apache License 2.0.</p>
<p class="page" id="JSON-RPC-API"></p><h1>JSON-RPC API Reference</h1>
<h2 id="contents">Contents</h2>
<ul>
<li><a href="#pantheon-json-rpc-api">Pantheon JSON-RPC API</a></li>
<li><a href="#using-the-pantheon-json-rpc-api">Using the Pantheon JSON-RPC API</a><ul>
<li><a href="#endpoint-address-and-port">Endpoint Address and Port</a></li>
<li><a href="#http-and-websocket-requests">HTTP and WebSocket Requests</a></li>
<li><a href="#block-parameter">Block Parameter</a></li>
<li><a href="#json-rpc-methods">JSON-RPC Methods</a></li>
</ul>
</li>
<li><a href="#json-rpc-api-reference">JSON-RPC API Reference</a></li>
<li><a href="#objects">Object Reference</a></li>
</ul>
<h2 id="pantheon-json-rpc-api">Pantheon JSON-RPC API</h2>
<p>The Pantheon JSON-RPC API uses the <a href="http://json.org/">JSON</a> (RFC 4627) data format, which can represent objects and data fields as collections of name/value pairs, in a relatively readable, hierarchical form. Values have specific data types such as QUANTITIES (decimal integers, hexadecimal numbers, strings) and UNFORMATTED DATA (byte arrays, account addresses, hashes, and bytecode arrays).</p>
<p>RPC is the remote procedure call protocol (RFC 1831), which is stateless and transport agnostic in that the concepts can be used within the same process, over sockets, over HTTP, or in many various message passing environments.</p>
<h2 id="using-the-pantheon-json-rpc-api">Using the Pantheon JSON-RPC API</h2>
<h3 id="endpoint-address-and-port">Endpoint Address and Port</h3>
<p>In this reference, the placeholder
<code>&lt;JSON-RPC-http-endpoint:port&gt;</code> and <code>&lt;JSON-RPC-ws-endpoint:port&gt;</code> means an endpoint (IP address and port) of the JSON-RPC service of a Pantheon node respectively for http endpoint and for WebSocket endpoint.
To activate JSON-RPC using http or WebSocket, see <a href="https://github.com/PegaSysEng/pantheon/wiki/Pantheon-CLI-Syntax">--rpc-listen and --ws-listen options in the CLI documentation</a>.</p>
<p>The transport attributes are:</p>
<ul>
<li>HTTP: Listens by default on port 8545</li>
<li>WebSockets: Listens by default on port 8546</li>
</ul>
<h3 id="http-and-websocket-requests">HTTP and WebSocket Requests</h3>
<h4 id="http">HTTP</h4>
<p>To make RPC over HTTP requests, you can use the <code>curl</code> tool, available in many systems using <a href="https://curl.haxx.se/download.html">curl source code or pre-compiled packages</a>.</p>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":53}' &lt;JSON-RPC-http-endpoint:port&gt;</pre><h4 id="websockets">WebSockets</h4>
<p>To make requests over WebSockets, this reference uses <a href="https://github.com/websockets/wscat">wscat</a>, a Node.js based command-line tool.</p>
<p>First connect to the WebSockets server using <code>wscat</code> (you only need to connect once per session):</p>
<pre class="hljs">wscat -c ws://&lt;JSON-RPC-ws-endpoint:port&gt;</pre><p>After the connection is established, the terminal will display a &#39;&gt;&#39; prompt. Send individual requests as a JSON data package at each prompt:</p>
<pre class="hljs">{<span class="hljs-attr">"jsonrpc"</span>:<span class="hljs-string">"2.0"</span>,<span class="hljs-attr">"method"</span>:<span class="hljs-string">"web3_clientVersion"</span>,<span class="hljs-attr">"params"</span>:[],<span class="hljs-attr">"id"</span>:<span class="hljs-number">53</span>}</pre><h3 id="block-parameter">Block Parameter</h3>
<p>When you make requests that might have different results depending on the block accessed, the block parameter specifies the block. Several methods, such as <a href="#eth_gettransactionbyblocknumberandindex">eth_getTransactionByBlockNumberAndIndex</a>, have a block parameter.</p>
<p>The block parameter can have the following values:</p>
<ul>
<li><code>blockNumber</code> : <code>quantity</code> - Block number. Can be specified in hexadecimal or decimal. 0 represents the genesis block.</li>
<li><code>earliest</code> : <code>tag</code> - Earliest (genesis) block. </li>
<li><code>latest</code> : <code>tag</code> - Last block mined.</li>
<li><code>pending</code> : <code>tag</code> - Last block mined plus pending transactions. Use only with <a href="#eth_gettransactioncount">eth_getTransactionCount</a>. </li>
</ul>
<h2 id="not-supported-by-pantheon">Not Supported by Pantheon</h2>
<h3 id="account-management">Account Management</h3>
<p>Account management relies on private key management in the client which is not implemented by Pantheon. </p>
<p>Use <a href="#eth_sendrawtransaction"><code>eth_sendRawTransaction</code></a> to send signed transactions; <code>eth_sendTransaction</code> is not implemented. </p>
<p>Use third-party wallets for <a href="#Account-Management">account management</a>. </p>
<h3 id="protocols">Protocols</h3>
<p>Pantheon does not implement the Whisper and Swarm protocols. </p>
<h2 id="json-rpc-methods">JSON-RPC Methods</h2>
<p>The following lists the Pantheon JSON-RPC API commands:</p>
<h4 id="web3-methods">web3 Methods</h4>
<ul>
<li><a href="#web3_clientversion">web3_clientVersion</a></li>
<li><a href="#web3_sha3">web3_sha3</a></li>
</ul>
<h4 id="net-methods">net Methods</h4>
<ul>
<li><a href="#net_version">net_version</a></li>
<li><a href="#net_listening">net_listening</a></li>
<li><a href="#net_peercount">net_peerCount</a></li>
</ul>
<h4 id="eth-methods">eth Methods</h4>
<ul>
<li><a href="#eth_syncing">eth_syncing</a></li>
<li><a href="#eth_chainId">eth_chainId</a></li>
<li><a href="#eth_coinbase">eth_coinbase</a></li>
<li><a href="#eth_mining">eth_mining</a></li>
<li><a href="#eth_gasprice">eth_gasPrice</a></li>
<li><a href="#eth_accounts">eth_accounts</a></li>
<li><a href="#eth_blocknumber">eth_blockNumber</a></li>
<li><a href="#eth_getbalance">eth_getBalance</a></li>
<li><a href="#eth_getstorageat">eth_getStorageAt</a></li>
<li><a href="#eth_gettransactioncount">eth_getTransactionCount</a></li>
<li><a href="#eth_getblocktransactioncountbyhash">eth_getBlockTransactionCountByHash</a></li>
<li><a href="#eth_getblocktransactioncountbynumber">eth_getBlockTransactionCountByNumber</a></li>
<li><a href="#eth_getunclecountbyblockhash">eth_getUncleCountByBlockHash</a></li>
<li><a href="#eth_getunclecountbyblocknumber">eth_getUncleCountByBlockNumber</a></li>
<li><a href="#eth_getcode">eth_getCode</a></li>
<li><a href="#eth_sendrawtransaction">eth_sendRawTransaction</a></li>
<li><a href="#eth_call">eth_call</a></li>
<li><a href="#eth_estimategas">eth_estimateGas</a></li>
<li><a href="#eth_getblockbyhash">eth_getBlockByHash</a></li>
<li><a href="#eth_getblockbynumber">eth_getBlockByNumber</a></li>
<li><a href="#eth_gettransactionbyhash">eth_getTransactionByHash</a></li>
<li><a href="#eth_gettransactionbyblockhashandindex">eth_getTransactionByBlockHashAndIndex</a></li>
<li><a href="#eth_gettransactionbyblocknumberandindex">eth_getTransactionByBlockNumberAndIndex</a></li>
<li><a href="#eth_gettransactionreceipt">eth_getTransactionReceipt</a></li>
<li><a href="#eth_newfilter">eth_newFilter</a></li>
<li><a href="#eth_newblockfilter">eth_newBlockFilter</a></li>
<li><a href="#eth_newpendingtransactionfilter">eth_newPendingTransactionFilter</a></li>
<li><a href="#eth_uninstallfilter">eth_uninstallFilter</a></li>
<li><a href="#eth_getfilterchanges">eth_getFilterChanges</a></li>
<li><a href="#eth_getfilterlogs">eth_getFilterLogs</a></li>
<li><a href="#eth_getlogs">eth_getLogs</a></li>
<li><a href="#eth_getwork">eth_getWork</a></li>
</ul>
<h3 id="debug-methods">debug Methods</h3>
<ul>
<li><a href="#debug_tracetransaction">debug_TraceTransaction</a></li>
</ul>
<h3 id="miner-methods">miner Methods</h3>
<ul>
<li><a href="#miner_start">miner_start</a></li>
<li><a href="#miner_stop">miner_stop</a></li>
</ul>
<h3 id="clique-methods">clique Methods</h3>
<ul>
<li><a href="#clique_discard">clique_discard</a></li>
<li><a href="#clique_getsigners">clique_getSigners</a></li>
<li><a href="#clique_getsignersathash">clique_getSignersAtHash</a></li>
<li><a href="#clique_propose">clique_propose</a></li>
<li><a href="#clique_proposals">clique_proposals</a></li>
</ul>
<h4 id="ibft-methods">ibft Methods</h4>
<p>IBFT is not currently supported. Support for IBFT is in active development. </p>
<hr>
<h2 id="json-rpc-api-reference">JSON-RPC API Reference</h2>
<hr>
<h4 id="web3_clientversion">web3_clientVersion</h4>
<p>Returns the current client version.</p>
<h5 id="parameters">Parameters</h5>
<p>None</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <em>string</em> - Current client version.</p>
<h5 id="request-data">Request Data</h5>
<pre class="hljs">{<span class="hljs-attr">"jsonrpc"</span>:<span class="hljs-string">"2.0"</span>,<span class="hljs-attr">"method"</span>:<span class="hljs-string">"web3_clientVersion"</span>,<span class="hljs-attr">"params"</span>:[],<span class="hljs-attr">"id"</span>:<span class="hljs-number">53</span>}</pre><p>For an explanation of how to make an HTTP or WebSockets request using this data, see <a href="#http-and-websocket-requests">HTTP and WebSocket Requests</a>.</p>
<h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"pantheon/1.0.0"</span>
}</pre><hr>
<h4 id="web3_sha3">web3_sha3</h4>
<p>Returns a <a href="https://en.wikipedia.org/wiki/SHA-3">SHA3</a> hash of the specified data. The result value is a <a href="https://keccak.team/keccak.html">Keccak-256</a> hash, not the standardized SHA3-256.</p>
<h5 id="parameters">Parameters</h5>
<p><code>DATA</code> - Data to convert to a SHA3 hash.</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> (<em>DATA</em>) - SHA3 result of the input data.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"web3_sha3","params":["0x68656c6c6f20776f726c00"],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"0x5e39a0a66544c0668bde22d61c47a8710000ece931f13b84d3b2feb44ec96d3f"</span>
}</pre><hr>
<h4 id="net_version">net_version</h4>
<p>Returns the current chain ID.</p>
<h5 id="parameters">Parameters</h5>
<p>None</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <em>string</em> - Current chain ID.</p>
<ul>
<li><code>1</code> - Ethereum Mainnet</li>
<li><code>2</code> - Morden Testnet (deprecated)</li>
<li><code>3</code> - Ropsten Testnet</li>
<li><code>4</code> - Rinkeby Testnet</li>
<li><code>42</code> - Kovan Testnet</li>
</ul>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"net_version","params":[],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<p>Mainnet:</p>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">51</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"1"</span>
}</pre><p>Ropsten:</p>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"3"</span>
}</pre><hr>
<h4 id="net_listening">net_listening</h4>
<p>Indicates whether the client is actively listening for network connections.</p>
<h5 id="parameters">Parameters</h5>
<p>None</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> (<em>BOOLEAN</em>) - <code>true</code> if the client is actively listening for network connections; otherwise false.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"net_listening","params":[],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-literal">true</span>
}</pre><hr>
<h4 id="net_peercount">net_peerCount</h4>
<p>Returns the number of peers currently connected to the client.</p>
<h5 id="parameters">Parameters</h5>
<p>None</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <em>integer</em> - Number of connected peers in hexadecimal.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"0x5"</span>
}</pre><hr>
<h4 id="eth_syncing">eth_syncing</h4>
<p>Returns an object with data about the sync status, or FALSE if not syncing.</p>
<h5 id="parameters">Parameters</h5>
<p>None</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <em>Object|Boolean</em> - An object with sync status data or FALSE, when not syncing:</p>
<ul>
<li><code>startingBlock</code> : <em>QUANTITY</em> - The block at which the import started (will only be reset, after the sync reached his head).</li>
<li><code>currentBlock</code> : <em>QUANTITY</em> - The current block, same as <a href="#eth_blocknumber">eth_blockNumber</a>.</li>
<li><code>highestBlock</code>: <em>QUANTITY</em> - The estimated highest block.</li>
</ul>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":51}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">51</span>,
<span class="hljs-attr">"result"</span> : {
<span class="hljs-attr">"startingBlock"</span> : <span class="hljs-string">"0x1d4bff"</span>,
<span class="hljs-attr">"currentBlock"</span> : <span class="hljs-string">"0x1d4bff"</span>,
<span class="hljs-attr">"highestBlock"</span> : <span class="hljs-string">"0x0"</span>
}</pre><hr>
<h4 id="eth_chainid">eth_chainId</h4>
<p>Returns chain ID.</p>
<blockquote>
<p><strong>Note</strong> This method is only available from v0.8.2 or when <a href="#Installation">building from source</a>. </p>
</blockquote>
<h5 id="parameters">Parameters</h5>
<p>None</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <em>quantity</em> - Chain ID in hexadecimal.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":51}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">51</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"0x7e2"</span>
}</pre><hr>
<h4 id="eth_coinbase">eth_coinbase</h4>
<p>Returns the client coinbase address.</p>
<p>To set a coinbase address, call the pantheon CLI with the <code>--miner-coinbase</code> option set to a valid Ethereum account address. You can get the Ethereum account address from a client such as MetaMask or Etherscan. For example:</p>
<pre class="hljs">bin/pantheon --genesis=/home/donn/pantheon/ethereum/core/src/main/resources/ropsten.json --miner-coinbase=<span class="hljs-string">"0xDD37f65dB31c107F773E82a4F85C693058fEf7a9"</span> --dev-mode=<span class="hljs-literal">true</span> --rpc-enabled</pre><h5 id="parameters">Parameters</h5>
<p>None</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> (<em>DATA, 20 bytes</em>) - Current coinbase address.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_coinbase","params":[],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"0xdd37f65db31c107f773e82a4f85c693058fef7a9"</span>
}</pre><h5 id="errors">Errors</h5>
<p>If you have not specified a coinbase, you will receive this message:</p>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"error"</span> : {
<span class="hljs-attr">"code"</span> : <span class="hljs-number">-32000</span>,
<span class="hljs-attr">"message"</span> : <span class="hljs-string">"Coinbase must be explicitly specified"</span>
}
}</pre><hr>
<h4 id="eth_mining">eth_mining</h4>
<p>Indicates whether the client is actively mining new blocks. Mining is paused while the client synchronizes with the network regardless of command settings or methods called. </p>
<h5 id="parameters">Parameters</h5>
<p>None</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> (<em>BOOLEAN</em>) - <code>true</code> if the client is actively mining new blocks; otherwise <code>false</code>.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_mining","params":[],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-literal">true</span>
}</pre><hr>
<h4 id="eth_gasprice">eth_gasPrice</h4>
<p>Returns the current gas unit price in wei.</p>
<h5 id="parameters">Parameters</h5>
<p>None</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> (<em>QUANTITY</em>) - Integer value representing the current gas unit price in wei.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"0x3e8"</span>
}</pre><hr>
<h4 id="eth_accounts">eth_accounts</h4>
<p>Returns a list of account addresses that the client owns.</p>
<p><strong>NOTE:</strong> This method returns an empty object because Pantheon <a href="#account-management-not-supported-by-pantheon">does not support account management</a>.</p>
<h5 id="parameters">Parameters</h5>
<p>None</p>
<h5 id="returns">Returns</h5>
<p><code>Array of data</code> : List of 20-byte account addresses owned by the client.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span> : [ ]
}</pre><hr>
<h4 id="eth_blocknumber">eth_blockNumber</h4>
<p>Returns the index of the current block the client is processing.</p>
<h5 id="parameters">Parameters</h5>
<p>None</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <em>QUANTITY</em> - Hexadecimal integer representing the 0-based index of the block that the client is currently processing.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":51}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">51</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"0x2377"</span>
}</pre><hr>
<h4 id="eth_getbalance">eth_getBalance</h4>
<p>Returns the account balance of the specified address.</p>
<h5 id="parameters">Parameters</h5>
<p><code>DATA</code> - 20-byte account address from which to retrieve the balance.</p>
<p><code>QUANTITY|TAG</code> - Integer representing a block number or one of the string tags <code>latest</code>, <code>earliest</code>, or <code>pending</code>, as described in <a href="#block-parameter">Block Parameter</a>.</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <em>QUANTITY</em> - Integer value of the current balance in wei.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xdd37f65db31c107f773e82a4f85c693058fef7a9", "latest"],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"0x0"</span>
}</pre><hr>
<h4 id="eth_getstorageat">eth_getStorageAt</h4>
<p>Returns the value of a storage position at a specified address.</p>
<h5 id="parameters">Parameters</h5>
<p><code>DATA</code> - A 20-byte storage address.</p>
<p><code>QUANTITY</code> - Integer index of the storage position.</p>
<p><code>QUANTITY|TAG</code> - Integer representing a block number or one of the string tags <code>latest</code>, <code>earliest</code>, or <code>pending</code>, as described in <a href="#block-parameter">Block Parameter</a>.</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <em>DATA</em> - The value at the specified storage position.</p>
<h5 id="request">Request</h5>
<p>Calculating the correct position depends on the storage you want to retrieve.</p>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method": "eth_getStorageAt","params": ["0x3B3F3E","0x0","latest"],"id": 53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"0x0000000000000000000000000000000000000000000000000000000000000000"</span>
}</pre><hr>
<h4 id="eth_gettransactioncount">eth_getTransactionCount</h4>
<p>Returns the number of transactions sent from a specified address.</p>
<h5 id="parameters">Parameters</h5>
<p><code>DATA</code> - 20-byte account address.</p>
<p><code>QUANTITY|TAG</code> - Integer representing a block number or one of the string tags <code>latest</code>, <code>earliest</code>, or <code>pending</code>, as described in <a href="#block-parameter">Block Parameter</a>.</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <em>QUANTITY</em> - Integer representing the number of transactions sent from the specified address.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0xc94770007dda54cF92009BFF0dE90c06F603a09f","latest"],"id":1}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">1</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"0x1"</span>
}</pre><hr>
<h4 id="eth_getblocktransactioncountbyhash">eth_getBlockTransactionCountByHash</h4>
<p>Returns the number of transactions in the block matching the given block hash.</p>
<h5 id="parameters">Parameters</h5>
<p><code>DATA</code> - 32-byte block hash.</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <em>QUANTITY</em> - Integer representing the number of transactions in the specified block.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params":["0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-literal">null</span>
}</pre><hr>
<h4 id="eth_getblocktransactioncountbynumber">eth_getBlockTransactionCountByNumber</h4>
<p>Returns the number of transactions in a block matching the specified block number.</p>
<h5 id="parameters">Parameters</h5>
<p><code>QUANTITY|TAG</code> - Integer representing a block number or one of the string tags <code>latest</code>, <code>earliest</code>, or <code>pending</code>, as described in <a href="#block-parameter">Block Parameter</a>.</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <em>QUANTITY</em> - Integer representing the number of transactions in the specified block.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params":["0xe8"],"id":51}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">51</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"0x8"</span>
}</pre><hr>
<h4 id="eth_getunclecountbyblockhash">eth_getUncleCountByBlockHash</h4>
<p>Returns the number of uncles in a block from a block matching the given block hash.</p>
<h5 id="parameters">Parameters</h5>
<p><code>DATA</code> - 32-byte block hash.</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <em>QUANTITY</em> - Integer representing the number of uncles in the specified block.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params":["0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"],"id":1}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">1</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-literal">null</span>
}</pre><hr>
<h4 id="eth_getunclecountbyblocknumber">eth_getUncleCountByBlockNumber</h4>
<p>Returns the number of uncles in a block matching the specified block number.</p>
<h5 id="parameters">Parameters</h5>
<p><code>QUANTITY|TAG</code> - Integer representing either the 0-based index of the block within the blockchain, or one of the string tags <code>latest</code>, <code>earliest</code>, or <code>pending</code>, as described in <a href="#block-parameter">Block Parameter</a>.</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <em>QUANTITY</em> - Integer representing the number of uncles in the specified block.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params":["0xe8"],"id":1}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">1</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"0x1"</span>
}</pre><hr>
<h4 id="eth_getcode">eth_getCode</h4>
<p>Returns the code of the smart contract at the specified address. Compiled smart contract code is stored as a hexadecimal value. </p>
<h5 id="parameters">Parameters</h5>
<p><code>DATA</code> - 20-byte contract address.</p>
<p><code>QUANTITY|TAG</code> - Integer representing a block number or one of the string tags <code>latest</code>, <code>earliest</code>, or <code>pending</code>, as described in <a href="#block-parameter">Block Parameter</a>.</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <em>DATA</em> - Code stored at the specified address.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getCode","params":["0xa50a51c09a5c451c52bb714527e1974b686d8e77", "latest"],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span>: <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span>: <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span>: <span class="hljs-string">"0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029"</span>
}</pre><hr>
<h4 id="eth_sendrawtransaction">eth_sendRawTransaction</h4>
<p>Sends a signed transaction. A transaction can send ether, deploy a contract, or interact with a contract. </p>
<p>You can interact with contracts using <a href="#Transactionseth_call-or-eth_sendrawtransaction">eth_sendRawTransaction or eth_call</a>.</p>
<p>To avoid exposing your private key, create signed transactions offline and send the signed transaction data using this method. For information on creating signed transactions and using <code>eth_sendRawTransaction</code>, refer to <a href="#Transactions">Using Pantheon</a>. </p>
<p><strong>Note: Pantheon does not implement <a href="#account-management-not-supported-by-pantheon">eth_sendTransaction</a>.</strong> </p>
<h5 id="parameters">Parameters</h5>
<p><code>DATA</code> - Hash of the signed raw transaction in hexadecimal format; for example:</p>
<pre class="hljs">params: ["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"]</pre><h5 id="returns">Returns</h5>
<p><code>result</code> : <code>DATA</code> - 32-byte transaction hash, or zero hash if the transaction is not yet available.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"],"id":1}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"id"</span>:<span class="hljs-number">1</span>,
<span class="hljs-attr">"jsonrpc"</span>: <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"result"</span>: <span class="hljs-string">"0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"</span>
}</pre><hr>
<h4 id="eth_call">eth_call</h4>
<p>Invokes a contract function locally and does not change the state of the blockchain. </p>
<p>You can interact with contracts using <a href="#Transactionseth_call-or-eth_sendrawtransaction">eth_sendRawTransaction or eth_call</a>.</p>
<h5 id="parameters">Parameters</h5>
<p><em>OBJECT</em> - <a href="#transaction-call-object">Transaction call object</a>.</p>
<p><em>QUANTITY|TAG</em> - Integer representing a block number or one of the string tags <code>latest</code>, <code>earliest</code>, or <code>pending</code>, as described in <a href="#block-parameter">Block Parameter</a>.</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> (<em>DATA</em>) - Return value of the executed contract.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13","value":"0x1"}, "latest"],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span>: <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span>: <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span>: <span class="hljs-string">"0x"</span>
}</pre><hr>
<h4 id="eth_estimategas">eth_estimateGas</h4>
<p>Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. (Per Etherscan: gas price * gas used.) The transaction is added to the blockchain. The estimate may be significantly more than the amount of gas actually used by the transaction for reasons including EVM mechanics and node performance.</p>
<h5 id="parameters">Parameters</h5>
<blockquote>
<p><strong>NOTE:</strong> Parameters are the same as the eth_call parameters, except that all properties are optional. If you do not specify a <code>gas</code> limit, Pantheon uses the gas limit from the pending block as an upper bound. As a result, the returned estimate might not be enough to execute the call or transaction when the amount of gas is higher than the pending block&#39;s gas limit.</p>
</blockquote>
<p><em>OBJECT</em> - <a href="#transaction-call-object">Transaction call object</a>.</p>
<p><em>QUANTITY|TAG</em> - Integer representing a block number or one of the string tags <code>latest</code>, <code>earliest</code>, or <code>pending</code>, as described in <a href="#block-parameter">Block Parameter</a>.</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> (<em>QUANTITY</em>) - Amount of gas used.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_estimateGas","params":[{"from":"0x687422eea2cb73b5d3e242ba5456b782919afc85","to":"0xdd37f65db31c107f773e82a4f85c693058fef7a9","value":"0x1"}],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<p>The following result yields a gas amount estimate of 21000 wei (0x5208) for the transaction.</p>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">54</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"0x5208"</span>
}</pre><hr>
<h4 id="eth_getblockbyhash">eth_getBlockByHash</h4>
<p>Returns information about the block by hash.</p>
<h5 id="parameters">Parameters</h5>
<p><code>DATA</code> - 32-byte hash of a block.</p>
<p><code>Boolean</code> - If <code>true</code>, returns the full <a href="#transaction-object">transaction objects</a>; if <code>false</code>, returns the transaction hashes.</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <em>OBJECT</em> - <a href="#block-object">Block object</a> , or <code>null</code> when no block is found. </p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0x16b69965a5949262642cfb5e86368ddbbe57ab9f17d999174a65fd0e66580d8f", false],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span> : {
<span class="hljs-attr">"number"</span> : <span class="hljs-string">"0x7"</span>,
<span class="hljs-attr">"hash"</span> : <span class="hljs-string">"0x16b69965a5949262642cfb5e86368ddbbe57ab9f17d999174a65fd0e66580d8f"</span>,
<span class="hljs-attr">"parentHash"</span> : <span class="hljs-string">"0xe9bd4b277983580ef0eabad6011891f8b6aff9381a78bd1c4faca374a48b3e09"</span>,
<span class="hljs-attr">"nonce"</span> : <span class="hljs-string">"0x46acb59e85b5bb6d"</span>,
<span class="hljs-attr">"sha3Uncles"</span> : <span class="hljs-string">"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"</span>,
<span class="hljs-attr">"logsBloom"</span> : <span class="hljs-string">"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"</span>,
<span class="hljs-attr">"transactionsRoot"</span> : <span class="hljs-string">"0x7aa0913c235f272eb6ed6ab74ba5a057e0a62c1c1d1dbccfd971221e6b6e83a3"</span>,
<span class="hljs-attr">"stateRoot"</span> : <span class="hljs-string">"0xfaf6520d6e3d24107a4309855593341ab87a1744dbb6eea4e709b92e9c9107ca"</span>,
<span class="hljs-attr">"receiptsRoot"</span> : <span class="hljs-string">"0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2"</span>,
<span class="hljs-attr">"miner"</span> : <span class="hljs-string">"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"</span>,
<span class="hljs-attr">"difficulty"</span> : <span class="hljs-string">"0x5"</span>,
<span class="hljs-attr">"totalDifficulty"</span> : <span class="hljs-string">"0x10023"</span>,
<span class="hljs-attr">"extraData"</span> : <span class="hljs-string">"0x"</span>,
<span class="hljs-attr">"size"</span> : <span class="hljs-string">"0x270"</span>,
<span class="hljs-attr">"gasLimit"</span> : <span class="hljs-string">"0x1000000"</span>,
<span class="hljs-attr">"gasUsed"</span> : <span class="hljs-string">"0x5208"</span>,
<span class="hljs-attr">"timestamp"</span> : <span class="hljs-string">"0x5bbbe99f"</span>,
<span class="hljs-attr">"uncles"</span> : [ ],
<span class="hljs-attr">"transactions"</span> : [ <span class="hljs-string">"0x2cc6c94c21685b7e0f8ddabf277a5ccf98db157c62619cde8baea696a74ed18e"</span> ]
}
}</pre><hr>
<h4 id="eth_getblockbynumber">eth_getBlockByNumber</h4>
<p>Returns information about a block by block number.</p>
<h5 id="parameters">Parameters</h5>
<p><code>QUANTITY|TAG</code> - Integer representing a block number or one of the string tags <code>latest</code>, <code>earliest</code>, or <code>pending</code>, as described in <a href="#block-parameter">Block Parameter</a>.</p>
<p><code>Boolean</code> - If <code>true</code>, returns the full <a href="#transaction-object">transaction objects</a>; if <code>false</code>, returns only the hashes of the transactions.</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <em>OBJECT</em> - <a href="#block-object">Block object</a> , or <code>null</code> when no block is found. </p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x64", true],"id":1}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">1</span>,
<span class="hljs-attr">"result"</span> : {
<span class="hljs-attr">"number"</span> : <span class="hljs-string">"0x64"</span>,
<span class="hljs-attr">"hash"</span> : <span class="hljs-string">"0xdfe2e70d6c116a541101cecbb256d7402d62125f6ddc9b607d49edc989825c64"</span>,
<span class="hljs-attr">"parentHash"</span> : <span class="hljs-string">"0xdb10afd3efa45327eb284c83cc925bd9bd7966aea53067c1eebe0724d124ec1e"</span>,
<span class="hljs-attr">"nonce"</span> : <span class="hljs-string">"0x37129c7f29a9364b"</span>,
<span class="hljs-attr">"sha3Uncles"</span> : <span class="hljs-string">"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"</span>,
<span class="hljs-attr">"logsBloom"</span> : <span class="hljs-string">"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"</span>,
<span class="hljs-attr">"transactionsRoot"</span> : <span class="hljs-string">"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"</span>,
<span class="hljs-attr">"stateRoot"</span> : <span class="hljs-string">"0x90c25f6d7fddeb31a6cc5668a6bba77adbadec705eb7aa5a51265c2d1e3bb7ac"</span>,
<span class="hljs-attr">"receiptsRoot"</span> : <span class="hljs-string">"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"</span>,
<span class="hljs-attr">"miner"</span> : <span class="hljs-string">"0xbb7b8287f3f0a933474a79eae42cbca977791171"</span>,
<span class="hljs-attr">"difficulty"</span> : <span class="hljs-string">"0x42be722b6"</span>,
<span class="hljs-attr">"totalDifficulty"</span> : <span class="hljs-string">"0x19b5afdc486"</span>,
<span class="hljs-attr">"extraData"</span> : <span class="hljs-string">"0x476574682f4c5649562f76312e302e302f6c696e75782f676f312e342e32"</span>,
<span class="hljs-attr">"size"</span> : <span class="hljs-string">"0x21e"</span>,
<span class="hljs-attr">"gasLimit"</span> : <span class="hljs-string">"0x1388"</span>,
<span class="hljs-attr">"gasUsed"</span> : <span class="hljs-string">"0x0"</span>,
<span class="hljs-attr">"timestamp"</span> : <span class="hljs-string">"0x55ba43eb"</span>,
<span class="hljs-attr">"uncles"</span> : [ ],
<span class="hljs-attr">"transactions"</span> : [ ]
}
}</pre><hr>
<h4 id="eth_gettransactionbyhash">eth_getTransactionByHash</h4>
<p>Returns transaction information for the specified transaction hash.</p>
<h5 id="parameters">Parameters</h5>
<p><code>DATA</code> - 32-byte transaction hash.</p>
<h5 id="returns">Returns</h5>
<p>Object - <a href="#transaction-object">Transaction object</a>, or <code>null</code> when no transaction is found.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span> : {
<span class="hljs-attr">"blockHash"</span> : <span class="hljs-string">"0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda"</span>,
<span class="hljs-attr">"blockNumber"</span> : <span class="hljs-string">"0x422"</span>,
<span class="hljs-attr">"from"</span> : <span class="hljs-string">"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"</span>,
<span class="hljs-attr">"gas"</span> : <span class="hljs-string">"0x5208"</span>,
<span class="hljs-attr">"gasPrice"</span> : <span class="hljs-string">"0x3b9aca00"</span>,
<span class="hljs-attr">"hash"</span> : <span class="hljs-string">"0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"</span>,
<span class="hljs-attr">"input"</span> : <span class="hljs-string">"0x"</span>,
<span class="hljs-attr">"nonce"</span> : <span class="hljs-string">"0x1"</span>,
<span class="hljs-attr">"to"</span> : <span class="hljs-string">"0x627306090abab3a6e1400e9345bc60c78a8bef57"</span>,
<span class="hljs-attr">"transactionIndex"</span> : <span class="hljs-string">"0x0"</span>,
<span class="hljs-attr">"value"</span> : <span class="hljs-string">"0x4e1003b28d9280000"</span>,
<span class="hljs-attr">"v"</span> : <span class="hljs-string">"0xfe7"</span>,
<span class="hljs-attr">"r"</span> : <span class="hljs-string">"0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3"</span>,
<span class="hljs-attr">"s"</span> : <span class="hljs-string">"0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"</span>
}
}</pre><hr>
<h4 id="eth_gettransactionbyblockhashandindex">eth_getTransactionByBlockHashAndIndex</h4>
<p>Returns transaction information for the specified block hash and transaction index position.</p>
<h5 id="parameters">Parameters</h5>
<p><code>DATA</code> - 32-byte hash of a block.</p>
<p><code>QUANTITY</code> - Integer representing the transaction index position.</p>
<h5 id="returns">Returns</h5>
<p>Object - <a href="#transaction-object">Transaction object</a>, or <code>null</code> when no transaction is found.</p>
<h5 id="request">Request</h5>
<p>This request returns the 3rd transaction in the 82990 block on the Ropsten testnet. You can also view this <a href="https://ropsten.etherscan.io/txs?block=82990">block</a> and <a href="https://ropsten.etherscan.io/tx/0xfc766a71c406950d4a4955a340a092626c35083c64c7be907060368a5e6811d6">transaction</a> on Etherscan. </p>
<p><strong>Note:</strong> You must be synchronized to at least the block containing the transaction for the request to return it. </p>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params":["0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7", "0x2"], "id":1}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">1</span>,
<span class="hljs-attr">"result"</span> : {
<span class="hljs-attr">"blockHash"</span> : <span class="hljs-string">"0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7"</span>,
<span class="hljs-attr">"blockNumber"</span> : <span class="hljs-string">"0x1442e"</span>,
<span class="hljs-attr">"from"</span> : <span class="hljs-string">"0x70c9217d814985faef62b124420f8dfbddd96433"</span>,
<span class="hljs-attr">"gas"</span> : <span class="hljs-string">"0x3d090"</span>,
<span class="hljs-attr">"gasPrice"</span> : <span class="hljs-string">"0x57148a6be"</span>,
<span class="hljs-attr">"hash"</span> : <span class="hljs-string">"0xfc766a71c406950d4a4955a340a092626c35083c64c7be907060368a5e6811d6"</span>,
<span class="hljs-attr">"input"</span> : <span class="hljs-string">"0x51a34eb8000000000000000000000000000000000000000000000029b9e659e41b780000"</span>,
<span class="hljs-attr">"nonce"</span> : <span class="hljs-string">"0x2cb2"</span>,
<span class="hljs-attr">"to"</span> : <span class="hljs-string">"0xcfdc98ec7f01dab1b67b36373524ce0208dc3953"</span>,
<span class="hljs-attr">"transactionIndex"</span> : <span class="hljs-string">"0x2"</span>,
<span class="hljs-attr">"value"</span> : <span class="hljs-string">"0x0"</span>,
<span class="hljs-attr">"v"</span> : <span class="hljs-string">"0x2a"</span>,
<span class="hljs-attr">"r"</span> : <span class="hljs-string">"0xa2d2b1021e1428740a7c67af3c05fe3160481889b25b921108ac0ac2c3d5d40a"</span>,
<span class="hljs-attr">"s"</span> : <span class="hljs-string">"0x63186d2aaefe188748bfb4b46fb9493cbc2b53cf36169e8501a5bc0ed941b484"</span>
}
}</pre><hr>
<h4 id="eth_gettransactionbyblocknumberandindex">eth_getTransactionByBlockNumberAndIndex</h4>
<p>Returns transaction information for the specified block number and transaction index position.</p>
<h5 id="parameters">Parameters</h5>
<p><code>QUANTITY|TAG</code> - Integer representing a block number or one of the string tags <code>latest</code>, <code>earliest</code>, or <code>pending</code>, as described in <a href="#block-parameter">Block Parameter</a>.</p>
<p><code>QUANTITY</code> - The transaction index position.</p>
<h5 id="returns">Returns</h5>
<p>Object - <a href="#transaction-object">Transaction object</a>, or <code>null</code> when no transaction is found.</p>
<h5 id="request">Request</h5>
<p>This request returns the 3rd transaction in the 82990 block on the Ropsten testnet. You can also view this <a href="https://ropsten.etherscan.io/txs?block=82990">block</a> and <a href="https://ropsten.etherscan.io/tx/0xfc766a71c406950d4a4955a340a092626c35083c64c7be907060368a5e6811d6">transaction</a> on Etherscan. </p>
<p><strong>Note:</strong> You must be synchronized to at least the block containing the transaction for the request to return it.</p>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params":["82990", "0x2"], "id":1}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">1</span>,
<span class="hljs-attr">"result"</span> : {
<span class="hljs-attr">"blockHash"</span> : <span class="hljs-string">"0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7"</span>,
<span class="hljs-attr">"blockNumber"</span> : <span class="hljs-string">"0x1442e"</span>,
<span class="hljs-attr">"from"</span> : <span class="hljs-string">"0x70c9217d814985faef62b124420f8dfbddd96433"</span>,
<span class="hljs-attr">"gas"</span> : <span class="hljs-string">"0x3d090"</span>,
<span class="hljs-attr">"gasPrice"</span> : <span class="hljs-string">"0x57148a6be"</span>,
<span class="hljs-attr">"hash"</span> : <span class="hljs-string">"0xfc766a71c406950d4a4955a340a092626c35083c64c7be907060368a5e6811d6"</span>,
<span class="hljs-attr">"input"</span> : <span class="hljs-string">"0x51a34eb8000000000000000000000000000000000000000000000029b9e659e41b780000"</span>,
<span class="hljs-attr">"nonce"</span> : <span class="hljs-string">"0x2cb2"</span>,
<span class="hljs-attr">"to"</span> : <span class="hljs-string">"0xcfdc98ec7f01dab1b67b36373524ce0208dc3953"</span>,
<span class="hljs-attr">"transactionIndex"</span> : <span class="hljs-string">"0x2"</span>,
<span class="hljs-attr">"value"</span> : <span class="hljs-string">"0x0"</span>,
<span class="hljs-attr">"v"</span> : <span class="hljs-string">"0x2a"</span>,
<span class="hljs-attr">"r"</span> : <span class="hljs-string">"0xa2d2b1021e1428740a7c67af3c05fe3160481889b25b921108ac0ac2c3d5d40a"</span>,
<span class="hljs-attr">"s"</span> : <span class="hljs-string">"0x63186d2aaefe188748bfb4b46fb9493cbc2b53cf36169e8501a5bc0ed941b484"</span>
}
}</pre><hr>
<h4 id="eth_gettransactionreceipt">eth_getTransactionReceipt</h4>
<p>Returns the receipt of a transaction by transaction hash. Receipts for pending transactions are not available.</p>
<h5 id="parameters">Parameters</h5>
<p><code>DATA</code> - 32-byte hash of a transaction.</p>
<h5 id="returns">Returns</h5>
<p><code>Object</code> - <a href="#transaction-receipt-object">Transaction receipt object</a>, or <code>null</code> when no receipt is found.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span>: <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span>: <span class="hljs-number">1</span>,
<span class="hljs-attr">"result"</span>: {
<span class="hljs-attr">"blockHash"</span>: <span class="hljs-string">"0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a"</span>,
<span class="hljs-attr">"blockNumber"</span>: <span class="hljs-string">"0x50"</span>,
<span class="hljs-attr">"contractAddress"</span>: <span class="hljs-literal">null</span>,
<span class="hljs-attr">"cumulativeGasUsed"</span>: <span class="hljs-string">"0x5208"</span>,
<span class="hljs-attr">"from"</span>: <span class="hljs-string">"0x627306090abab3a6e1400e9345bc60c78a8bef57"</span>,
<span class="hljs-attr">"gasUsed"</span>: <span class="hljs-string">"0x5208"</span>,
<span class="hljs-attr">"logs"</span>: [],
<span class="hljs-attr">"logsBloom"</span>: <span class="hljs-string">"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"</span>,
<span class="hljs-attr">"status"</span>: <span class="hljs-string">"0x1"</span>,
<span class="hljs-attr">"to"</span>: <span class="hljs-string">"0xf17f52151ebef6c7334fad080c5704d77216b732"</span>,
<span class="hljs-attr">"transactionHash"</span>: <span class="hljs-string">"0xc00e97af59c6f88de163306935f7682af1a34c67245e414537d02e422815efc3"</span>,
<span class="hljs-attr">"transactionIndex"</span>: <span class="hljs-string">"0x0"</span>
}
}</pre><hr>
<h4 id="eth_newfilter">eth_newFilter</h4>
<p>Creates a topic filter with the specified options to notify (log) when the state changes. To determine whether the state has changed, call <a href="#eth_getfilterchanges">eth_getFilterChanges</a>.</p>
<h5 id="parameters">Parameters</h5>
<p><code>Object</code> - <a href="#filter-options-object">Filter options object</a>. </p>
<p><strong>Note:</strong> Topics are order-dependent. A transaction with a log containing topics <code>[A, B]</code> would be matched with the following topic filters:</p>
<ul>
<li>[] - Match any topic</li>
<li>[A] - Match A in first position (and any topic thereafter)</li>
<li>[null, B] - Match any topic in first position AND B in second position (and any topic thereafter)</li>
<li>[A, B] - Match A in first position AND B in second position (and any topic thereafter)</li>
<li>[[A, B], [A, B]] - Match (A OR B) in first position AND (A OR B) in second position (and any topic thereafter)</li>
</ul>
<p>For example, params could be specified as follows:</p>
<pre class="hljs">params: [{
"fromBlock": "earliest",
"toBlock": "0x4",
"address": "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
"topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]
}]</pre><h5 id="returns">Returns</h5>
<p><code>result</code> : <em>QUANTITY</em> - The filter ID.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_newFilter","params":[{"topics":[]}],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"0x3"</span>
}</pre><p>Invalid params error:</p>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_newFilter","params":[{"fromBlock": "earliest","toBlock": "latest","address": "0xDD37f65dB31c107F773E82a4F85C693058fEf7a9","topics": []}],"id":53}' 127.0.0.1:8545
{
"jsonrpc" : "2.0",
"id" : 53,
"error" : {
"code" : -32602,
"message" : "Invalid params"
}
}</pre><hr>
<h4 id="eth_newblockfilter">eth_newBlockFilter</h4>
<p>Creates a filter in the node that notifies when a new block arrives. To determine whether the state has changed, call <a href="#eth_getfilterchanges">eth_getFilterChanges</a>.</p>
<h5 id="parameters">Parameters</h5>
<p>None</p>
<h5 id="returns">Returns</h5>
<p><code>QUANTITY</code> - Hexadecimal integer filter ID. Each time you call this method, it creates a new filter, and the index is incremented by 1.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_newBlockFilter","params":[],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<p>Assuming you have previously called <code>eth_newBlockFilter</code> two times, it will assign a filter ID of 3:</p>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"0x3"</span>
}</pre><hr>
<h4 id="eth_newpendingtransactionfilter">eth_newPendingTransactionFilter</h4>
<p>Creates a filter in the node that notifies when new pending transactions arrive. To check if the state has changed, call <a href="#eth_getfilterchanges">eth_getFilterChanges</a>.</p>
<h5 id="parameters">Parameters</h5>
<p>None</p>
<h5 id="returns">Returns</h5>
<p><code>QUANTITY</code> - Hexadecimal integer filter ID. Each time you call this method, it creates a new filter, and the index is incremented by 1.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_newPendingTransactionFilter","params":[],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<p>Assuming you have previously called <code>eth_newBlockFilter</code> three times, it will assign a filter ID of 4:</p>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-string">"0x4"</span>
}</pre><hr>
<h4 id="eth_uninstallfilter">eth_uninstallFilter</h4>
<p>Uninstalls a filter with the specified ID. This method should always be called when notification is no longer needed. Note that filters time out when they are not requested with <a href="#eth_getfilterchanges">eth_getFilterChanges</a> for a period of time.</p>
<p>This method deletes filters of any type: block filters, pending transaction filters, and state (topic) filters.</p>
<h5 id="parameters">Parameters</h5>
<p><code>QUANTITY</code> - Hexadecimal integer filter ID specifying the filter to be deleted.</p>
<h5 id="returns">Returns</h5>
<p><code>Boolean</code> - <code>true</code> if the filter was successfully uninstalled; otherwise <code>false</code>.</p>
<h5 id="request">Request</h5>
<p>The following request deletes the block filter with an ID of 0x4:</p>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_uninstallFilter","params":["0x4"],"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-literal">true</span>
}</pre><hr>
<h4 id="eth_getfilterchanges">eth_getFilterChanges</h4>
<p>Polls the specified filter and returns an array of logs that have occurred since the last poll.</p>
<h5 id="parameters">Parameters</h5>
<p><code>QUANTITY</code> - Hexadecimal integer filter ID.</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <code>Array of Object</code> - List of logs, or an empty array if nothing has changed since the last poll.</p>
<ul>
<li><p>For filters created with <code>eth_newBlockFilter</code>, returns 32-byte <em>DATA</em> block hashes; for example <code>[&quot;0x3454645634534...&quot;]</code>.</p>
</li>
<li><p>For filters created with <code>eth_newPendingTransactionFilter</code>, returns transaction hashes (32-byte <em>DATA</em>); for example <code>[&quot;0x6345343454645...&quot;]</code>.</p>
</li>
<li><p>For filters created with <code>eth_newFilter</code>, returns <a href="#log-object">log objects</a>. </p>
</li>
</ul>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0xa"]:"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<p>The following response indicates that nothing has changed since the last poll:</p>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">53</span>,
<span class="hljs-attr">"result"</span> : [ ]
}</pre><hr>
<h4 id="eth_getfilterlogs">eth_getFilterLogs</h4>
<p>Returns an array of logs matching the filter with the specified ID.</p>
<h5 id="parameters">Parameters</h5>
<p><code>QUANTITY</code> - Integer representing the filter ID.</p>
<h5 id="returns">Returns</h5>
<p>Same as <a href="#eth_getfilterchanges">eth_getFilterChanges</a>.</p>
<h5 id="request">Request</h5>
<p>The following example requests logs for filter ID 0x16 (22 decimal):</p>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getFilterLogs","params":["0x3"]"id":53}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">1</span>,
<span class="hljs-attr">"result"</span> : [ {
<span class="hljs-attr">"logIndex"</span> : <span class="hljs-string">"0x0"</span>,
<span class="hljs-attr">"removed"</span> : <span class="hljs-literal">false</span>,
<span class="hljs-attr">"blockNumber"</span> : <span class="hljs-string">"0x14427"</span>,
<span class="hljs-attr">"blockHash"</span> : <span class="hljs-string">"0x677bf4b962464e6dfd548d6a30b6c703dd78c7cc3602825a7013a6e90a001d2a"</span>,
<span class="hljs-attr">"transactionHash"</span> : <span class="hljs-string">"0x7bf9876a9de3c0add38495e21a17b96c81b3f18e0990a4a3aecdf9f47fea0eed"</span>,
<span class="hljs-attr">"transactionIndex"</span> : <span class="hljs-string">"0x0"</span>,
<span class="hljs-attr">"address"</span> : <span class="hljs-string">"0xe8fe77d1576d0972d453b49bfaa84d716173d133"</span>,
<span class="hljs-attr">"data"</span> : <span class="hljs-string">"0x0000000000000000000000001046c9bdec0e634fbd7cf91afebd93cc854432b10000000000000000000000002101416eeaf73acb66d124f79efde9631662a83a0000000000000000000000006f72045702a34c473da863945221965c61528bd3"</span>,
<span class="hljs-attr">"topics"</span> : [ <span class="hljs-string">"0xc36800ebd6079fdafc3a7100d0d1172815751804a6d1b7eb365b85f6c9c80e61"</span>, <span class="hljs-string">"0x000000000000000000000000b344324aa2a82a6fda8459e40923e1fd65bfac36"</span> ]
} ]
}</pre><hr>
<h4 id="eth_getlogs">eth_getLogs</h4>
<p>Returns an array of all logs matching a specified filter object.</p>
<h5 id="parameters">Parameters</h5>
<p><code>Object</code> - <a href="#filter-options-object">Filter options object</a></p>
<h5 id="returns">Returns</h5>
<p>Same as <a href="#eth_getfilterchanges">eth_getFilterChanges</a>.</p>
<h5 id="request">Request</h5>
<p>The request above returns the logs for the 82893 block on the Ropsten testnet. You can also view this <a href="https://ropsten.etherscan.io/block/82983">block</a> on Etherscan. </p>
<p><strong>Note:</strong> You must be synchronised to at least the requested block for the request to return the logs.</p>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockhash":"0x677bf4b962464e6dfd548d6a30b6c703dd78c7cc3602825a7013a6e90a001d2a"}], "id":1}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">1</span>,
<span class="hljs-attr">"result"</span> : [ {
<span class="hljs-attr">"logIndex"</span> : <span class="hljs-string">"0x0"</span>,
<span class="hljs-attr">"removed"</span> : <span class="hljs-literal">false</span>,
<span class="hljs-attr">"blockNumber"</span> : <span class="hljs-string">"0x14427"</span>,
<span class="hljs-attr">"blockHash"</span> : <span class="hljs-string">"0x677bf4b962464e6dfd548d6a30b6c703dd78c7cc3602825a7013a6e90a001d2a"</span>,
<span class="hljs-attr">"transactionHash"</span> : <span class="hljs-string">"0x7bf9876a9de3c0add38495e21a17b96c81b3f18e0990a4a3aecdf9f47fea0eed"</span>,
<span class="hljs-attr">"transactionIndex"</span> : <span class="hljs-string">"0x0"</span>,
<span class="hljs-attr">"address"</span> : <span class="hljs-string">"0xe8fe77d1576d0972d453b49bfaa84d716173d133"</span>,
<span class="hljs-attr">"data"</span> : <span class="hljs-string">"0x0000000000000000000000001046c9bdec0e634fbd7cf91afebd93cc854432b10000000000000000000000002101416eeaf73acb66d124f79efde9631662a83a0000000000000000000000006f72045702a34c473da863945221965c61528bd3"</span>,
<span class="hljs-attr">"topics"</span> : [ <span class="hljs-string">"0xc36800ebd6079fdafc3a7100d0d1172815751804a6d1b7eb365b85f6c9c80e61"</span>, <span class="hljs-string">"0x000000000000000000000000b344324aa2a82a6fda8459e40923e1fd65bfac36"</span> ]
} ]
}</pre><hr>
<h4 id="eth_getwork">eth_getWork</h4>
<p>Returns the hash of the current block, the seed hash, and the target boundary condition to be met.</p>
<h5 id="parameters">Parameters</h5>
<p>None</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <code>Array of DATA</code> with the following fields:</p>
<ul>
<li>DATA, 32 Bytes - Hash of the current block header (pow-hash).</li>
<li>DATA, 32 Bytes - The seed hash used for the DAG.</li>
<li>DATA, 32 Bytes - The target boundary condition to be met; 2^256 / difficulty.</li>
</ul>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getWork","params":[],"id":1}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"id"</span>:<span class="hljs-number">1</span>,
<span class="hljs-attr">"jsonrpc"</span>:<span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"result"</span>: [
<span class="hljs-string">"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"</span>,
<span class="hljs-string">"0x5EED00000000000000000000000000005EED0000000000000000000000000000"</span>,
<span class="hljs-string">"0xd1ff1c01710000000000000000000000d1ff1c01710000000000000000000000"</span>
]
}</pre><h4 id="clique_discard">clique_discard</h4>
<p>Discards a proposal to add or remove a signer with the specified address. </p>
<h5 id="parameters">Parameters</h5>
<p><code>data</code> - 20-byte address of proposed signer. </p>
<h5 id="returns">Returns</h5>
<p><code>result: boolean</code> - <code>true</code> </p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"clique_discard","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73"], "id":1}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">1</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-literal">true</span>
}</pre><h4 id="clique_getsigners">clique_getSigners</h4>
<p>Lists signers for the specified block. </p>
<h5 id="parameters">Parameters</h5>
<p><code>quantity|tag</code> - Integer representing a block number or one of the string tags <code>latest</code>, <code>earliest</code>, or <code>pending</code>, as described in <a href="#default-block-parameter">Default Block Parameter</a>. </p>
<h5 id="returns">Returns</h5>
<p><code>result: array of data</code> - List of 20-byte addresses of signers. </p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"clique_getSigners","params":["latest"], "id":1}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">1</span>,
<span class="hljs-attr">"result"</span> : [ <span class="hljs-string">"0x42eb768f2244c8811c63729a21a3569731535f06"</span>, <span class="hljs-string">"0x7ffc57839b00206d1ad20c69a1981b489f772031"</span>, <span class="hljs-string">"0xb279182d99e65703f0076e4812653aab85fca0f0"</span> ]
}</pre><h4 id="clique_getsignersathash">clique_getSignersAtHash</h4>
<p>Lists signers for the specified block.</p>
<h5 id="parameters">Parameters</h5>
<p><code>data</code> - 32-byte block hash. </p>
<h5 id="returns">Returns</h5>
<p><code>result: array of data</code> - List of 20-byte addresses of signers.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"clique_getSignersAtHash","params":["0x98b2ddb5106b03649d2d337d42154702796438b3c74fd25a5782940e84237a48"], "id":1}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">1</span>,
<span class="hljs-attr">"result"</span> : [ <span class="hljs-string">"0x42eb768f2244c8811c63729a21a3569731535f06"</span>, <span class="hljs-string">"0x7ffc57839b00206d1ad20c69a1981b489f772031"</span>, <span class="hljs-string">"0xb279182d99e65703f0076e4812653aab85fca0f0"</span> ]
}</pre><h4 id="clique_propose">clique_propose</h4>
<p>Proposes adding or removing a signer with the specified address. </p>
<h5 id="parameters">Parameters</h5>
<p><code>data</code> - 20-byte address.</p>
<p><code>boolean</code> - <code>true</code> to propose adding signer or <code>false</code> to propose removing signer. </p>
<h5 id="returns">Returns</h5>
<p><code>result: boolean</code> - <code>true</code> </p>
<h6 id="request">Request</h6>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"clique_propose","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73", true], "id":1}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span> : <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span> : <span class="hljs-number">1</span>,
<span class="hljs-attr">"result"</span> : <span class="hljs-literal">true</span>
}</pre><h4 id="clique_proposals">clique_proposals</h4>
<p>Returns current proposals. </p>
<h5 id="parameters">Parameters</h5>
<p>None</p>
<h5 id="returns">Returns</h5>
<p><code>result</code>:<em>object</em> - Map of account addresses to corresponding boolean values indicating the proposal for each account. </p>
<p>If the boolean value is <code>true</code>, the proposal is to add a signer. If <code>false</code>, the proposal is to remove a signer. </p>
<h6 id="request">Request</h6>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"clique_proposals","params":[], "id":1}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{
<span class="hljs-attr">"jsonrpc"</span>: <span class="hljs-string">"2.0"</span>,
<span class="hljs-attr">"id"</span>: <span class="hljs-number">1</span>,
<span class="hljs-attr">"result"</span>: {
<span class="hljs-attr">"0x42eb768f2244c8811c63729a21a3569731535f07"</span>: <span class="hljs-literal">false</span>,
<span class="hljs-attr">"0x12eb759f2222d7711c63729a45c3585731521d01"</span>: <span class="hljs-literal">true</span>
}
}</pre><hr>
<h4 id="debug_tracetransaction">debug_traceTransaction</h4>
<p>Attempts to run the transaction as it was executed on the network. It will replay transactions that might already have been executed before it attempts to execute the transaction that corresponds to the specified hash.</p>
<p>You can use this method with tools such as Remix when you want to execute a transaction step-by-step.</p>
<h5 id="parameters">Parameters</h5>
<p><code>transactionHash</code> : <code>data</code> - The transaction hash.</p>
<p><code>options</code> : <code>string</code> - (Optional) Specifies request options as follows:</p>
<ul>
<li><code>disableStorage</code> : <code>BOOL</code> - <code>true</code> disables storage capture. The default is <code>false</code>.</li>
<li><code>disableMemory</code> : <code>BOOL</code> - <code>true</code> disables memory capture. The default is <code>false</code>.</li>
<li><code>disableStack</code> : <code>BOOL</code> - <code>true</code> disables stack capture. The default is <code>false</code>.</li>
<li><code>tracer</code> : <code>STRING</code> - A tracer object that enables JavaScript-based transaction tracing. If you specify a tracer object, the previous four arguments are ignored. A tracer object has two methods, <code>step</code> and <code>result</code>:<ul>
<li><code>step</code> is a function that takes two arguments, <code>log</code> and <code>db</code>. This function is called for each step of the EVM, or when an error occurs, as the specified transaction is traced.</li>
<li><code>log</code> has the following fields:<ul>
<li><code>pc</code> : <code>number</code> - The current program counter.</li>
<li><code>op</code> : <code>object</code> - An <code>OpCode</code> object representing the current opcode.</li>
<li><code>gas</code> : <code>number</code> - The amount of gas remaining.</li>
<li><code>gasPrice</code> : <code>number</code> - The cost in wei of each unit of gas.</li>
<li><code>memory</code> : <code>object</code> - A structure representing the contract&#39;s memory space.</li>
<li><code>stack</code> : <code>array[big.Int]</code> - The EVM execution stack.</li>
<li><code>depth</code> : <code>number</code> - The execution depth.</li>
<li><code>account</code> : <code>data</code> - The address of the account executing the current operation.</li>
<li><code>err</code> : If an error occured, this field contains information about the error. If <code>err</code> is non-null, you can ignore all other fields.</li>
</ul>
</li>
</ul>
</li>
<li><code>timeout</code> : <code>STRING</code> - A duration string that overrides the default timeout of 5 seconds for JavaScript-based tracing calls. A duration string is a signed sequence of decimal numbers, each with an optional fraction and a unit suffix, such as &quot;300ms&quot;, &quot;-1.5h&quot; or &quot;2h45m&quot;. Valid time units are &quot;ns&quot;, &quot;us&quot; (or &quot;µs&quot;), &quot;ms&quot;, &quot;s&quot;, &quot;m&quot;, &quot;h&quot;.</li>
</ul>
<h5 id="returns">Returns</h5>
<p>A <code>tracer</code> object, as described above.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"debug_traceTransaction","params”:[“0xaaaaaaaaaaaaaaaaaaa”,{“disableStorage":true}],"id”:1}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{...}</pre><hr>
<h4 id="miner_start">miner_start</h4>
<p>Starts the CPU mining process on the client.</p>
<h5 id="parameters">Parameters</h5>
<p>None</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <code>boolean | integer</code> - <code>true</code> if the mining start request was received successfully; otherwise returns an error. An example of an error condition would be when a coinbase has not been specified.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"miner_start","params":[],"id":1}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{...}</pre><hr>
<h4 id="miner_stop">miner_stop</h4>
<p>Stops the CPU mining process on the client.</p>
<h5 id="parameters">Parameters</h5>
<p>None</p>
<h5 id="returns">Returns</h5>
<p><code>result</code> : <code>boolean | integer</code> - <code>true</code> if the mining stop request was received successfully; otherwise returns an error. An example of an error condition would be when a coinbase has not been specified.</p>
<h5 id="request">Request</h5>
<pre class="hljs">curl -X POST --data '{"jsonrpc":"2.0","method":"miner_stop","params":[],"id":1}' &lt;JSON-RPC-endpoint:port&gt;</pre><h5 id="result">Result</h5>
<pre class="hljs">{...}</pre><hr>
<h2 id="objects">Objects</h2>
<p>The following objects are parameters for or returned by JSON-RPC Methods:</p>
<ul>
<li><a href="#block-object">Block</a></li>
<li><a href="#filter-options-object">Filter Options</a></li>
<li><a href="#log-object">Log</a></li>
<li><a href="#transaction-object">Transaction</a> </li>
<li><a href="#transaction-call-object">Transaction Call</a> </li>
<li><a href="#transaction-receipt-object">Transaction Receipt</a></li>
</ul>
<h4 id="block-object">Block Object</h4>
<p>Returned by <a href="#eth_getblockbyhash">eth_getBlockByHash</a> and <a href="#eth_getblockbynumber">eth_getBlockByNumber</a>.</p>
<table>
<thead>
<tr>
<th>Key</th>
<th style="text-align:center">Type</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>number</code></td>
<td style="text-align:center"><em>Quantity</em>, Integer</td>
<td>Block number. <code>null</code> when block is pending.</td>
</tr>
<tr>
<td><code>hash</code></td>
<td style="text-align:center"><em>Data</em>, 32 bytes</td>
<td>Hash of the block. <code>null</code> when block is pending.</td>
</tr>
<tr>
<td><code>parentHash</code></td>
<td style="text-align:center"><em>Data</em>, 32 bytes</td>
<td>Hash of the parent block.</td>
</tr>
<tr>
<td><code>nonce</code></td>
<td style="text-align:center"><em>Data</em>, 8 bytes</td>
<td>Hash of the generated proof of work. <code>null</code> when block is pending.</td>
</tr>
<tr>
<td><code>sha3Uncles</code></td>
<td style="text-align:center"><em>Data</em>, 32 bytes</td>
<td>SHA3 of the uncle&#39;s data in the block.</td>
</tr>
<tr>
<td><code>logsBloom</code></td>
<td style="text-align:center"><em>Data</em>, 256 bytes</td>
<td>Bloom filter for the block logs. <code>null</code> when block is pending.</td>
</tr>
<tr>
<td><code>transactionsRoot</code></td>
<td style="text-align:center"><em>Data</em>, 32 bytes</td>
<td>Root of the transaction trie for the block.</td>
</tr>
<tr>
<td><code>stateRoot</code></td>
<td style="text-align:center">Data, 32 bytes</td>
<td>Root of the final state trie for the block.</td>
</tr>
<tr>
<td><code>receiptsRoot</code></td>
<td style="text-align:center">Data, 32 bytes</td>
<td>Root of the receipts trie for the block.</td>
</tr>
<tr>
<td><code>miner</code></td>
<td style="text-align:center">Data, 20 bytes</td>
<td>Address to which mining rewards were paid.</td>
</tr>
<tr>
<td><code>difficulty</code></td>
<td style="text-align:center">Quantity, Integer</td>
<td>Difficulty for this block.</td>
</tr>
<tr>
<td><code>totalDifficulty</code></td>
<td style="text-align:center">Quantity, Integer</td>
<td>Total difficulty of the chain until this block.</td>
</tr>
<tr>
<td><code>extraData</code></td>
<td style="text-align:center">Data</td>
<td>Extra data field of this block.</td>
</tr>
<tr>
<td><code>size</code></td>
<td style="text-align:center">Quantity, Integer</td>
<td>Size of block in bytes.</td>
</tr>
<tr>
<td><code>gasLimit</code></td>
<td style="text-align:center">Quantity</td>
<td>Maximum gas allowed in this block.</td>
</tr>
<tr>
<td><code>gasUsed</code></td>
<td style="text-align:center">Quantity</td>
<td>Total gas used by all transactions in this block.</td>
</tr>
<tr>
<td><code>timestamp</code></td>
<td style="text-align:center">Quantity</td>
<td>Unix timestamp when block was collated.</td>
</tr>
<tr>
<td><code>transactions</code></td>
<td style="text-align:center">Array</td>
<td>Array of <a href="#transaction-object">transaction objects</a>, or 32 byte transaction hashes depending on the specified boolean parameter.</td>
</tr>
<tr>
<td><code>uncles</code></td>
<td style="text-align:center">Array</td>
<td>Array of uncle hashes.</td>
</tr>
</tbody>
</table>
<h4 id="filter-options-object">Filter Options Object</h4>
<p>Parameter for <a href="#eth_newfilter">eth_newFilter</a> and <a href="#eth_getlogs">eth_getLogs</a>. </p>
<table>
<thead>
<tr>
<th>Key</th>
<th style="text-align:center">Type</th>
<th style="text-align:center">Required/Optional</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>fromBlock</code></td>
<td style="text-align:center">Quantity &#124;Tag</td>
<td style="text-align:center">Optional</td>
<td>Integer block number or <code>latest</code>, <code>pending</code>, <code>earliest</code>. See <a href="#block-parameter">Block Parameter</a>. Default is <code>latest</code>.</td>
</tr>
<tr>
<td><code>toBlock</code></td>
<td style="text-align:center">Quantity &#124;Tag</td>
<td style="text-align:center">Optional</td>
<td>Integer block number or <code>latest</code>, <code>pending</code>, <code>earliest</code>. See <a href="#block-parameter">Block Parameter</a>. Default is <code>latest</code>.</td>
</tr>
<tr>
<td><code>address</code></td>
<td style="text-align:center">Data &#124; Array</td>
<td style="text-align:center">Optional</td>
<td>Contract address or array of addresses from which logs originate.</td>
</tr>
<tr>
<td><code>topics</code></td>
<td style="text-align:center">Array of Data, 32 bytes each</td>
<td style="text-align:center">Optional</td>
<td>Array of 32-byte topics. Topics are order-dependent. Each topic can also be an array of DATA with &quot;or&quot; options.</td>
</tr>
</tbody>
</table>
<p><a href="#eth_getlogs">eth_getLogs</a> has an additional key. </p>
<table>
<thead>
<tr>
<th>Key</th>
<th style="text-align:center">Type</th>
<th style="text-align:center">Required/Optional</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>blockhash</code></td>
<td style="text-align:center">Data, 32 bytes</td>
<td style="text-align:center">Optional</td>
<td>Hash of block for which to return logs. If <code>blockhash</code> is specified, <code>fromBlock</code> and <code>toBlock</code> cannot be specified.</td>
</tr>
</tbody>
</table>
<h4 id="log-object">Log Object</h4>
<p>Returned by <a href="#eth_getfilterchanges">eth_getFilterChanges</a> and <a href="#transaction-receipt-object">transaction receipt objects</a> can contain an array of log objects. </p>
<table>
<thead>
<tr>
<th>Key</th>
<th style="text-align:center">Type</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>removed</code></td>
<td style="text-align:center">Tag</td>
<td><code>true</code> when log removed due to chain reorganization. <code>false</code> if valid log.</td>
</tr>
<tr>
<td><code>logIndex</code></td>
<td style="text-align:center">Quantity, Integer</td>
<td>Log index position in the block. <code>null</code> when log is pending.</td>
</tr>
<tr>
<td><code>transactionIndex</code></td>
<td style="text-align:center">Quantity, Integer</td>
<td>Index position of transaction from which log was created. <code>null</code> when log is pending.</td>
</tr>
<tr>
<td><code>transactionHash</code></td>
<td style="text-align:center">Data, 32 bytes</td>
<td>Hash of transaction from which log was created. <code>null</code> when log is pending.</td>
</tr>
<tr>
<td><code>blockHash</code></td>
<td style="text-align:center">Data, 32 bytes</td>
<td>Hash of block in which log included. <code>null</code> when log is pending.</td>
</tr>
<tr>
<td><code>blockNumber</code></td>
<td style="text-align:center">Quantity</td>
<td>Number of block in which log included. <code>null</code> when log is pending.</td>
</tr>
<tr>
<td><code>address</code></td>
<td style="text-align:center">Data, 20 bytes</td>
<td>Address from which log originated.</td>
</tr>
<tr>
<td><code>data</code></td>
<td style="text-align:center">Data</td>
<td>Non-indexed arguments of log.</td>
</tr>
<tr>
<td><code>topics</code></td>
<td style="text-align:center">Array of Data, 32 bytes each</td>
<td>0 to 4 indexed log arguments. In Solidity, the first topic is the hash of the signature of the event (for example, <code>Deposit(address, bytes32, unit256)</code>) except you declare the event with an anonymous specifier.) </td>
</tr>
</tbody>
</table>
<h3 id="transaction-object">Transaction Object</h3>
<p>Returned by <a href="#eth_gettransactionbyhash">eth_getTransactionByHash</a>, <a href="#eth_gettransactionbyblockhashandindex">eth_getTransactionByBlockHashAndIndex</a>, and <a href="#eth_gettransactionbyblocknumberandindex">eth_getTransactionsByBlockNumberAndIndex</a>.</p>
<table>
<thead>
<tr>
<th>Key</th>
<th style="text-align:center">Type</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>blockHash</code></td>
<td style="text-align:center">Data, 32 bytes</td>
<td>Hash of block containing this transaction. <code>null</code> when transaction is pending.</td>
</tr>
<tr>
<td><code>blockNumber</code></td>
<td style="text-align:center">Quantity</td>
<td>Block number of block containing this transaction. <code>null</code> when transaction is pending.</td>
</tr>
<tr>
<td><code>from</code></td>
<td style="text-align:center">Data, 20 bytes</td>
<td>Address of the sender.</td>
</tr>
<tr>
<td><code>gas</code></td>
<td style="text-align:center">Quantity</td>
<td>Gas provided by the sender.</td>
</tr>
<tr>
<td><code>gasPrice</code></td>
<td style="text-align:center">Quantity</td>
<td>Gas price provided by the sender in Wei.</td>
</tr>
<tr>
<td><code>hash</code></td>
<td style="text-align:center">Data, 32 bytes</td>
<td>Hash of the transaction.</td>
</tr>
<tr>
<td><code>input</code></td>
<td style="text-align:center">Data</td>
<td>Data sent with the transaction.</td>
</tr>
<tr>
<td><code>nonce</code></td>
<td style="text-align:center">Quantity</td>
<td>Number of transactions made by the sender before this one.</td>
</tr>
<tr>
<td><code>to</code></td>
<td style="text-align:center">Data, 20 bytes</td>
<td>Address of the receiver. <code>null</code> if a contract creation transaction.</td>
</tr>
<tr>
<td><code>transactionIndex</code></td>
<td style="text-align:center">Quantity, Integer</td>
<td>Index position of transaction in the block. <code>null</code> when transaction is pending.</td>
</tr>
<tr>
<td><code>value</code></td>
<td style="text-align:center">Quantity</td>
<td>Value transferred in Wei.</td>
</tr>
<tr>
<td><code>v</code></td>
<td style="text-align:center">Quantity</td>
<td>ECDSA Recovery ID</td>
</tr>
<tr>
<td><code>r</code></td>
<td style="text-align:center">Data, 32 bytes</td>
<td>ECDSA signature r</td>
</tr>
<tr>
<td><code>s</code></td>
<td style="text-align:center">Data, 32 bytes</td>
<td>ECDSA signature s</td>
</tr>
</tbody>
</table>
<h3 id="transaction-call-object">Transaction Call Object</h3>
<p>Parameter for <a href="#eth_call">eth_call</a> and <a href="#eth_estimategas">eth_estimateGas</a>.</p>
<p><strong>Note:</strong> All parameters are optional for <a href="#eth_estimategas">eth_estimateGas</a></p>
<table>
<thead>
<tr>
<th>Key</th>
<th style="text-align:center">Type</th>
<th style="text-align:center">Required/Optional</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>from</code></td>
<td style="text-align:center">Data, 20 bytes</td>
<td style="text-align:center">Optional</td>
<td>Address from which transaction sent.</td>
</tr>
<tr>
<td><code>to</code></td>
<td style="text-align:center">Data, 20 bytes</td>
<td style="text-align:center">Required</td>
<td>Address to which transaction is directed.</td>
</tr>
<tr>
<td><code>gas</code></td>
<td style="text-align:center">Quantity, Integer</td>
<td style="text-align:center">Optional</td>
<td>Gas provided for the transaction execution. <code>eth_call</code> consumes zero gas, but this parameter may be needed by some executions.</td>
</tr>
<tr>
<td><code>gasPrice</code></td>
<td style="text-align:center">Quantity, Integer</td>
<td style="text-align:center">Optional</td>
<td>gasPrice used for each paid gas.</td>
</tr>
<tr>
<td><code>value</code></td>
<td style="text-align:center">Quantity, Integer</td>
<td style="text-align:center">Optional</td>
<td>Value sent with this transaction.</td>
</tr>
<tr>
<td><code>data</code></td>
<td style="text-align:center">Data</td>
<td style="text-align:center">Optional</td>
<td>Hash of the method signature and encoded parameters. For details see Ethereum Contract ABI.</td>
</tr>
</tbody>
</table>
<h3 id="transaction-receipt-object">Transaction Receipt Object</h3>
<p>Returned by <a href="#eth_gettransactionreceipt">eth_getTransactionReceipt</a>.</p>
<table>
<thead>
<tr>
<th>Key</th>
<th style="text-align:center">Type</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>blockHash</code></td>
<td style="text-align:center">Data, 32 bytes</td>
<td>Hash of block containing this transaction.</td>
</tr>
<tr>
<td><code>blockNumber</code></td>
<td style="text-align:center">Quantity</td>
<td>Block number of block containing this transaction. </td>
</tr>
<tr>
<td><code>contractAddress</code></td>
<td style="text-align:center">Data, 20 bytes</td>
<td>Contract address created, if contract creation transaction; otherwise, <code>null</code>.</td>
</tr>
<tr>
<td><code>cumulativeGasUsed</code></td>
<td style="text-align:center">Quantity</td>
<td>Total amount of gas used by previous transactions in the block and this transaction.</td>
</tr>
<tr>
<td><code>from</code></td>
<td style="text-align:center">Data, 20 bytes</td>
<td>Address of the sender.</td>
</tr>
<tr>
<td><code>gasUsed</code></td>
<td style="text-align:center">Quantity</td>
<td>Amount of gas used by this specific transaction.</td>
</tr>
<tr>
<td><code>logs</code></td>
<td style="text-align:center">Array</td>
<td>Array of <a href="#log-object">log objects</a> generated by this transaction.</td>
</tr>
<tr>
<td><code>logsBloom</code></td>
<td style="text-align:center">Data, 256 bytes</td>
<td>Bloom filter for light clients to quickly retrieve related logs.</td>
</tr>
<tr>
<td><code>status</code></td>
<td style="text-align:center">Quantity</td>
<td>Either <code>1</code> (success) or <code>0</code> (failure)</td>
</tr>
<tr>
<td><code>to</code></td>
<td style="text-align:center">Data, 20 bytes</td>
<td>Address of the receiver, if sending ether; otherwise, null.</td>
</tr>
<tr>
<td><code>transactionHash</code></td>
<td style="text-align:center">Data, 32 bytes</td>
<td>Hash of the transaction.</td>
</tr>
<tr>
<td><code>transactionIndex</code></td>
<td style="text-align:center">Quantity, Integer</td>
<td>Index position of transaction in the block.</td>
</tr>
</tbody>
</table>
<p><strong>Note:</strong> For pre-Byzantium transactions, the transaction receipt object includes the following instead of <code>status</code>:</p>
<table>
<thead>
<tr>
<th>Key</th>
<th style="text-align:center">Type</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>root</code></td>
<td style="text-align:center">Data, 32 bytes</td>
<td>Post-transaction stateroot</td>
</tr>
</tbody>
</table>
</div> <!-- /div.col-md-9 -->
</div> <!-- /div.row -->
</div> <!-- /div.container -->
</body>
<script>
$('body').scrollspy({ target: '#scroll-spy', offset: 40 })
</script>
</html>