Skip to content

Commit

Permalink
types: add deserializer fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
riptl authored and ripatel-fd committed Dec 12, 2023
1 parent 29a2d63 commit 59fa413
Show file tree
Hide file tree
Showing 22 changed files with 681 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/flamenco/types/Local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ $(call add-hdrs,fd_bincode.h fd_types.h fd_types_custom.h fd_types_meta.h fd_typ
$(call add-objs,fd_types fd_types_yaml,fd_flamenco)
$(call make-unit-test,test_types_meta,test_types_meta,fd_flamenco fd_ballet fd_util)
$(call make-unit-test,test_types_yaml,test_types_yaml,fd_flamenco fd_ballet fd_util)
$(call make-unit-test,test_types_fixtures,test_types_fixtures,fd_flamenco fd_ballet fd_util)
endif

# "ConfirmedBlock" Protobuf definitions
Expand Down
1 change: 1 addition & 0 deletions src/flamenco/types/fixtures/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* -text -diff
1 change: 1 addition & 0 deletions src/flamenco/types/fixtures/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.actual.*
Binary file added src/flamenco/types/fixtures/gossip_pull_req.bin
Binary file not shown.
158 changes: 158 additions & 0 deletions src/flamenco/types/fixtures/gossip_pull_req.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
pull_req:
filter:
filter:
(null):
- 1017661136073509108
- 9141639801749198208
- 2457319821573164756
bits:
bits:
(null):
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
len: 6168
num_bits_set: 0
mask: 288230376151711743
mask_bits: 6
value:
signature: '2ciwMym6Gg6h8SJhQ9TGoHWPmbjoGKR9YxRUuXvLuHev4x57yaaiHppM6md7SPzfvr118SaxcP39rAPKwvKzitQp'
data:
contact_info_v1:
id: 'FtxH6Na6AJk8hM21DzsHtmGCuwgm4qWdUTosAdN9fmTD'
gossip:
addr:
ip4: '0.0.0.0'
port: 0
tvu:
addr:
ip4: '0.0.0.0'
port: 0
tvu_fwd:
addr:
ip4: '0.0.0.0'
port: 0
repair:
addr:
ip4: '0.0.0.0'
port: 0
tpu:
addr:
ip4: '0.0.0.0'
port: 0
tpu_fwd:
addr:
ip4: '0.0.0.0'
port: 0
tpu_vote:
addr:
ip4: '0.0.0.0'
port: 0
rpc:
addr:
ip4: '0.0.0.0'
port: 0
rpc_pubsub:
addr:
ip4: '0.0.0.0'
port: 0
serve_repair:
addr:
ip4: '0.0.0.0'
port: 0
wallclock: 1660627129489
shred_version: 0
Binary file not shown.
49 changes: 49 additions & 0 deletions src/flamenco/types/fixtures/gossip_pull_resp_contact_info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
pull_resp:
pubkey: '9Diwct7c6braQnne86jutswAW4iZmPfcg6VHVp4FBrLn'
(null):
- signature: '39P8nJ2kNPZBLkJ4YmMimiCBNSto4qBijbGNVKbbwKoQJCm1s3kEuPPijzqR52rgvrKicpDVLptQ3SeNZvKwc1p6'
data:
contact_info_v1:
id: '9Diwct7c6braQnne86jutswAW4iZmPfcg6VHVp4FBrLn'
gossip:
addr:
ip4: '127.0.0.1'
port: 1024
tvu:
addr:
ip4: '127.0.0.1'
port: 1025
tvu_fwd:
addr:
ip4: '127.0.0.1'
port: 1026
repair:
addr:
ip4: '127.0.0.1'
port: 1031
tpu:
addr:
ip4: '127.0.0.1'
port: 1027
tpu_fwd:
addr:
ip4: '127.0.0.1'
port: 1028
tpu_vote:
addr:
ip4: '127.0.0.1'
port: 1029
rpc:
addr:
ip4: '127.0.0.1'
port: 8899
rpc_pubsub:
addr:
ip4: '127.0.0.1'
port: 8900
serve_repair:
addr:
ip4: '127.0.0.1'
port: 1032
wallclock: 1660658416429
shred_version: 25514
Binary file not shown.
109 changes: 109 additions & 0 deletions src/flamenco/types/fixtures/gossip_pull_resp_contact_info_v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
push_msg:
pubkey: 'Hm5NNNZpBgAo5j3gRwJtkHXihpLzdCyP3WRWHLzcPSup'
(null):
- signature: '2M1XTfiWd8KDidnMBtvswZERMCxRuzMohm87JqUUhCE8bjfCmkbBmoa3VExgq4paPQ2H9ZGWxLiMA7BsQxjbhj2E'
data:
contact_info_v1:
id: 'Hm5NNNZpBgAo5j3gRwJtkHXihpLzdCyP3WRWHLzcPSup'
gossip:
addr:
ip4: '127.0.0.1'
port: 1024
tvu:
addr:
ip4: '127.0.0.1'
port: 1025
tvu_fwd:
addr:
ip4: '127.0.0.1'
port: 1026
repair:
addr:
ip4: '127.0.0.1'
port: 1035
tpu:
addr:
ip4: '127.0.0.1'
port: 1027
tpu_fwd:
addr:
ip4: '127.0.0.1'
port: 1028
tpu_vote:
addr:
ip4: '127.0.0.1'
port: 1029
rpc:
addr:
ip4: '127.0.0.1'
port: 8899
rpc_pubsub:
addr:
ip4: '127.0.0.1'
port: 8900
serve_repair:
addr:
ip4: '127.0.0.1'
port: 1032
wallclock: 1702312087747
shred_version: 22793
- signature: '3TQ3239FjdmUrLnGTu9ezQC5gnU9k511iY8wRyRkDhYp16H5b7CFPeRwiaWUtTTH6pMAT5UDcn7AzSznV5nmx3Uq'
data:
contact_info_v2:
from: 'Hm5NNNZpBgAo5j3gRwJtkHXihpLzdCyP3WRWHLzcPSup'
wallclock: 1702312087747
outset: 1702311996165159
shred_version: 22793
version:
major: 1
minor: 18
patch: 0
commit: 0
feature_set: 367846227
client: 0
(null):
- ip4: '127.0.0.1'
(null):
- key: 0
index: 0
offset: 1024
- key: 10
index: 0
offset: 1
- key: 11
index: 0
offset: 1
- key: 5
index: 0
offset: 1
- key: 6
index: 0
offset: 1
- key: 9
index: 0
offset: 1
- key: 4
index: 0
offset: 3
- key: 8
index: 0
offset: 1
- key: 7
index: 0
offset: 1
- key: 1
index: 0
offset: 1
- key: 2
index: 0
offset: 7864
- key: 3
index: 0
offset: 1
- signature: '64dzXW7Yv2U6qvME4ZnQWgQqos3eqAqQj9Z3q21r6XKgg66rAk2z6dNBptqExgWL7shZ7Dgr86TiGs97ApcAzyM5'
data:
node_instance:
from: 'Hm5NNNZpBgAo5j3gRwJtkHXihpLzdCyP3WRWHLzcPSup'
wallclock: 1702312087747
timestamp: 1702311997433
token: 16949904193290425001
Binary file not shown.
10 changes: 10 additions & 0 deletions src/flamenco/types/fixtures/gossip_pull_resp_node_instance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pull_resp:
pubkey: '9Diwct7c6braQnne86jutswAW4iZmPfcg6VHVp4FBrLn'
(null):
- signature: '2x1fZN5oR8BXGKW8CuHQBw5rKL68sn4WRBrDnepjn4TXmd4XWLwUUo5kdq8npmPbtCUwcBy8nq4667wRSUph7jv9'
data:
node_instance:
from: '9Diwct7c6braQnne86jutswAW4iZmPfcg6VHVp4FBrLn'
wallclock: 1660658416907
timestamp: 1660658416429
token: 6711090452999269525
Binary file not shown.
11 changes: 11 additions & 0 deletions src/flamenco/types/fixtures/gossip_pull_resp_snapshot_hashes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pull_resp:
pubkey: '9Diwct7c6braQnne86jutswAW4iZmPfcg6VHVp4FBrLn'
(null):
- signature: '4ovwbuxF1k5hAej248Eay3ZLDssxXi9P4UWtsU6vu3jZmAHedtsZ55fkdSjLp4GicXCZCoCmHLbk5nHMnhYZ2QWq'
data:
snapshot_hashes:
from: '9Diwct7c6braQnne86jutswAW4iZmPfcg6VHVp4FBrLn'
(null):
- slot: 47411
hash: 'CDhgJ4hV9WK3KNTQK5mMcS2RtfphCeDsZeqesAgnbrkh'
wallclock: 1660658416429
Binary file not shown.
13 changes: 13 additions & 0 deletions src/flamenco/types/fixtures/gossip_pull_resp_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pull_resp:
pubkey: '9Diwct7c6braQnne86jutswAW4iZmPfcg6VHVp4FBrLn'
(null):
- signature: '41fQjMjZF8Uw3ydc4tfSiJZGkBwFSu8SqqaqsDysiDepVrhV1QvYsqETystLsay7swYxPxDnfFVX4mxqMzoFWy4S'
data:
version_v2:
from: '9Diwct7c6braQnne86jutswAW4iZmPfcg6VHVp4FBrLn'
wallclock: 1660658416907
major: 1
minor: 12
patch: 0
commit: null
feature_set: 402709457
Binary file added src/flamenco/types/fixtures/gossip_push_vote.bin
Binary file not shown.
17 changes: 17 additions & 0 deletions src/flamenco/types/fixtures/gossip_push_vote.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
push_msg:
pubkey: '9Diwct7c6braQnne86jutswAW4iZmPfcg6VHVp4FBrLn'
(null):
- signature: '3WtiW29DRc4jGx9bqPkBm8evtL1bEnwiGnPRZbp2GXXkuZ7SfJpFEdEfoMJn5iZzHUjXyFCG4f4sySQS13oqF22w'
data:
vote:
index: 7
from: '9Diwct7c6braQnne86jutswAW4iZmPfcg6VHVp4FBrLn'
txn: '2yGd7N4nJJP3Mpjr7JguB8xnCRiMRYLeqPePCjZUqU8KX5JaeqhE18fQQqV7n6X99joo17wwgb28hgd68FXdz7e'
wallclock: 1660658421296
- signature: '5Xrqaz4ESCnZyGKY9xT4bXDTrM54mDBdGD8T4ooSHkGYH7LHMrDu9oP6r6ofi4ydKDtvGgTdJZsUcdsmqkipD1Sg'
data:
vote:
index: 8
from: '9Diwct7c6braQnne86jutswAW4iZmPfcg6VHVp4FBrLn'
txn: '5AM5SuVELss39kVeYgPcdKYnjZtS1oPngc4rphVodYgaXkfMYXEpAJKimtJY42XL2roH9eNqpqf4xdreFXGnUVAb'
wallclock: 1660658421764
Binary file added src/flamenco/types/fixtures/txn_vote.bin
Binary file not shown.
1 change: 1 addition & 0 deletions src/flamenco/types/fixtures/txn_vote.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
'2yGd7N4nJJP3Mpjr7JguB8xnCRiMRYLeqPePCjZUqU8KX5JaeqhE18fQQqV7n6X99joo17wwgb28hgd68FXdz7e'
Binary file added src/flamenco/types/fixtures/vote_account.bin
Binary file not shown.
Loading

0 comments on commit 59fa413

Please sign in to comment.