fip | title | status | type | author | created | updated |
---|---|---|---|---|---|---|
47 |
Allow FIO Block Producers to update their information |
Final |
Functionality |
Eric Butz <[email protected]> |
2022-11-17 |
2024-01-19 |
This FIP proposes to extend FIO Protocol functionality to enable FIO Block Producers to use regproducer to update their producer information.
Contract | Action | Endpoint | Description |
---|---|---|---|
eosio | regproducer | /register_producer | Modifies the action to allow the updating of specific fields. |
Currently, regproducer can only be used to create new producer records. If a producer calls regproducer
to update their information, they get an error: Already registered as a producer.
FIO Block Producers have requested an enhancement to the protocol to allow the use of regproducer
to update their information.
- Register a new block producer
- Update public key, location, url for a registered block producer
Parameter | Required | Format | Definition |
---|---|---|---|
fio_address | Yes | FIO Address | Valid FIO Crypto Handle |
fio_pub_key | Yes | FIO Public Key | The producer's public key that is used for signing. |
url | Yes | Producer URL | URL of block producer's website. |
location | Yes | Producer Location | Location ID of where BPs servers are located. |
actor | Yes | 12 character string | Valid actor of signer |
max_fee | Yes | Positive Int | Maximum amount of SUFs the user is willing to pay for fee. Should be preceded by /get_fee for correct value. |
{
"fio_address": "producer@bob",
"fio_pub_key": "FIO7tHihSLJVRQ2HsiVGTXAh3RgfXQvVVPpMm8pwQtiTHQHPnY5dH",
"url": "https://bobp.io/",
"location": 80,
"actor": "aftyershcu22",
"max_fee": 10000000000
}
- Validate inputs as necessary
- Only fio_address, url, producer_public_key and location can be updated
- If registering new producer (owner does not exist in the table)
- Confirm fio_address is registered to owner
- The actor is authorized to emplace on behalf of the actor parameter
- A FIO Handle cannot be used again unless it has a new owner (actor)
- Emplace new producer record. The "actor"
- If owner already exists in producers table:
- If fio_address is changed, confirm it is registered to owner and update
- Update url, producer_public_key and location parameters (should be validated similar to new record)
The following exception handling conditions are altered. If the producer is active, assert the url, public_key or location are different and can be updated.
Error condition | Trigger | Type | fields:name | fields:value | Error message |
---|---|---|---|---|---|
ErrorFioNameNotReg | Producer calls regproducer and is already in producer table with is_active=1. | 400 | "actor" | Value sent in | "Already registered as producer" |
{
"status":"OK",
"fee_collected":"10000000000"
}
Change is required to facilitate updating of producer records.
https://github.com/fioprotocol/fio.contracts/tree/feature/regproducer_update
No backwards compatibility issues.
None