Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ solana-bincode = "3.0.0"
solana-blake3-hasher = "3.0.0"
solana-bloom = { path = "bloom", version = "=3.1.0" }
solana-bls-signatures = { version = "1.0.0", features = ["serde"] }
solana-bn254 = "3.0.0"
solana-bn254 = "3.1.1"
solana-borsh = "3.0.0"
solana-bpf-loader-program = { path = "programs/bpf_loader", version = "=3.1.0" }
solana-bucket-map = { path = "bucket_map", version = "=3.1.0" }
Expand Down
4 changes: 2 additions & 2 deletions programs/sbf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions programs/sbf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ solana-account-info = "=3.0.0"
solana-accounts-db = { path = "../../accounts-db", version = "=3.1.0" }
solana-big-mod-exp = "=3.0.0"
solana-blake3-hasher = { version = "=3.0.0", features = ["blake3"] }
solana-bn254 = "=3.0.0"
solana-bn254 = "=3.1.1"
solana-bpf-loader-program = { path = "../bpf_loader", version = "=3.1.0" }
solana-cli-output = { path = "../../cli-output", version = "=3.1.0" }
solana-clock = { version = "=3.0.0", features = ["serde", "sysvar"] }
Expand Down Expand Up @@ -249,7 +249,9 @@ solana-svm-type-overrides = { workspace = true }
solana-system-interface = "2.0"
solana-sysvar = "3.0.0"
solana-transaction = "3.0.0"
solana-transaction-context = { workspace = true, features = ["dev-context-only-utils"] }
solana-transaction-context = { workspace = true, features = [
"dev-context-only-utils",
] }
solana-transaction-error = "3.0.0"
solana-transaction-status = { workspace = true }
solana-vote = { workspace = true }
Expand Down
66 changes: 34 additions & 32 deletions programs/sbf/rust/alt_bn128/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
//! Alt_bn128 Syscalls tests

use {
solana_bn254::prelude::{alt_bn128_addition, alt_bn128_multiplication, alt_bn128_pairing},
solana_bn254::prelude::{
alt_bn128_g1_addition_be, alt_bn128_g1_multiplication_be, alt_bn128_pairing_be,
},
solana_msg::msg,
solana_program_entrypoint::{custom_heap_default, custom_panic_default},
};

