Skip to content

Instantly share code, notes, and snippets.

@marcofavorito
Last active January 29, 2018 17:45
Show Gist options
  • Save marcofavorito/17f92982cc0b20ab607287743b62e3f8 to your computer and use it in GitHub Desktop.
Save marcofavorito/17f92982cc0b20ab607287743b62e3f8 to your computer and use it in GitHub Desktop.
Some data from a Tendermint network of 4 nodes with the toy app `abci counter`
  • run the network. Genesis file:

      curl 'http://localhost:46606/genesis'
      {
        "jsonrpc": "2.0",
        "id": "",
        "result": {
          "genesis": {
            "genesis_time": "2018-01-29T18:29:56.578233278+01:00",
            "chain_id": "chain-L2Cbtf",
            "consensus_params": {
      	"block_size_params": {
      	  "max_bytes": 22020096,
      	  "max_txs": 100000,
      	  "max_gas": -1
      	},
      	"tx_size_params": {
      	  "max_bytes": 10240,
      	  "max_gas": -1
      	},
      	"block_gossip_params": {
      	  "block_part_size_bytes": 65536
      	},
      	"evidence_params": {
      	  "max_age": 100000
      	}
            },
            "validators": [
      	{
      	  "pub_key": {
      	    "type": "ed25519",
      	    "data": "B42BF1B8F3F868918FEF4F7AEF7DFF40C6F67B04873A7882DA90A8CF517B6DCB"
      	  },
      	  "power": 1,
      	  "name": "mach0"
      	},
      	{
      	  "pub_key": {
      	    "type": "ed25519",
      	    "data": "2D7028012CDE5B477295089987B48C3C396F59A276F1E2992D9F9D311915A162"
      	  },
      	  "power": 1,
      	  "name": "mach1"
      	},
      	{
      	  "pub_key": {
      	    "type": "ed25519",
      	    "data": "B762BE2E28B862C93479685F723235C0E815F0B4BA38E2636A804B1534F94F8B"
      	  },
      	  "power": 1,
      	  "name": "mach2"
      	},
      	{
      	  "pub_key": {
      	    "type": "ed25519",
      	    "data": "ABB96174987CAC1B46270EB9D66073AA410C9A23AB7C48DA0DD3308BA783ABAB"
      	  },
      	  "power": 1,
      	  "name": "mach3"
      	}
            ],
            "app_hash": ""
          }
        }
      }
    
  • make the transaction "1":

      curl 'http://localhost:46606/broadcast_tx_commit?tx="1"'
      {
        "jsonrpc": "2.0",
        "id": "",
        "result": {
          "check_tx": {
            "code": 0,
            "data": "",
            "log": "",
            "gas": "0",
            "fee": "0"
          },
          "deliver_tx": {
            "code": 0,
            "data": "",
            "log": "",
            "tags": []
          },
          "hash": "D763D143A5C2995CA6DC8FB8BD2124B769AEA9D9",
          "height": 2
        }
      }
    
  • block 1 before the transaction, blocks 2 and 3 after the transaction:

      curl http://localhost:46606/block?height=1
      {
        "jsonrpc": "2.0",
        "id": "",
        "result": {
          "block_meta": {
            "block_id": {
      	"hash": "EF441705E9D8E5055E84DBBE6545CAAF79A916A0",
      	"parts": {
      	  "total": 1,
      	  "hash": "AC4C9D855990AD139E883E5C649BE72EC830A225"
      	}
            },
            "header": {
      	"chain_id": "chain-L2Cbtf",
      	"height": 1,
      	"time": "2018-01-29T18:30:02.405+01:00",
      	"num_txs": 0,
      	"last_block_id": {
      	  "hash": "",
      	  "parts": {
      	    "total": 0,
      	    "hash": ""
      	  }
      	},
      	"total_txs": 0,
      	"last_commit_hash": "",
      	"data_hash": "",
      	"validators_hash": "13EF96B8C846E03228F7396CE0452BA703D7CC17",
      	"consensus_hash": "B9FD9BB442BAD53793C4C744D44B5F8AF4C09438",
      	"app_hash": "",
      	"last_results_hash": "",
      	"evidence_hash": ""
            }
          },
          "block": {
            "header": {
      	"chain_id": "chain-L2Cbtf",
      	"height": 1,
      	"time": "2018-01-29T18:30:02.405+01:00",
      	"num_txs": 0,
      	"last_block_id": {
      	  "hash": "",
      	  "parts": {
      	    "total": 0,
      	    "hash": ""
      	  }
      	},
      	"total_txs": 0,
      	"last_commit_hash": "",
      	"data_hash": "",
      	"validators_hash": "13EF96B8C846E03228F7396CE0452BA703D7CC17",
      	"consensus_hash": "B9FD9BB442BAD53793C4C744D44B5F8AF4C09438",
      	"app_hash": "",
      	"last_results_hash": "",
      	"evidence_hash": ""
            },
            "data": {
      	"txs": []
            },
            "evidence": {
      	"evidence": []
            },
            "last_commit": {
      	"blockID": {
      	  "hash": "",
      	  "parts": {
      	    "total": 0,
      	    "hash": ""
      	  }
      	},
      	"precommits": []
            }
          }
        }
      }
    
    
      curl http://localhost:46606/block?height=2
      {
        "jsonrpc": "2.0",
        "id": "",
        "result": {
          "block_meta": {
            "block_id": {
      	"hash": "BCFBF4BCC7E2CF7E9C9532063BB26C933CC6C705",
      	"parts": {
      	  "total": 1,
      	  "hash": "F7335C351A5C7BC8C55E47EB08811DA7AB1037E0"
      	}
            },
            "header": {
      	"chain_id": "chain-L2Cbtf",
      	"height": 2,
      	"time": "2018-01-29T18:30:44.749+01:00",
      	"num_txs": 1,
      	"last_block_id": {
      	  "hash": "EF441705E9D8E5055E84DBBE6545CAAF79A916A0",
      	  "parts": {
      	    "total": 1,
      	    "hash": "AC4C9D855990AD139E883E5C649BE72EC830A225"
      	  }
      	},
      	"total_txs": 1,
      	"last_commit_hash": "B854D96956A3DA9A084AE626E3B0895B76E66682",
      	"data_hash": "D763D143A5C2995CA6DC8FB8BD2124B769AEA9D9",
      	"validators_hash": "13EF96B8C846E03228F7396CE0452BA703D7CC17",
      	"consensus_hash": "B9FD9BB442BAD53793C4C744D44B5F8AF4C09438",
      	"app_hash": "",
      	"last_results_hash": "",
      	"evidence_hash": ""
            }
          },
          "block": {
            "header": {
      	"chain_id": "chain-L2Cbtf",
      	"height": 2,
      	"time": "2018-01-29T18:30:44.749+01:00",
      	"num_txs": 1,
      	"last_block_id": {
      	  "hash": "EF441705E9D8E5055E84DBBE6545CAAF79A916A0",
      	  "parts": {
      	    "total": 1,
      	    "hash": "AC4C9D855990AD139E883E5C649BE72EC830A225"
      	  }
      	},
      	"total_txs": 1,
      	"last_commit_hash": "B854D96956A3DA9A084AE626E3B0895B76E66682",
      	"data_hash": "D763D143A5C2995CA6DC8FB8BD2124B769AEA9D9",
      	"validators_hash": "13EF96B8C846E03228F7396CE0452BA703D7CC17",
      	"consensus_hash": "B9FD9BB442BAD53793C4C744D44B5F8AF4C09438",
      	"app_hash": "",
      	"last_results_hash": "",
      	"evidence_hash": ""
            },
            "data": {
      	"txs": [
      	  "MQ=="
      	]
            },
            "evidence": {
      	"evidence": []
            },
            "last_commit": {
      	"blockID": {
      	  "hash": "EF441705E9D8E5055E84DBBE6545CAAF79A916A0",
      	  "parts": {
      	    "total": 1,
      	    "hash": "AC4C9D855990AD139E883E5C649BE72EC830A225"
      	  }
      	},
      	"precommits": [
      	  {
      	    "validator_address": "1FED8757E50595DE9B2CA64EC830B010A34D0EC3",
      	    "validator_index": 0,
      	    "height": 1,
      	    "round": 0,
      	    "timestamp": "2018-01-29T18:30:03.253+01:00",
      	    "type": 2,
      	    "block_id": {
      	      "hash": "EF441705E9D8E5055E84DBBE6545CAAF79A916A0",
      	      "parts": {
      		"total": 1,
      		"hash": "AC4C9D855990AD139E883E5C649BE72EC830A225"
      	      }
      	    },
      	    "signature": {
      	      "type": "ed25519",
      	      "data": "089B3DA48C15CC591BECB9D1D7808A48867A5CA590458026FAADAC12F16E930EAE6EB53DA3D996380630307C97CF5792BBE49FAB638F3365C3A7608C92B58D05"
      	    }
      	  },
      	  {
      	    "validator_address": "7CB29092BE02F1C40FB1DE477CC5A0FE542B161C",
      	    "validator_index": 1,
      	    "height": 1,
      	    "round": 0,
      	    "timestamp": "2018-01-29T18:30:03.301+01:00",
      	    "type": 2,
      	    "block_id": {
      	      "hash": "EF441705E9D8E5055E84DBBE6545CAAF79A916A0",
      	      "parts": {
      		"total": 1,
      		"hash": "AC4C9D855990AD139E883E5C649BE72EC830A225"
      	      }
      	    },
      	    "signature": {
      	      "type": "ed25519",
      	      "data": "235029BEBC95D950F4D7AB75F320BEDAA2D3FFF40C5ED06B280EC167992AE954614CE82FBA6FCBDAB3BE4FDD27103AA7F0AEC1FFE24E6875913F40E360FC3C0D"
      	    }
      	  },
      	  {
      	    "validator_address": "F123218D6FAED58E7C91CE79812EB1D1C4146C1C",
      	    "validator_index": 2,
      	    "height": 1,
      	    "round": 0,
      	    "timestamp": "2018-01-29T18:30:03.301+01:00",
      	    "type": 2,
      	    "block_id": {
      	      "hash": "EF441705E9D8E5055E84DBBE6545CAAF79A916A0",
      	      "parts": {
      		"total": 1,
      		"hash": "AC4C9D855990AD139E883E5C649BE72EC830A225"
      	      }
      	    },
      	    "signature": {
      	      "type": "ed25519",
      	      "data": "DDE1F7BC8993F35B0188A244D9EFC059FF0FD1B1858DE0375743C5BAACE9C293007C630635C5086B48831E27E63E8469F91EF11C5FC6D144AE74A763310B3B09"
      	    }
      	  },
      	  {
      	    "validator_address": "F402B28B28EA806240D468C216194E40529C56D9",
      	    "validator_index": 3,
      	    "height": 1,
      	    "round": 0,
      	    "timestamp": "2018-01-29T18:30:03.697+01:00",
      	    "type": 2,
      	    "block_id": {
      	      "hash": "EF441705E9D8E5055E84DBBE6545CAAF79A916A0",
      	      "parts": {
      		"total": 1,
      		"hash": "AC4C9D855990AD139E883E5C649BE72EC830A225"
      	      }
      	    },
      	    "signature": {
      	      "type": "ed25519",
      	      "data": "B61A25A00005F8A0A65F13C1A0869BBD3CA7E3C80055690E33A3F2B8406BC809E2BE7AB693174B8C57BF3891A917A2FBF515E994E10D6BCFD080FD0478B36D0E"
      	    }
      	  }
      	]
            }
          }
        }
      }
    
    
      curl http://localhost:46606/block?height=3
      {
        "jsonrpc": "2.0",
        "id": "",
        "result": {
          "block_meta": {
            "block_id": {
      	"hash": "00F1974572DAEF029F0750437C47113CD626773B",
      	"parts": {
      	  "total": 1,
      	  "hash": "8B8A936E52021B4B08C5CD4C22D296062E339CB5"
      	}
            },
            "header": {
      	"chain_id": "chain-L2Cbtf",
      	"height": 3,
      	"time": "2018-01-29T18:30:47.736+01:00",
      	"num_txs": 0,
      	"last_block_id": {
      	  "hash": "BCFBF4BCC7E2CF7E9C9532063BB26C933CC6C705",
      	  "parts": {
      	    "total": 1,
      	    "hash": "F7335C351A5C7BC8C55E47EB08811DA7AB1037E0"
      	  }
      	},
      	"total_txs": 1,
      	"last_commit_hash": "42E56B3309C1165A4E45A6C1EF5EE71BF403DFDA",
      	"data_hash": "",
      	"validators_hash": "13EF96B8C846E03228F7396CE0452BA703D7CC17",
      	"consensus_hash": "B9FD9BB442BAD53793C4C744D44B5F8AF4C09438",
      	"app_hash": "0000000000000001",
      	"last_results_hash": "585BD7ED566208944B1F2E13170CD4B66325B8EE",
      	"evidence_hash": ""
            }
          },
          "block": {
            "header": {
      	"chain_id": "chain-L2Cbtf",
      	"height": 3,
      	"time": "2018-01-29T18:30:47.736+01:00",
      	"num_txs": 0,
      	"last_block_id": {
      	  "hash": "BCFBF4BCC7E2CF7E9C9532063BB26C933CC6C705",
      	  "parts": {
      	    "total": 1,
      	    "hash": "F7335C351A5C7BC8C55E47EB08811DA7AB1037E0"
      	  }
      	},
      	"total_txs": 1,
      	"last_commit_hash": "42E56B3309C1165A4E45A6C1EF5EE71BF403DFDA",
      	"data_hash": "",
      	"validators_hash": "13EF96B8C846E03228F7396CE0452BA703D7CC17",
      	"consensus_hash": "B9FD9BB442BAD53793C4C744D44B5F8AF4C09438",
      	"app_hash": "0000000000000001",
      	"last_results_hash": "585BD7ED566208944B1F2E13170CD4B66325B8EE",
      	"evidence_hash": ""
            },
            "data": {
      	"txs": []
            },
            "evidence": {
      	"evidence": []
            },
            "last_commit": {
      	"blockID": {
      	  "hash": "BCFBF4BCC7E2CF7E9C9532063BB26C933CC6C705",
      	  "parts": {
      	    "total": 1,
      	    "hash": "F7335C351A5C7BC8C55E47EB08811DA7AB1037E0"
      	  }
      	},
      	"precommits": [
      	  {
      	    "validator_address": "1FED8757E50595DE9B2CA64EC830B010A34D0EC3",
      	    "validator_index": 0,
      	    "height": 2,
      	    "round": 0,
      	    "timestamp": "2018-01-29T18:30:46.053+01:00",
      	    "type": 2,
      	    "block_id": {
      	      "hash": "BCFBF4BCC7E2CF7E9C9532063BB26C933CC6C705",
      	      "parts": {
      		"total": 1,
      		"hash": "F7335C351A5C7BC8C55E47EB08811DA7AB1037E0"
      	      }
      	    },
      	    "signature": {
      	      "type": "ed25519",
      	      "data": "188D9AD9BC0CE5E39CDC70DFA32E809E4467301C79AA02517726EE47B9C68CCA47B82A0134500409415A8EAF7FDBDC55685F6B900444A0DC6B64FDED42FDFD05"
      	    }
      	  },
      	  {
      	    "validator_address": "7CB29092BE02F1C40FB1DE477CC5A0FE542B161C",
      	    "validator_index": 1,
      	    "height": 2,
      	    "round": 0,
      	    "timestamp": "2018-01-29T18:30:45.707+01:00",
      	    "type": 2,
      	    "block_id": {
      	      "hash": "BCFBF4BCC7E2CF7E9C9532063BB26C933CC6C705",
      	      "parts": {
      		"total": 1,
      		"hash": "F7335C351A5C7BC8C55E47EB08811DA7AB1037E0"
      	      }
      	    },
      	    "signature": {
      	      "type": "ed25519",
      	      "data": "580BA43CE97BA5182DB2C75B7063DFB21D4210041A6785379403153AAECDD0CA7EF919AE30A56366AD7422D3DC2402EAFDD72A6FD6387A094DA61219DB7D830F"
      	    }
      	  },
      	  {
      	    "validator_address": "F123218D6FAED58E7C91CE79812EB1D1C4146C1C",
      	    "validator_index": 2,
      	    "height": 2,
      	    "round": 0,
      	    "timestamp": "2018-01-29T18:30:45.88+01:00",
      	    "type": 2,
      	    "block_id": {
      	      "hash": "BCFBF4BCC7E2CF7E9C9532063BB26C933CC6C705",
      	      "parts": {
      		"total": 1,
      		"hash": "F7335C351A5C7BC8C55E47EB08811DA7AB1037E0"
      	      }
      	    },
      	    "signature": {
      	      "type": "ed25519",
      	      "data": "3D2A6674DE7DF666B8A4615146C0E00A6AEC715CEDD5D8FB69B8453091D9DC054058F82D6084ADB113DFF1E339DD2DBB5B0DD3CCECD5CE990A1F69F6E366AB03"
      	    }
      	  },
      	  {
      	    "validator_address": "F402B28B28EA806240D468C216194E40529C56D9",
      	    "validator_index": 3,
      	    "height": 2,
      	    "round": 0,
      	    "timestamp": "2018-01-29T18:30:46.025+01:00",
      	    "type": 2,
      	    "block_id": {
      	      "hash": "BCFBF4BCC7E2CF7E9C9532063BB26C933CC6C705",
      	      "parts": {
      		"total": 1,
      		"hash": "F7335C351A5C7BC8C55E47EB08811DA7AB1037E0"
      	      }
      	    },
      	    "signature": {
      	      "type": "ed25519",
      	      "data": "0C93A4B87F0B9EA354ECB2789191BAD83D49FAB64E2786A77918951C4DD9C2AC8A5640AFD25ED575B0DF772C93677CDC5EC81ECE4BCD532F7F5F391771C8810B"
      	    }
      	  }
      	]
            }
          }
        }
      }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment