Open jolestar opened 8 months ago
How about generating random seed in Rust and stored in TxContext, and then read it in contract?
How about generating random seed in Rust and stored in TxContext, and then read it in contract?
It is unverifiable
How about generating random seed in Rust and stored in TxContext, and then read it in contract?
It is unverifiable
May the verifiable feature is not required unless we have consensus mechanism? We can emit an event every query a random number.
May the verifiable feature is not required unless we have consensus mechanism?
The transaction needs to be synced to another executor or proposer node, so the execution result must be determinate. Maybe we can put the sequencer's transaction witness data in the TxContext, and sync the transaction and witness data together. #771
ZK-VRF please refer:
https://github.com/zkvrf/zkvrf https://github.com/jae-cuz/zk-draw
A simple solution:
TransactionSequenceInfo
.seed
in the data of the sequencer signature. pub struct TransactionSequenceInfo {
/// The tx order
pub tx_order: u128,
/// The tx order signature, it is the signature of the sequencer to commit the tx order.
pub tx_order_signature: Authenticator,
/// The tx accumulator root after the tx is append to the accumulator.
pub tx_accumulator_root: H256,
}
Or can we directly use the tx_order_signature
as the random seed?