Skip to content

Commit

Permalink
Add test case specifically for #1021
Browse files Browse the repository at this point in the history
Signed-off-by: Thane Thomson <connect@thanethomson.com>
  • Loading branch information
thanethomson committed Dec 17, 2021
1 parent 75c7369 commit 92c502a
Show file tree
Hide file tree
Showing 3 changed files with 216 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rpc/tests/gaia_fixtures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ fn incoming_fixtures() {
"block_at_height_10" => {
assert!(endpoint::block::Response::from_string(content).is_ok())
}
"block_at_height_4555980" => {
let r = endpoint::block::Response::from_string(content);
assert!(r.is_ok(), "{:?}", r);
}
"block_results_at_height_10" => {
let r = endpoint::block_results::Response::from_string(content);
assert!(r.is_ok(), "block_results_at_height_10: {:?}", r);
Expand Down Expand Up @@ -113,6 +117,9 @@ fn outgoing_fixtures() {
"block_at_height_10" => {
assert!(endpoint::block::Request::from_string(content).is_ok())
}
"block_at_height_4555980" => {
assert!(endpoint::block::Request::from_string(content).is_ok())
}
"block_results_at_height_10" => {
let r = endpoint::block_results::Request::from_string(content);
assert!(r.is_ok(), "block_results_at_height_10: {:?}", r);
Expand Down
201 changes: 201 additions & 0 deletions rpc/tests/gaia_fixtures/incoming/block_at_height_4555980.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
{
"id": "89998a91-d121-4d42-a5de-5ddf6e942c93",
"jsonrpc": "2.0",
"result": {
"block": {
"data": {
"txs": [
"CrcCCrQCCjQvaW5qZWN0aXZlLmV4Y2hhbmdlLnYxYmV0YTEuTXNnQmF0Y2hDYW5jZWxTcG90T3JkZXJzEvsBCippbmoxeDJjazBxbDJuZ3l4cXR3OGp0ZXljMHRjaHdud3h2N25wYXVuZ3QSzAEKQjB4MjY0MTNhNzBjOWI3OGE0OTUwMjNlNWFiODAwM2M5Y2Y5NjNlZjk2M2Y2NzU1ZjhiNTcyNTVmZWI1NzQ0YmYzMRJCMHgzMmIxNjc4M2VhOWEwODYwMmRjNzkyZjI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mplY3RpdmUuY3J5cHRvLnYxYmV0YTEuZXRoc2VjcDI1NmsxLlB1YktleRIjCiECp35IN42nqKPxF1KTGCtcWDGzSlMw/nYyyKB87jRc8GUSBAoCCH8YARIcChYKA2luahIPMjAwMDAwMDAwMDAwMDAwEIC1GBpBJBdA2mIoV6LKqEmLxy6pI/YJ9bwNrvZKuEghBH2ZZPVh4vxihdih8EboK4WVwN6GCXM8c4pC/iikWsLfcVTKIgA="
]
},
"evidence": {
"evidence": []
},
"header": {
"app_hash": "BF76A8FA1E2CF6ED225D0A22C90B847AB1E7119F7972928B8BB9AD76591552EC",
"chain_id": "injective-1",
"consensus_hash": "048091BC7DDC283F77BFBF91D73C44DA58C3DF8A9CBC867405D8B7F3DAADA22F",
"data_hash": "C17C0B94BADD8441A981117927EFAC3C57CD687FE5626BA4FF59A8E4C1C28E5F",
"evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"height": "4555980",
"last_block_id": {
"hash": "833940768A4AF829358D35E027F1D153DB7526DC4CBE93FDDDCF9C707F31EFF6",
"parts": {
"hash": "1C48AC5EE8CB42246FF06F7756E7EA3E52AB4888F1564155062A12BB1FFB8129",
"total": 1
}
},
"last_commit_hash": "6D531EB2487D57F84CBAF1E82C09DADA8F2D53ADAD946F80C366A437CC1B817A",
"last_results_hash": "A4E7354EA81B081E404BF3732F36C922E3DE687FF52F468D300E819839C2F6E6",
"next_validators_hash": "E00B28D8EB19BA3F40596D20A766F1F195C1A7D2BFA7EC1AA4476E66B9AB3BA5",
"proposer_address": "39633DD07F87E216E0CAD01E0BE216E22F89AB3F",
"time": "2021-11-14T12:43:33.099805791Z",
"validators_hash": "E00B28D8EB19BA3F40596D20A766F1F195C1A7D2BFA7EC1AA4476E66B9AB3BA5",
"version": {
"block": "11"
}
},
"last_commit": {
"block_id": {
"hash": "833940768A4AF829358D35E027F1D153DB7526DC4CBE93FDDDCF9C707F31EFF6",
"parts": {
"hash": "1C48AC5EE8CB42246FF06F7756E7EA3E52AB4888F1564155062A12BB1FFB8129",
"total": 1
}
},
"height": "4555979",
"round": 0,
"signatures": [
{
"block_id_flag": 2,
"signature": "DcaI5SvuS+O+badPRaCK6KHxt5IL5XRZl+Lu2vTMv0OsHw0ARAmDMTFVUTAcd2wJrTYQLGY5QlKMYlZ5x7PpDA==",
"timestamp": "2021-11-14T12:43:33.099805791Z",
"validator_address": "9AAC0790FFF74F4050DBBBB55EBF59BF134C4038"
},
{
"block_id_flag": 2,
"signature": "frj+2apmi7lZrtgcfSjM/ZoYUWa1ebncdECZG+UY3sqlOIrISWtB0K+T3qDGS2g2aX97qVqN+xdfd9VjlSSODQ==",
"timestamp": "2021-11-14T12:43:33.035038197Z",
"validator_address": "39633DD07F87E216E0CAD01E0BE216E22F89AB3F"
},
{
"block_id_flag": 2,
"signature": "X4zswgCuLIzVe3wW/GxTUkNnS3SGju/JnajG0UHdWU31JeaAmGZ8NsJxI4U483KX1BDkG2B169iBKXkQE0ZpDQ==",
"timestamp": "2021-11-14T12:43:33.128979048Z",
"validator_address": "7293C97AD985343ACDE99020CEA4FD9B7F635064"
},
{
"block_id_flag": 2,
"signature": "s8CV9lw0/KFHG1l165K14ZYK0XSq3AiULEuLWIB4VQFLSJlVkNtqc7wzd5iSIs0YiC8WzahxOD0X0b4fBu+HDg==",
"timestamp": "2021-11-14T12:43:32.998873184Z",
"validator_address": "72D0686119806C6996C372E9C340744A68B61564"
},
{
"block_id_flag": 2,
"signature": "FtSrmTWBmmngvr44bHD0JAPHpFfCjVDN+O2riETd3o2De9Am6NtBNyeXM0HScAJ9AXiwjHCk5aCFIypvjmxCCA==",
"timestamp": "2021-11-14T12:43:33.146396881Z",
"validator_address": "7DD51A5DA067E9A95FB82E02D5A41A51ADD1EF46"
},
{
"block_id_flag": 2,
"signature": "Z4d350+kpct495FJyNo7sFsLMD28RLsV7VH7i4RfWVYf4rwNo3Br4au2S4gtZ86Q0SJPayegSFwiX+v0W3IlAw==",
"timestamp": "2021-11-14T12:43:33.172260047Z",
"validator_address": "69FBF8538CF1D9042740B92DC7BB08C4201AFB79"
},
{
"block_id_flag": 2,
"signature": "du0kXuDLq5sbnuff4WxB7eDnrN4m6AwLaMC9BZepIPLyJDpbIVvP817D8bLcRuPit19mKOu/V1pULsTcsylhBw==",
"timestamp": "2021-11-14T12:43:33.164802494Z",
"validator_address": "DD2C988B278E526870DD97D7BA75EEAA2FEBD55D"
},
{
"block_id_flag": 2,
"signature": "5sR/pyn/7jLcVcRWEWHaE54SE2woo58LSKF5MYd5slPtKHux9+Rf5+4d6tsvNxI48+m1myumDdfrc5Ci6FB3DA==",
"timestamp": "2021-11-14T12:43:33.019489214Z",
"validator_address": "6087607E1E56F6EE7934ABAF65834C92D618104C"
},
{
"block_id_flag": 2,
"signature": "3zqPmZeSBgsq72a+mEdbso510tpaoyWHdweVTs0FjK+hdln+dPVOVvo5KCTWmmiTclpNWGhkoN1SZ3LTKfr9AA==",
"timestamp": "2021-11-14T12:43:33.123886311Z",
"validator_address": "93739258C5626903BA444128CFB7439AA31AA93F"
},
{
"block_id_flag": 2,
"signature": "VvTn8p5rv0ZBzyq5NX+7O+2q43sNHGnhTbPo9yT2CP/gujLENBHd8uwTaNjNn7jAq4D9fEal+mp6jKFlkAjnAw==",
"timestamp": "2021-11-14T12:43:33.083914393Z",
"validator_address": "25D1BD6EF4DC88B30A471082281E05951303606E"
},
{
"block_id_flag": 2,
"signature": "CL8tjklz2itfdjBzjGRa2j2RHkWLtAoQKzI3wnpuZEY2UK1MjVHW2C1EQAPzE8tpg0cdUERki2U5QJ6iAuDgBQ==",
"timestamp": "2021-11-14T12:43:33.110983959Z",
"validator_address": "FEAA42B0C3582CF9EBE4BD52082B90636C8BF3A5"
},
{
"block_id_flag": 2,
"signature": "bGx5OSWt/rp0h3uPDr9PictG7Oa6t7nnSAZwZ60LT/UlBdyi/GXl0YKbb3yjRriD/mXj6Okeq3hxFBRc6ZcoCg==",
"timestamp": "2021-11-14T12:43:33.113584819Z",
"validator_address": "F39BF9316C07E4F27EE31951F720783C58D09C11"
},
{
"block_id_flag": 2,
"signature": "HIJWbEByY8BmXjWfjqH2ZAGYmk6oXueTOGIA7mC5P+doXQLDzJ6fYYdb2Xr20YWqp3k5/Itf3gwY6S25/Ff2Cg==",
"timestamp": "2021-11-14T12:43:33.032214888Z",
"validator_address": "D7B69269E457E7AF1439C43944AA2AC829FD7CB8"
},
{
"block_id_flag": 2,
"signature": "cHL+qjkl8PJSnLY2b+izu3//Clr9sWT3liDHDRW2UsBmKy0BL1GCi0HiH1DIjnqRDUewgsewP5SJWE9UbGqcDA==",
"timestamp": "2021-11-14T12:43:33.068388955Z",
"validator_address": "7D2D96C14632861337AA62C0EF4E3CA096CE1665"
},
{
"block_id_flag": 2,
"signature": "4+stganpR5PXOnEE7kyJBS8bG+SHHp0QSp4bvjm/1AEnyygV4gY1pglVFVu1g+3tVbsFZ+qOSnP69rnLbAjAAQ==",
"timestamp": "2021-11-14T12:43:33.061724124Z",
"validator_address": "2F3D5935A40A5CCE21F523EE2852B47FB0D9E503"
},
{
"block_id_flag": 2,
"signature": "r7jTpiNEuxSFlYtMneg8xeVVJTvtP2cXosFFeFS4txFKBfkcA8LEH61mh2w5hP1Om9h+n45u+P3dSLTIFscJCA==",
"timestamp": "2021-11-14T12:43:32.980614016Z",
"validator_address": "7781FA16ADC57E109F63BD1E29F14F9D3817E14A"
},
{
"block_id_flag": 2,
"signature": "ncPjWfp8R3fEYu7CYLXHxRd6S+py96SCC8maQ53kvh6ow36uWDzo/PBW4BylbMNAjvK8+z6Vu+Wok8AezS0ZDw==",
"timestamp": "2021-11-14T12:43:33.170429184Z",
"validator_address": "94254934252CC8F55DF8FBCAD8431EAA8AEF665D"
},
{
"block_id_flag": 2,
"signature": "xFrCoyEVxIkJGZkfgaZSldLF2N+XGbKz9dPYftG0kOllaVdySP3K+PG0yYD1fZa3ggDueK0xH7a837f5NjhrBw==",
"timestamp": "2021-11-14T12:43:33.065000339Z",
"validator_address": "27D87AAA17B86AF55C7E6EC4FB637937FEF39FB2"
},
{
"block_id_flag": 2,
"signature": "ruBaopQiHEnoJUt83Cb7Kv5YRkBAMEuOpG+XfdJma6jpMRyQmSpyoE36yXXySiep++0mXn4aWYmXQUJ9fYhaBA==",
"timestamp": "2021-11-14T12:43:33.081703081Z",
"validator_address": "4A51CD530F9EB1111AFA5852FE4E7D5763B76929"
},
{
"block_id_flag": 2,
"signature": "iCT4VZT6xFEiWe6Zdl6QmkBvTq+c/PYcBoLe11QXyMFv17OaTU6B3nUCqOBdy7+BrxECd7X7Uef+z5fcpDVwAQ==",
"timestamp": "2021-11-14T12:43:33.063863277Z",
"validator_address": "FAAA2FF9E07C9D196528353B2453009DA30C4CC0"
},
{
"block_id_flag": 2,
"signature": "SzWfV4RrQ8S5gKd1j/aZQLbFKmWQdorxEFfjV/KM3BLcUIDt/i/zQGFFsmr7Aug+6wtQdiWr7n+CbLdWs15DCA==",
"timestamp": "2021-11-14T12:43:33.097049393Z",
"validator_address": "97829D6C29C61338D5F302FFB87863B8173C42F8"
},
{
"block_id_flag": 2,
"signature": "mORJnlzQEWx5dMc/7ZqiPyZ+FEjp8ggl/vBpMdZ9QH7k1g85A85CGdzqoLM0Yz47BIy24ZVh28axNU5gQNy6CQ==",
"timestamp": "2021-11-14T12:43:33.225935661Z",
"validator_address": "558BBD2F67F04FF5D4CEB2BC8A190C48511E003B"
},
{
"block_id_flag": 2,
"signature": "MP+yFZPlIShTBRFgfei+PX2Vza1vjRTeWiXQJA+Tw2+gHmudfKj3raGVRnuexv23isuHUW3wumSkGfdmH9jVAg==",
"timestamp": "2021-11-14T12:43:33.042658705Z",
"validator_address": "64289C62BC986E559DDAE53DA761D941F21F5ACD"
}
]
}
},
"block_id": {
"hash": "25177A063C58417A4D5B6630120E9D951343E307819C924F0E0D1F63AD58ABCA",
"parts": {
"hash": "8360E4850E063FB93C1881BA7B52D1D7C5C5AA040A626FFDE4222B9DF599444F",
"total": 1
}
}
}
}
8 changes: 8 additions & 0 deletions rpc/tests/gaia_fixtures/outgoing/block_at_height_4555980.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "89998a91-d121-4d42-a5de-5ddf6e942c93",
"jsonrpc": "2.0",
"method": "block",
"params": {
"height": "4555980"
}
}

0 comments on commit 92c502a

Please sign in to comment.