fixed the generation of test that was miscalculating t0 and t1

This commit is contained in:
thomaslavaur 2025-09-02 10:13:07 +02:00
parent c4a41d9963
commit 748009d0a0
2 changed files with 10 additions and 4 deletions

View File

@ -239,8 +239,11 @@ epoch_nonce = F(randrange(0, p,1))
slot_number = F(randrange(0, 2**32,1))
total_stake = F(5000)
t0 = F(0x27b6fe27507ca57ca369280400c79b5d2f58ff94d87cb0fbfc8294eb69eb1ea)
t1 = F(0x104bfd09ebdd0a57772289d0973489b62662a4dc6f09da8b4af3c5cfb1dcdd)
t0_constant = F(0x27b6fe27507ca57ca369280400c79b5d2f58ff94d87cb0fbfc8294eb69eb1ea)
t1_constant = F(0x104bfd09ebdd0a57772289d0973489b62662a4dc6f09da8b4af3c5cfb1dcdd)
t0 = F(int(t0_constant) / total_stake)
t1 = F(p- (int(t1_constant) / total_stake**2))
value = F(total_stake / 100)
threshold = (t0 + t1 * value) * value

View File

@ -219,8 +219,11 @@ if total_stake >= p:
print("total stake must be less than p")
exit()
t0 = F(0x27b6fe27507ca57ca369280400c79b5d2f58ff94d87cb0fbfc8294eb69eb1ea)
t1 = F(0x104bfd09ebdd0a57772289d0973489b62662a4dc6f09da8b4af3c5cfb1dcdd)
t0_constant = F(0x27b6fe27507ca57ca369280400c79b5d2f58ff94d87cb0fbfc8294eb69eb1ea)
t1_constant = F(0x104bfd09ebdd0a57772289d0973489b62662a4dc6f09da8b4af3c5cfb1dcdd)
t0 = F(int(t0_constant) / total_stake)
t1 = F(p- (int(t1_constant) / total_stake**2))
value = F(total_stake / 100)