public class ChainConfigInstance extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ContractId |
| Modifier and Type | Method and Description |
|---|---|
void |
evolveChainConfig(ChainConfigData newConfig,
List<Signer> owners,
List<Long> ownerCtrs)
Sends the instruction to change the Chain Config and returns immediately.
|
Instruction |
evolveChainConfigInstruction(ChainConfigData newConfig,
List<Identity> ids,
List<Long> ownerCtrs)
Creates an instruction to evolve the value in byzcoin.
|
void |
evolveConfigAndWait(ChainConfigData newConfig,
List<Signer> owners,
List<Long> ownerCtrs,
int wait)
Send the instruction to change the Chain Config and wait for it to be included.
|
static ChainConfigInstance |
fromByzcoin(ByzCoinRPC bc)
Instantiates a new ChainConfigInstance given a working byzcoin service.
|
static ChainConfigInstance |
fromByzcoin(ByzCoinRPC bc,
Proof p)
Convenience function to connect to an existing ValueInstance.
|
ChainConfigData |
getChainConfig() |
InstanceId |
getId() |
Instance |
getInstance() |
void |
update()
Updates the value by getting the latest instance and updating it.
|
public static String ContractId
public void update()
throws CothorityCommunicationException,
CothorityNotFoundException,
CothorityCryptoException
CothorityNotFoundException - if the chainConfiguration couldn't be found in ByzCoinCothorityCommunicationException - if there was an communication errorCothorityCryptoException - if there is something wrong with the proofpublic Instruction evolveChainConfigInstruction(ChainConfigData newConfig, List<Identity> ids, List<Long> ownerCtrs)
newConfig - the new config to store in the ChainConfigownerCtrs - is the list of monotonically increasing counters that will go into the instruction,
they must match the signers who will eventually sign the instructionCothorityCryptoException - if there's a problem with the cryptographypublic void evolveChainConfig(ChainConfigData newConfig, List<Signer> owners, List<Long> ownerCtrs) throws CothorityException
newConfig - the new config to storeowners - a list of owners needed to evolve the configurationownerCtrs - a list of counters which must map to the list of ownersCothorityException - if something goes wrongpublic void evolveConfigAndWait(ChainConfigData newConfig, List<Signer> owners, List<Long> ownerCtrs, int wait) throws CothorityException
newConfig - the new config to stureowners - a list of owners needed to evolve the configurationownerCtrs - a list of counters which must map to the list of ownerswait - how many blocks to wait for inclusion of the instructionCothorityException - if something goes wrongpublic InstanceId getId()
public ChainConfigData getChainConfig()
public Instance getInstance()
public static ChainConfigInstance fromByzcoin(ByzCoinRPC bc) throws CothorityNotFoundException, CothorityCommunicationException, CothorityCryptoException
bc - is a running ByzCoin serviceCothorityNotFoundException - if the configuration is not where it is supposed to beCothorityCommunicationException - if the communication throws an errorCothorityCryptoException - if there is something wrong with the proofpublic static ChainConfigInstance fromByzcoin(ByzCoinRPC bc, Proof p) throws CothorityNotFoundException
bc - a running ByzCoin servicep - the proof for the valueInstanceCothorityNotFoundException - if the configuration is not where it is supposed to beCopyright © 2019. All rights reserved.