aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

[Bug] ValidatorConfig inconsistency between Move type, `aptos` crate and `types` crate

Open so-schen opened this issue 9 months ago • 0 comments

🐛 Bug

Regarding consensus_public_key of ValidatorConfig resource defined in Move contract is vector, while in Rust in types crate, it has type bls12381::PublicKey in aptos crate, it as Vec.

To reproduce

If before calling rotate consensus key, we try to read ValidatorConfig on-chain, it will fail to deserailze because it is initialized as empty vector, while we try to deserialize into bls12381::PublicKey

Expected Behavior

should update ValidatorConfig in types consistent with Move type, and aptos cli crate can reuse same type to avoid confusion

System information

version v.1.10, should also exist in latest codes

so-schen avatar May 01 '24 11:05 so-schen