fn alt_bn128_addition_test() {
// chfast1
let result = alt_bn128_addition(&[
let result = alt_bn128_g1_addition_be(&[
0x18, 0xb1, 0x8a, 0xcf, 0xb4, 0xc2, 0xc3, 0x2, 0x76, 0xdb, 0x54, 0x11, 0x36, 0x8e, 0x71,
0x85, 0xb3, 0x11, 0xdd, 0x12, 0x46, 0x91, 0x61, 0xc, 0x5d, 0x3b, 0x74, 0x3, 0x4e, 0x9,
0x3d, 0xc9, 0x6, 0x3c, 0x90, 0x9c, 0x47, 0x20, 0x84, 0xc, 0xb5, 0x13, 0x4c, 0xb9, 0xf5,
Expand All @@ -32,7 +34,7 @@ fn alt_bn128_addition_test() {
); // 2243525c5efd4b9c3d3c45ac0ca3fe4dd85e830a4ce6b65fa1eeaee202839703301d1d33be6da8e509df21cc35964723180eed7532537db9ae5e7d48f195c915

// chfast2
let result = alt_bn128_addition(&[
let result = alt_bn128_g1_addition_be(&[
0x22, 0x43, 0x52, 0x5c, 0x5e, 0xfd, 0x4b, 0x9c, 0x3d, 0x3c, 0x45, 0xac, 0xc, 0xa3, 0xfe,
0x4d, 0xd8, 0x5e, 0x83, 0xa, 0x4c, 0xe6, 0xb6, 0x5f, 0xa1, 0xee, 0xae, 0xe2, 0x2, 0x83,
0x97, 0x3, 0x30, 0x1d, 0x1d, 0x33, 0xbe, 0x6d, 0xa8, 0xe5, 0x9, 0xdf, 0x21, 0xcc, 0x35,
Expand All @@ -56,7 +58,7 @@ fn alt_bn128_addition_test() {
); // 2bd3e6d0f3b142924f5ca7b49ce5b9d54c4703d7ae5648e61d02268b1a0a9fb721611ce0a6af85915e2f1d70300909ce2e49dfad4a4619c8390cae66cefdb204

// cdetrio1
let result = alt_bn128_addition(&[
let result = alt_bn128_g1_addition_be(&[
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
Expand All @@ -78,7 +80,7 @@ fn alt_bn128_addition_test() {
); // 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

// cdetrio2
let result = alt_bn128_addition(&[
let result = alt_bn128_g1_addition_be(&[
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
Expand All @@ -96,7 +98,7 @@ fn alt_bn128_addition_test() {
); // 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

// cdetrio3
let result = alt_bn128_addition(&[
let result = alt_bn128_g1_addition_be(&[
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
Expand All @@ -115,7 +117,7 @@ fn alt_bn128_addition_test() {
); // 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

// cdetrio4
let result = alt_bn128_addition(&[]); // empty
let result = alt_bn128_g1_addition_be(&[]); // empty
assert!(result.is_ok());
assert_eq!(
result.unwrap(),
Expand All @@ -128,7 +130,7 @@ fn alt_bn128_addition_test() {
); // 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

// cdetrio5
let result = alt_bn128_addition(&[
let result = alt_bn128_g1_addition_be(&[
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
Expand All @@ -150,7 +152,7 @@ fn alt_bn128_addition_test() {
); // 00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002

// cdetrio6
let result = alt_bn128_addition(&[
let result = alt_bn128_g1_addition_be(&[
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
Expand All @@ -168,7 +170,7 @@ fn alt_bn128_addition_test() {
); // 00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002

// cdetrio7
let result = alt_bn128_addition(&[
let result = alt_bn128_g1_addition_be(&[
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
Expand All @@ -190,7 +192,7 @@ fn alt_bn128_addition_test() {
); // 00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002

// cdetrio8
let result = alt_bn128_addition(&[
let result = alt_bn128_g1_addition_be(&[
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
Expand All @@ -213,7 +215,7 @@ fn alt_bn128_addition_test() {
); // 030644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd315ed738c0e0a7c92e7845f96b2ae9c0a68a6a449e3538fc7ff3ebf7a5a18a2c4

// cdetrio9
let result = alt_bn128_addition(&[
let result = alt_bn128_g1_addition_be(&[
0x17, 0xc1, 0x39, 0xdf, 0xe, 0xfe, 0xe0, 0xf7, 0x66, 0xbc, 0x2, 0x4, 0x76, 0x2b, 0x77,
0x43, 0x62, 0xe4, 0xde, 0xd8, 0x89, 0x53, 0xa3, 0x9c, 0xe8, 0x49, 0xa8, 0xa7, 0xfa, 0x16,
0x3f, 0xa9, 0x1, 0xe0, 0x55, 0x9b, 0xac, 0xb1, 0x60, 0x66, 0x47, 0x64, 0xa3, 0x57, 0xaf,
Expand All @@ -239,7 +241,7 @@ fn alt_bn128_addition_test() {

fn alt_bn128_multiplication_test() {
// chfast1
let result = alt_bn128_multiplication(&[
let result = alt_bn128_pairing_be(&[
0x2b, 0xd3, 0xe6, 0xd0, 0xf3, 0xb1, 0x42, 0x92, 0x4f, 0x5c, 0xa7, 0xb4, 0x9c, 0xe5, 0xb9,
0xd5, 0x4c, 0x47, 0x3, 0xd7, 0xae, 0x56, 0x48, 0xe6, 0x1d, 0x2, 0x26, 0x8b, 0x1a, 0xa,
0x9f, 0xb7, 0x21, 0x61, 0x1c, 0xe0, 0xa6, 0xaf, 0x85, 0x91, 0x5e, 0x2f, 0x1d, 0x70, 0x30,
Expand All @@ -261,7 +263,7 @@ fn alt_bn128_multiplication_test() {
); // 070a8d6a982153cae4be29d434e8faef8a47b274a053f5a4ee2a6c9c13c31e5c031b8ce914eba3a9ffb989f9cdd5b0f01943074bf4f0f315690ec3cec6981afc

// chfast2
let result = alt_bn128_multiplication(&[
let result = alt_bn128_pairing_be(&[
0x7, 0xa, 0x8d, 0x6a, 0x98, 0x21, 0x53, 0xca, 0xe4, 0xbe, 0x29, 0xd4, 0x34, 0xe8, 0xfa,
0xef, 0x8a, 0x47, 0xb2, 0x74, 0xa0, 0x53, 0xf5, 0xa4, 0xee, 0x2a, 0x6c, 0x9c, 0x13, 0xc3,
0x1e, 0x5c, 0x3, 0x1b, 0x8c, 0xe9, 0x14, 0xeb, 0xa3, 0xa9, 0xff, 0xb9, 0x89, 0xf9, 0xcd,
Expand All @@ -283,7 +285,7 @@ fn alt_bn128_multiplication_test() {
); // 025a6f4181d2b4ea8b724290ffb40156eb0adb514c688556eb79cdea0752c2bb2eff3f31dea215f1eb86023a133a996eb6300b44da664d64251d05381bb8a02e

// chfast3
let result = alt_bn128_multiplication(&[
let result = alt_bn128_g1_multiplication_be(&[
0x2, 0x5a, 0x6f, 0x41, 0x81, 0xd2, 0xb4, 0xea, 0x8b, 0x72, 0x42, 0x90, 0xff, 0xb4, 0x1,
0x56, 0xeb, 0xa, 0xdb, 0x51, 0x4c, 0x68, 0x85, 0x56, 0xeb, 0x79, 0xcd, 0xea, 0x7, 0x52,
0xc2, 0xbb, 0x2e, 0xff, 0x3f, 0x31, 0xde, 0xa2, 0x15, 0xf1, 0xeb, 0x86, 0x2, 0x3a, 0x13,
Expand All @@ -305,7 +307,7 @@ fn alt_bn128_multiplication_test() {
); // 14789d0d4a730b354403b5fac948113739e276c23e0258d8596ee72f9cd9d3230af18a63153e0ec25ff9f2951dd3fa90ed0197bfef6e2a1a62b5095b9d2b4a27

// cdetrio1
let result = alt_bn128_multiplication(&[
let result = alt_bn128_g1_multiplication_be(&[
0x1a, 0x87, 0xb0, 0x58, 0x4c, 0xe9, 0x2f, 0x45, 0x93, 0xd1, 0x61, 0x48, 0x6, 0x14, 0xf2,
0x98, 0x90, 0x35, 0x22, 0x56, 0x9, 0xf0, 0x80, 0x58, 0xcc, 0xfa, 0x3d, 0xf, 0x94, 0xf,
0xeb, 0xe3, 0x1a, 0x2f, 0x3c, 0x95, 0x1f, 0x6d, 0xad, 0xcc, 0x7e, 0xe9, 0x0, 0x7d, 0xff,
Expand All @@ -327,7 +329,7 @@ fn alt_bn128_multiplication_test() {
); // 2cde5879ba6f13c0b5aa4ef627f159a3347df9722efce88a9afbb20b763b4c411aa7e43076f6aee272755a7f9b84832e71559ba0d2e0b17d5f9f01755e5b0d11

// cdetrio2
let result = alt_bn128_multiplication(&[
let result = alt_bn128_g1_multiplication_be(&[
0x1a, 0x87, 0xb0, 0x58, 0x4c, 0xe9, 0x2f, 0x45, 0x93, 0xd1, 0x61, 0x48, 0x6, 0x14, 0xf2,
0x98, 0x90, 0x35, 0x22, 0x56, 0x9, 0xf0, 0x80, 0x58, 0xcc, 0xfa, 0x3d, 0xf, 0x94, 0xf,
0xeb, 0xe3, 0x1a, 0x2f, 0x3c, 0x95, 0x1f, 0x6d, 0xad, 0xcc, 0x7e, 0xe9, 0x0, 0x7d, 0xff,
Expand All @@ -349,7 +351,7 @@ fn alt_bn128_multiplication_test() {
); // 1a87b0584ce92f4593d161480614f2989035225609f08058ccfa3d0f940febe3163511ddc1c3f25d396745388200081287b3fd1472d8339d5fecb2eae0830451

// cdetrio3
let result = alt_bn128_multiplication(&[
let result = alt_bn128_g1_multiplication_be(&[
0x1a, 0x87, 0xb0, 0x58, 0x4c, 0xe9, 0x2f, 0x45, 0x93, 0xd1, 0x61, 0x48, 0x6, 0x14, 0xf2,
0x98, 0x90, 0x35, 0x22, 0x56, 0x9, 0xf0, 0x80, 0x58, 0xcc, 0xfa, 0x3d, 0xf, 0x94, 0xf,
0xeb, 0xe3, 0x1a, 0x2f, 0x3c, 0x95, 0x1f, 0x6d, 0xad, 0xcc, 0x7e, 0xe9, 0x0, 0x7d, 0xff,
Expand All @@ -371,7 +373,7 @@ fn alt_bn128_multiplication_test() {
); // 1051acb0700ec6d42a88215852d582efbaef31529b6fcbc3277b5c1b300f5cf0135b2394bb45ab04b8bd7611bd2dfe1de6a4e6e2ccea1ea1955f577cd66af85b

// cdetrio4
let result = alt_bn128_multiplication(&[
let result = alt_bn128_g1_multiplication_be(&[
0x1a, 0x87, 0xb0, 0x58, 0x4c, 0xe9, 0x2f, 0x45, 0x93, 0xd1, 0x61, 0x48, 0x6, 0x14, 0xf2,
0x98, 0x90, 0x35, 0x22, 0x56, 0x9, 0xf0, 0x80, 0x58, 0xcc, 0xfa, 0x3d, 0xf, 0x94, 0xf,
0xeb, 0xe3, 0x1a, 0x2f, 0x3c, 0x95, 0x1f, 0x6d, 0xad, 0xcc, 0x7e, 0xe9, 0x0, 0x7d, 0xff,
Expand All @@ -393,7 +395,7 @@ fn alt_bn128_multiplication_test() {
); // 1dbad7d39dbc56379f78fac1bca147dc8e66de1b9d183c7b167351bfe0aeab742cd757d51289cd8dbd0acf9e673ad67d0f0a89f912af47ed1be53664f5692575

// cdetrio5
let result = alt_bn128_multiplication(&[
let result = alt_bn128_g1_multiplication_be(&[
0x1a, 0x87, 0xb0, 0x58, 0x4c, 0xe9, 0x2f, 0x45, 0x93, 0xd1, 0x61, 0x48, 0x6, 0x14, 0xf2,
0x98, 0x90, 0x35, 0x22, 0x56, 0x9, 0xf0, 0x80, 0x58, 0xcc, 0xfa, 0x3d, 0xf, 0x94, 0xf,
0xeb, 0xe3, 0x1a, 0x2f, 0x3c, 0x95, 0x1f, 0x6d, 0xad, 0xcc, 0x7e, 0xe9, 0x0, 0x7d, 0xff,
Expand All @@ -415,7 +417,7 @@ fn alt_bn128_multiplication_test() {
); // 1a87b0584ce92f4593d161480614f2989035225609f08058ccfa3d0f940febe31a2f3c951f6dadcc7ee9007dff81504b0fcd6d7cf59996efdc33d92bf7f9f8f6

// cdetrio6
let result = alt_bn128_multiplication(&[
let result = alt_bn128_g1_multiplication_be(&[
0x17, 0xc1, 0x39, 0xdf, 0xe, 0xfe, 0xe0, 0xf7, 0x66, 0xbc, 0x2, 0x4, 0x76, 0x2b, 0x77,
0x43, 0x62, 0xe4, 0xde, 0xd8, 0x89, 0x53, 0xa3, 0x9c, 0xe8, 0x49, 0xa8, 0xa7, 0xfa, 0x16,
0x3f, 0xa9, 0x1, 0xe0, 0x55, 0x9b, 0xac, 0xb1, 0x60, 0x66, 0x47, 0x64, 0xa3, 0x57, 0xaf,
Expand All @@ -437,7 +439,7 @@ fn alt_bn128_multiplication_test() {
); // 29e587aadd7c06722aabba753017c093f70ba7eb1f1c0104ec0564e7e3e21f6022b1143f6a41008e7755c71c3d00b6b915d386de21783ef590486d8afa8453b1

// cdetrio7
let result = alt_bn128_multiplication(&[
let result = alt_bn128_g1_multiplication_be(&[
0x17, 0xc1, 0x39, 0xdf, 0xe, 0xfe, 0xe0, 0xf7, 0x66, 0xbc, 0x2, 0x4, 0x76, 0x2b, 0x77,
0x43, 0x62, 0xe4, 0xde, 0xd8, 0x89, 0x53, 0xa3, 0x9c, 0xe8, 0x49, 0xa8, 0xa7, 0xfa, 0x16,
0x3f, 0xa9, 0x1, 0xe0, 0x55, 0x9b, 0xac, 0xb1, 0x60, 0x66, 0x47, 0x64, 0xa3, 0x57, 0xaf,
Expand All @@ -459,7 +461,7 @@ fn alt_bn128_multiplication_test() {
); // 17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa92e83f8d734803fc370eba25ed1f6b8768bd6d83887b87165fc2434fe11a830cb

// cdetrio8
let result = alt_bn128_multiplication(&[
let result = alt_bn128_g1_multiplication_be(&[
0x17, 0xc1, 0x39, 0xdf, 0xe, 0xfe, 0xe0, 0xf7, 0x66, 0xbc, 0x2, 0x4, 0x76, 0x2b, 0x77,
0x43, 0x62, 0xe4, 0xde, 0xd8, 0x89, 0x53, 0xa3, 0x9c, 0xe8, 0x49, 0xa8, 0xa7, 0xfa, 0x16,
0x3f, 0xa9, 0x1, 0xe0, 0x55, 0x9b, 0xac, 0xb1, 0x60, 0x66, 0x47, 0x64, 0xa3, 0x57, 0xaf,
Expand All @@ -481,7 +483,7 @@ fn alt_bn128_multiplication_test() {
); // 221a3577763877920d0d14a91cd59b9479f83b87a653bb41f82a3f6f120cea7c2752c7f64cdd7f0e494bff7b60419f242210f2026ed2ec70f89f78a4c56a1f15

// cdetrio9
let result = alt_bn128_multiplication(&[
let result = alt_bn128_g1_multiplication_be(&[
0x17, 0xc1, 0x39, 0xdf, 0xe, 0xfe, 0xe0, 0xf7, 0x66, 0xbc, 0x2, 0x4, 0x76, 0x2b, 0x77,
0x43, 0x62, 0xe4, 0xde, 0xd8, 0x89, 0x53, 0xa3, 0x9c, 0xe8, 0x49, 0xa8, 0xa7, 0xfa, 0x16,
0x3f, 0xa9, 0x1, 0xe0, 0x55, 0x9b, 0xac, 0xb1, 0x60, 0x66, 0x47, 0x64, 0xa3, 0x57, 0xaf,
Expand All @@ -503,7 +505,7 @@ fn alt_bn128_multiplication_test() {
); // 228e687a379ba154554040f8821f4e41ee2be287c201aa9c3bc02c9dd12f1e691e0fd6ee672d04cfd924ed8fdc7ba5f2d06c53c1edc30f65f2af5a5b97f0a76a

// cdetrio10
let result = alt_bn128_multiplication(&[
let result = alt_bn128_g1_multiplication_be(&[
0x17, 0xc1, 0x39, 0xdf, 0xe, 0xfe, 0xe0, 0xf7, 0x66, 0xbc, 0x2, 0x4, 0x76, 0x2b, 0x77,
0x43, 0x62, 0xe4, 0xde, 0xd8, 0x89, 0x53, 0xa3, 0x9c, 0xe8, 0x49, 0xa8, 0xa7, 0xfa, 0x16,
0x3f, 0xa9, 0x1, 0xe0, 0x55, 0x9b, 0xac, 0xb1, 0x60, 0x66, 0x47, 0x64, 0xa3, 0x57, 0xaf,
Expand All @@ -525,7 +527,7 @@ fn alt_bn128_multiplication_test() {
); // 17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa901e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c

// cdetrio11
let result = alt_bn128_multiplication(&[
let result = alt_bn128_g1_multiplication_be(&[
0x3, 0x97, 0x30, 0xea, 0x8d, 0xff, 0x12, 0x54, 0xc0, 0xfe, 0xe9, 0xc0, 0xea, 0x77, 0x7d,
0x29, 0xa9, 0xc7, 0x10, 0xb7, 0xe6, 0x16, 0x68, 0x3f, 0x19, 0x4f, 0x18, 0xc4, 0x3b, 0x43,
0xb8, 0x69, 0x7, 0x3a, 0x5f, 0xfc, 0xc6, 0xfc, 0x7a, 0x28, 0xc3, 0x7, 0x23, 0xd6, 0xe5,
Expand All @@ -547,7 +549,7 @@ fn alt_bn128_multiplication_test() {
); // 00a1a234d08efaa2616607e31eca1980128b00b415c845ff25bba3afcb81dc00242077290ed33906aeb8e42fd98c41bcb9057ba03421af3f2d08cfc441186024

// cdetrio12
let result = alt_bn128_multiplication(&[
let result = alt_bn128_g1_multiplication_be(&[
0x3, 0x97, 0x30, 0xea, 0x8d, 0xff, 0x12, 0x54, 0xc0, 0xfe, 0xe9, 0xc0, 0xea, 0x77, 0x7d,
0x29, 0xa9, 0xc7, 0x10, 0xb7, 0xe6, 0x16, 0x68, 0x3f, 0x19, 0x4f, 0x18, 0xc4, 0x3b, 0x43,
0xb8, 0x69, 0x7, 0x3a, 0x5f, 0xfc, 0xc6, 0xfc, 0x7a, 0x28, 0xc3, 0x7, 0x23, 0xd6, 0xe5,
Expand All @@ -569,7 +571,7 @@ fn alt_bn128_multiplication_test() {
); // 039730ea8dff1254c0fee9c0ea777d29a9c710b7e616683f194f18c43b43b8692929ee761a352600f54921df9bf472e66217e7bb0cee9032e00acc86b3c8bfaf

// cdetrio13
let result = alt_bn128_multiplication(&[
let result = alt_bn128_g1_multiplication_be(&[
0x3, 0x97, 0x30, 0xea, 0x8d, 0xff, 0x12, 0x54, 0xc0, 0xfe, 0xe9, 0xc0, 0xea, 0x77, 0x7d,
0x29, 0xa9, 0xc7, 0x10, 0xb7, 0xe6, 0x16, 0x68, 0x3f, 0x19, 0x4f, 0x18, 0xc4, 0x3b, 0x43,
0xb8, 0x69, 0x7, 0x3a, 0x5f, 0xfc, 0xc6, 0xfc, 0x7a, 0x28, 0xc3, 0x7, 0x23, 0xd6, 0xe5,
Expand All @@ -591,7 +593,7 @@ fn alt_bn128_multiplication_test() {
); // 1071b63011e8c222c5a771dfa03c2e11aac9666dd097f2c620852c3951a4376a2f46fe2f73e1cf310a168d56baa5575a8319389d7bfa6b29ee2d908305791434

// cdetrio14
let result = alt_bn128_multiplication(&[
let result = alt_bn128_g1_multiplication_be(&[
0x3, 0x97, 0x30, 0xea, 0x8d, 0xff, 0x12, 0x54, 0xc0, 0xfe, 0xe9, 0xc0, 0xea, 0x77, 0x7d,
0x29, 0xa9, 0xc7, 0x10, 0xb7, 0xe6, 0x16, 0x68, 0x3f, 0x19, 0x4f, 0x18, 0xc4, 0x3b, 0x43,
0xb8, 0x69, 0x7, 0x3a, 0x5f, 0xfc, 0xc6, 0xfc, 0x7a, 0x28, 0xc3, 0x7, 0x23, 0xd6, 0xe5,
Expand All @@ -613,7 +615,7 @@ fn alt_bn128_multiplication_test() {
); // 19f75b9dd68c080a688774a6213f131e3052bd353a304a189d7a2ee367e3c2582612f545fb9fc89fde80fd81c68fc7dcb27fea5fc124eeda69433cf5c46d2d7f

// cdetrio15
let result = alt_bn128_multiplication(&[
let result = alt_bn128_g1_multiplication_be(&[
0x3, 0x97, 0x30, 0xea, 0x8d, 0xff, 0x12, 0x54, 0xc0, 0xfe, 0xe9, 0xc0, 0xea, 0x77, 0x7d,
0x29, 0xa9, 0xc7, 0x10, 0xb7, 0xe6, 0x16, 0x68, 0x3f, 0x19, 0x4f, 0x18, 0xc4, 0x3b, 0x43,
0xb8, 0x69, 0x7, 0x3a, 0x5f, 0xfc, 0xc6, 0xfc, 0x7a, 0x28, 0xc3, 0x7, 0x23, 0xd6, 0xe5,
Expand All @@ -637,7 +639,7 @@ fn alt_bn128_multiplication_test() {

fn alt_bn128_pairing_test() {
// jeff1
let result = alt_bn128_pairing(&[
let result = alt_bn128_pairing_be(&[
0x1c, 0x76, 0x47, 0x6f, 0x4d, 0xef, 0x4b, 0xb9, 0x45, 0x41, 0xd5, 0x7e, 0xbb, 0xa1, 0x19,
0x33, 0x81, 0xff, 0xa7, 0xaa, 0x76, 0xad, 0xa6, 0x64, 0xdd, 0x31, 0xc1, 0x60, 0x24, 0xc4,
0x3f, 0x59, 0x30, 0x34, 0xdd, 0x29, 0x20, 0xf6, 0x73, 0xe2, 0x4, 0xfe, 0xe2, 0x81, 0x1c,
Expand Down Expand Up @@ -675,7 +677,7 @@ fn alt_bn128_pairing_test() {
); // 0000000000000000000000000000000000000000000000000000000000000001

// jeff2
let result = alt_bn128_pairing(&[
let result = alt_bn128_pairing_be(&[
0x2e, 0xca, 0xc, 0x72, 0x38, 0xbf, 0x16, 0xe8, 0x3e, 0x7a, 0x1e, 0x6c, 0x5d, 0x49, 0x54,
0x6, 0x85, 0xff, 0x51, 0x38, 0xf, 0x30, 0x98, 0x42, 0xa9, 0x85, 0x61, 0x55, 0x80, 0x19,
0xfc, 0x2, 0x3, 0xd3, 0x26, 0x3, 0x61, 0xbb, 0x84, 0x51, 0xde, 0x5f, 0xf5, 0xec, 0xd1,
Expand Down
Loading
Loading