I don't have any experience dealing with Validator configuration, but I can share with you the idea for the Public Key we use in TON and how it interacts with smart contracts.
import { randomBytes } from "crypto";
import { keyPairFromSeed } from "ton-crypto";
let keypair = keyPairFromSeed(randomBytes(32));
let public_key_hex = keypair.publicKey.toString("hex");
let public_key_int = BigInt("0x" + public_key_hex);
let public_key_cell = beginCell().storeUint(public_key_int, 256).endCell();
console.log(keypair.publicKey);
console.log(public_key_hex);
console.log(public_key_int);
console.log(public_key_cell);
You will get:
<Buffer 3b 19 27 24 86 4a 6a 7b fa 02 5f 4e b6 20 c9 fb 51 1e 31 b6 5f 9f 4f 72 8f cc d8 ac dd ea 12 c1>
3b192724864a6a7bfa025f4eb620c9fb511e31b65f9f4f728fccd8acddea12c1
26730899395840241403219970071225489010060933487521107827084323612022786364097n
x{3B192724864A6A7BFA025F4EB620C9FB511E31B65F9F4F728FCCD8ACDDEA12C1}
As you can see, these four lines of results are all the Public Keys I generated, but they look different. This is why you got the error that the format was incorrect. I think you need to pass the Public Key as an Unsigned Integer with 256 bits to try out.
In TON, or TVM, we only pass the Cell datatype to the smart contract. That is why I need to convert my uint
Public Key to the Cell data type there!
Validators create a new keypair for each round of validation, and use that to participate in elections and create blocks. They may also change their ADNL address on each round, but that's not what they usually do.
If you want to look at their wallets on TON blockchain explorers, you have to first find the controlling wallet, that is the wallet that sends TON to participate in elections.
This information can be looked up by running the get method participant_list_extended
and it only returns useful data before election is finished.
For example, if I start lite-client on testnet and run this command:
runmethod kf8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM_BP participant_list_extended
The result will be something like:
result: [ 1692631422 1692631242 10000000000000 14019250477034344 ([1785726394745260293869629821187026920743160317479397166793665319642004602034 [1000001000000000 1966080 101184175721668699951755525112601793644527200681998252172335557711320252984635 87647878168491834245916094424296400596840187149190938906730361646994336065092]] [...
Here, the first 4 fields are related to election (elect_at, elect_close, min_stake, total_stake
), then there is a list of validators, first field being the validator id, and then 4 related fields, the third one being the address of controlling wallet.
For example, here, 1785726394745260293869629821187026920743160317479397166793665319642004602034
is the validator id or validator_pubkey, and 101184175721668699951755525112601793644527200681998252172335557711320252984635
is the decimal number which can identify the wallet. If you convert it to a hex value, and then convert it to a TON address (ton.org/address and prepending with '-1:') then you'll arrive at address: kf_ftDbFY_gRWt2FkqVk68scKhuoniW6Po7GndTGdkCtO_2Z.
meeting with a Psychic medium and I have to say, it's really worth it. It had been 6months since my husband left me without saying anything.All thanks to Dr Adoda I was able to connect with my husband again with his powerful reunion love spell and now he loves me more than he used to. Eternally grateful with The Great Dr Adoda! I highly recommend, His contact details [email protected]