1
1
use std:: time:: Duration ;
2
2
3
- use alloy:: rpc:: types:: beacon:: BlsPublicKey ;
4
3
use commit_boost:: prelude:: * ;
5
4
use eyre:: { OptionExt , Result } ;
6
5
use lazy_static:: lazy_static;
@@ -51,19 +50,19 @@ impl DaCommitService {
51
50
let pubkey = * pubkeys. consensus . first ( ) . ok_or_eyre ( "no key available" ) ?;
52
51
info ! ( "Registered validator {pubkey}" ) ;
53
52
54
- let proxy_delegation_bls = self . config . signer_client . generate_bls_proxy_key ( pubkey) . await ?;
53
+ let proxy_delegation_bls = self . config . signer_client . generate_proxy_key_bls ( pubkey) . await ?;
55
54
info ! ( "Obtained a BLS proxy delegation:\n {proxy_delegation_bls}" ) ;
56
55
let proxy_bls = proxy_delegation_bls. message . proxy ;
57
56
58
57
let proxy_delegation_ecdsa =
59
- self . config . signer_client . generate_ecdsa_proxy_key ( pubkey) . await ?;
58
+ self . config . signer_client . generate_proxy_key_ecdsa ( pubkey) . await ?;
60
59
info ! ( "Obtained an ECDSA proxy delegation:\n {proxy_delegation_ecdsa}" ) ;
61
60
let proxy_ecdsa = proxy_delegation_ecdsa. message . proxy ;
62
61
63
62
let mut data = 0 ;
64
63
65
64
loop {
66
- self . send_request ( data, pubkey. into ( ) , proxy_bls. into ( ) , proxy_ecdsa) . await ?;
65
+ self . send_request ( data, pubkey, proxy_bls, proxy_ecdsa) . await ?;
67
66
sleep ( Duration :: from_secs ( self . config . extra . sleep_secs ) ) . await ;
68
67
data += 1 ;
69
68
}
@@ -78,16 +77,16 @@ impl DaCommitService {
78
77
) -> Result < ( ) > {
79
78
let datagram = Datagram { data } ;
80
79
81
- let request = SignConsensusRequest :: builder ( pubkey. into ( ) ) . with_msg ( & datagram) ;
80
+ let request = SignConsensusRequest :: builder ( pubkey) . with_msg ( & datagram) ;
82
81
let signature = self . config . signer_client . request_consensus_signature ( request) ;
83
82
84
- let proxy_request_bls = SignProxyRequest :: builder ( proxy_bls. into ( ) ) . with_msg ( & datagram) ;
83
+ let proxy_request_bls = SignProxyRequest :: builder ( proxy_bls) . with_msg ( & datagram) ;
85
84
let proxy_signature_bls =
86
- self . config . signer_client . request_proxy_bls_signature ( proxy_request_bls) ;
85
+ self . config . signer_client . request_proxy_signature_bls ( proxy_request_bls) ;
87
86
88
87
let proxy_request_ecdsa = SignProxyRequest :: builder ( proxy_ecdsa) . with_msg ( & datagram) ;
89
88
let proxy_signature_ecdsa =
90
- self . config . signer_client . request_proxy_ecdsa_signature ( proxy_request_ecdsa) ;
89
+ self . config . signer_client . request_proxy_signature_ecdsa ( proxy_request_ecdsa) ;
91
90
92
91
let ( signature, proxy_signature_bls, proxy_signature_ecdsa) = {
93
92
let res = tokio:: join!( signature, proxy_signature_bls, proxy_signature_ecdsa) ;
0 commit comments