W : constants.go:17 (lib.init.0)             - Couldn't parse CONN_TIMEOUT, using default value:  10m0s
1!: king_protocol_test.go:18 (sequre-private.TestKingProtocol) - Test
Initializing network for thread:  2
Opening socket on:  0.0.0.0:9052
Initializing network for thread:  0
Opening socket on:  0.0.0.0:9050
Initializing network for thread:  1
Opening socket on:  0.0.0.0:9051
Successfully opened channel at port 9051
Check port: opened and listening to party 1
Opening socket on:  0.0.0.0:9061
Successfully opened channel at port 9052
Check port: opened and listening to party 1
Opening socket on:  0.0.0.0:9062
Successfully opened channel at port 9050
Check port: opened and listening to party 1
Opening socket on:  0.0.0.0:9060
Successfully opened channel at port 9061
Check port: opened and listening to party 2
Network for thread 1 complete. Successfully opened channel at port 9062
Check port: opened and listening to party 2
Network for thread 2 complete. Successfully opened channel at port 9060
Check port: opened and listening to party 2
Network for thread 0 complete. 1!: netconnect.go:244 (mpc.(*Network).SetMHEParams) - 2024-05-31T18:15:31-07:00 Debugging output: crpGen initial state 3422663318502 16999980540 16723768018
1!: netconnect.go:244 (mpc.(*Network).SetMHEParams) - 2024-05-31T18:15:31-07:00 Debugging output: crpGen initial state 3422663318502 16999980540 16723768018
1!: netconnect.go:244 (mpc.(*Network).SetMHEParams) - 2024-05-31T18:15:31-07:00 Debugging output: crpGen initial state 3422663318502 16999980540 16723768018
1!: configure_protocol.go:81 (sequre-private.InitializeProtocol) - MPC parameters: bit length 256, data bits 64, frac bits 32
1!: configure_protocol.go:91 (sequre-private.InitializeProtocol) - 2024-05-31 18:15:31.176285824 -0700 PDT m=+6.382060999 Debugging output: PRGs initial state
1!: configure_protocol.go:100 (sequre-private.InitializeProtocol) - 0 0 : {114520484119415208542775021088471345285157586972082823919251564991572754925920}
1!: configure_protocol.go:100 (sequre-private.InitializeProtocol) - 0 1 : {7818887592579875818701596777021980747924784758478006998318249299209293453232}
1!: configure_protocol.go:100 (sequre-private.InitializeProtocol) - 0 2 : {114520484119415208542775021088471345285157586972082823919251564991572754925920}
CollectiveInit
1!: mhe.go:66 (mpc.ParallelNetworks.CollectiveInit) - 2024-05-31T18:15:31-07:00 crpGen check 18058194653943 14573134571 4502156174
PubKeyGen
1!: mhe.go:72 (mpc.ParallelNetworks.CollectiveInit) - 2024-05-31T18:15:31-07:00 PubKey check
1!: mhe.go:73 (mpc.ParallelNetworks.CollectiveInit) - 30189326201880 7018101940 1762264801
1!: mhe.go:74 (mpc.ParallelNetworks.CollectiveInit) - 22022917454069 11853711930 8696802028
RelinKeyGen
1!: mhe.go:81 (mpc.ParallelNetworks.CollectiveInit) - 2024-05-31T18:15:31-07:00 RelinKeyGen check 0 0 0
1!: mhe.go:84 (mpc.ParallelNetworks.CollectiveInit) - Create  12  crypto handlers (evaluators, etc..)
RotKeyGen
Setup complete
1!: configure_protocol.go:108 (sequre-private.InitializeProtocol) - 2024-05-31 18:15:37.043737179 -0700 PDT m=+12.249512357 Enc check 14645760522430 1432888817 10984660211
KING setup done in 12.234919023s 
1!: king_protocol.go:95 (sequre-private.(*KingProtocolInfo).KingProtocol) - 2024-05-31 18:15:37.043769485 -0700 PDT m=+12.249544658 Finished Setup
1!: king_protocol.go:102 (sequre-private.(*KingProtocolInfo).KingProtocol) - 2024-05-31 18:15:37.043775378 -0700 PDT m=+12.249550552 Start protocol
1!: king_protocol.go:116 (sequre-private.(*KingProtocolInfo).KingProtocol) - 0  receive from  1
1!: king_protocol.go:116 (sequre-private.(*KingProtocolInfo).KingProtocol) - 0  receive from  2
1!: king_protocol.go:121 (sequre-private.(*KingProtocolInfo).KingProtocol) - 0 finished exchanging number of rows:  [0 16 16]
1!: king_protocol.go:127 (sequre-private.(*KingProtocolInfo).KingProtocol) - 0 prepares data to send to  map[1:[2]]
1!: king_protocol.go:264 (sequre-private.(*KingProtocolInfo).KingProtocol) - 0 : start minimum computation 16 1
--- FAIL: TestKingProtocol (45.88s)
panic: write tcp 142.104.69.241:9061->142.104.69.237:32828: write: connection reset by peer [recovered]
	panic: write tcp 142.104.69.241:9061->142.104.69.237:32828: write: connection reset by peer

