mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-11 21:49:26 +00:00
Fix weight estimation for RctType::ClsagBulletproof TXs
This commit is contained in:
1
.github/workflows/monero-tests.yaml
vendored
1
.github/workflows/monero-tests.yaml
vendored
@@ -42,7 +42,6 @@ jobs:
|
|||||||
GITHUB_CI=true RUST_BACKTRACE=1 cargo test --package monero-seed --lib
|
GITHUB_CI=true RUST_BACKTRACE=1 cargo test --package monero-seed --lib
|
||||||
GITHUB_CI=true RUST_BACKTRACE=1 cargo test --package polyseed --lib
|
GITHUB_CI=true RUST_BACKTRACE=1 cargo test --package polyseed --lib
|
||||||
GITHUB_CI=true RUST_BACKTRACE=1 cargo test --package monero-wallet-util --lib
|
GITHUB_CI=true RUST_BACKTRACE=1 cargo test --package monero-wallet-util --lib
|
||||||
GITHUB_CI=true RUST_BACKTRACE=1 cargo test --package monero-serai-verify-chain --lib
|
|
||||||
|
|
||||||
# Doesn't run unit tests with features as the tests workflow will
|
# Doesn't run unit tests with features as the tests workflow will
|
||||||
|
|
||||||
|
|||||||
@@ -251,6 +251,7 @@ impl SignableTransaction {
|
|||||||
Err(SendError::NoInputs)?;
|
Err(SendError::NoInputs)?;
|
||||||
}
|
}
|
||||||
for (_, decoys) in &self.inputs {
|
for (_, decoys) in &self.inputs {
|
||||||
|
// TODO: Add a function for the ring length
|
||||||
if decoys.len() !=
|
if decoys.len() !=
|
||||||
match self.rct_type {
|
match self.rct_type {
|
||||||
RctType::ClsagBulletproof => 11,
|
RctType::ClsagBulletproof => 11,
|
||||||
|
|||||||
@@ -122,7 +122,14 @@ impl SignableTransaction {
|
|||||||
key_images.push(ED25519_BASEPOINT_POINT);
|
key_images.push(ED25519_BASEPOINT_POINT);
|
||||||
clsags.push(Clsag {
|
clsags.push(Clsag {
|
||||||
D: ED25519_BASEPOINT_POINT,
|
D: ED25519_BASEPOINT_POINT,
|
||||||
s: vec![Scalar::ZERO; 16],
|
s: vec![
|
||||||
|
Scalar::ZERO;
|
||||||
|
match self.rct_type {
|
||||||
|
RctType::ClsagBulletproof => 11,
|
||||||
|
RctType::ClsagBulletproofPlus => 16,
|
||||||
|
_ => unreachable!("unsupported RCT type"),
|
||||||
|
}
|
||||||
|
],
|
||||||
c1: Scalar::ZERO,
|
c1: Scalar::ZERO,
|
||||||
});
|
});
|
||||||
pseudo_outs.push(ED25519_BASEPOINT_POINT);
|
pseudo_outs.push(ED25519_BASEPOINT_POINT);
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ pub async fn rpc() -> SimpleRequestRpc {
|
|||||||
SimpleRequestRpc::new("http://serai:seraidex@127.0.0.1:18081".to_string()).await.unwrap();
|
SimpleRequestRpc::new("http://serai:seraidex@127.0.0.1:18081".to_string()).await.unwrap();
|
||||||
|
|
||||||
// Only run once
|
// Only run once
|
||||||
if rpc.get_height().await.unwrap() < 100 {
|
if rpc.get_height().await.unwrap() < 120 {
|
||||||
return rpc;
|
return rpc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ pub async fn rpc() -> SimpleRequestRpc {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Mine 100 blocks to ensure decoy availability
|
// Mine 100 blocks to ensure decoy availability
|
||||||
rpc.generate_blocks(&addr, 100).await.unwrap();
|
rpc.generate_blocks(&addr, 120).await.unwrap();
|
||||||
|
|
||||||
rpc
|
rpc
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,5 +7,5 @@ RPC_PASS="${RPC_PASS:=seraidex}"
|
|||||||
monerod --non-interactive --regtest --offline --fixed-difficulty=1 \
|
monerod --non-interactive --regtest --offline --fixed-difficulty=1 \
|
||||||
--no-zmq --rpc-bind-ip=0.0.0.0 --rpc-bind-port=18081 --confirm-external-bind \
|
--no-zmq --rpc-bind-ip=0.0.0.0 --rpc-bind-port=18081 --confirm-external-bind \
|
||||||
--rpc-access-control-origins "*" --disable-rpc-ban \
|
--rpc-access-control-origins "*" --disable-rpc-ban \
|
||||||
--rpc-login=$RPC_USER:$RPC_PASS \
|
--rpc-login=$RPC_USER:$RPC_PASS --log-level 2 \
|
||||||
$1
|
$1
|
||||||
|
|||||||
Reference in New Issue
Block a user