Closed buckyroberts closed 4 years ago
@buckyroberts i'm using standard Validator serializer from Bank project to generate the response payload, but, it different from Validator serializer from Validator project. This is what i get when i use it:
{
"notification_type": "PRIMARY_VALIDATOR_UPDATED_NOTIFICATION",
"payload": {
"account_number": "ad1f8845c6a1abb6011a2a434a079a087c460657aad54329a84b406dce8bf314",
"ip_address": "192.168.1.65",
"node_identifier": "3afdf37573f1a511def0bd85553404b7091a76bcd79cdcebba1310527b167521",
"port": 8000,
"protocol": "http",
"version": "v1.0",
"default_transaction_fee": 4,
"root_account_file": "https://gist.githubusercontent.com/buckyroberts/519b5cb82a0a5b5d4ae8a2175b722520/raw/9237deb449e27cab93cb89ea3346ecdfc61fe9ea/0.json",
"root_account_file_hash": "4694e1ee1dcfd8ee5f989e59ae40a9f751812bf5ca52aca2766b322c4060672b",
"seed_block_identifier": "",
"daily_confirmation_rate": null,
"trust": "100.00"
}
}
the only differences is:
If that config that was created by Validator serializer on Bank side work for us, we can leave it as it is and merge. If we need config in the absolutely same format as validator returns, here is ways to do it (maybe i missed somethong and there is more correct way?)
Any of this:
@fonar the standard Validator serializer from Bank project is good to use. The client won't be using those extra fields.
Background Information
Bank will attempt to update PV when:
Docs - https://thenewboston.com/guide/resync-triggers
Feature Requirements
When a Bank updates their PV, in addition to notifying all of their CV's (that logic is already implemented) the Banks also need to stream down notifications to users so their apps can be updated to use the new PV.
Tech Notes
/ws/primary_validator_updated
PRIMARY_VALIDATOR_UPDATED_NOTIFICATION
/config
data of the new PVSample Notification Shape