goroutine 6 [running]:
testing.tRunner.func1.2({0x6ce520, 0xc01cb44870})
	/usr/local/go/src/testing/testing.go:1545 +0x238
testing.tRunner.func1()
	/usr/local/go/src/testing/testing.go:1548 +0x397
panic({0x6ce520?, 0xc01cb44870?})
	/usr/local/go/src/runtime/panic.go:914 +0x21f
github.com/hhcho/sfgwas-private/mpc.WriteFull(0xc0000a6f60, {0xc02ce90000, 0x13800, 0x13800}, 0x7f8bd3b9b688?)
	/home/hsmajlovic/libs/go/src/hhcho/sfgwas-private/mpc/netconnect.go:267 +0xe5
github.com/hhcho/sfgwas-private/mpc.(*Network).SendRData(0xc000302180, {0x6fc160?, 0xc0000f2d50}, 0xc0610d2000?)
	/home/hsmajlovic/libs/go/src/hhcho/sfgwas-private/mpc/send_recieve.go:215 +0x11b
github.com/hhcho/sfgwas-private/mpc.(*MPC).ShareRandomBits(0xc0000346c0, {0x79b258, 0xc01cb15340}, {0x79b878, 0x9445a0}, 0x2700, 0x1, 0xc0000a7118?, 0x1)
	/home/hsmajlovic/libs/go/src/hhcho/sfgwas-private/mpc/mpc.go:633 +0x74a
github.com/hhcho/sfgwas-private/mpc.(*MPC).NormalizerEvenExp2N(0xc0000346c0, {0xc0000ff000, 0x100, 0xc0000a7408?}, 0x40)
	/home/hsmajlovic/libs/go/src/hhcho/sfgwas-private/mpc/mpc.go:965 +0x97b
github.com/hhcho/sfgwas-private/mpc.(*MPC).SqrtAndSqrtInverse(0xc0000346c0, {0xc0000ff000, 0x100, 0x100}, 0x1)
	/home/hsmajlovic/libs/go/src/hhcho/sfgwas-private/mpc/mpc.go:2058 +0x153
github.com/hhcho/sfgwas-private/mpc.(*MPC).SqrtAndSqrtInverseMat(0x1?, {0xc02b50c180, 0x10, 0xc0000b2700?}, 0x58?)
	/home/hsmajlovic/libs/go/src/hhcho/sfgwas-private/mpc/mpc.go:2011 +0x135
sequre-private.(*KingProtocolInfo).KingProtocol(0xc046dff140)
	/home/hsmajlovic/projects/sequre-private/applications/others/lattigo_king/king_protocol.go:278 +0xd19
sequre-private.TestKingProtocol(0x0?)
	/home/hsmajlovic/projects/sequre-private/applications/others/lattigo_king/king_protocol_test.go:43 +0x29a
testing.tRunner(0xc0000ccea0, 0x747048)
	/usr/local/go/src/testing/testing.go:1595 +0xff
created by testing.(*T).Run in goroutine 1
	/usr/local/go/src/testing/testing.go:1648 +0x3ad
exit status 2
FAIL	sequre-private	45.912s
