Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break batch event storage into smaller chunks #122

Merged
merged 15 commits into from
Dec 3, 2020

Conversation

ramtinms
Copy link
Member

@ramtinms ramtinms commented Nov 5, 2020

Badger has a limit on the size of a transaction, by breaking events into smaller chunks we can prevent this error when many events are produced.

could not save execution results: failed to store events: could not insert event: could not store data: Txn is too big to fit into one request

if end > len(events) {
end = len(events)
}
err = e.events.Store(blockID, events[i:end])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we make a function chunkfiyEvents(events []Event, chunkSize) [][]Event, and write some tests for that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just applied the changes

err = e.events.Store(blockID, events)
// store events 1K in each batch
chunkSize := uint(1000)
eventChunks := ChunkfiyEvents(events, chunkSize)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
eventChunks := ChunkfiyEvents(events, chunkSize)
eventChunks := ChunkifyEvents(events, chunkSize)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed at cfc8bcf

Comment on lines 881 to 884
events := make([]flow.Event, 0)
for j := 0; j < 10; j++ {
events[j] = unittest.EventFixture(flow.EventAccountCreated, uint32(j), uint32(j), unittest.IdentifierFixture())
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
events := make([]flow.Event, 0)
for j := 0; j < 10; j++ {
events[j] = unittest.EventFixture(flow.EventAccountCreated, uint32(j), uint32(j), unittest.IdentifierFixture())
}
var events []flow.Event
for j := 0; j < 10; j++ {
events = append(events, unittest.EventFixture(flow.EventAccountCreated, uint32(j), uint32(j), unittest.IdentifierFixture()))
}

I think the way it is now will cause index out of bound error

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed at cfc8bcf

@@ -875,3 +875,40 @@ func TestLoadingUnexecutedBlocks(t *testing.T) {
pending)
})
}

func TestChunkfiyEvents(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func TestChunkfiyEvents(t *testing.T) {
func TestChunkifyEvents(t *testing.T) {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed at cfc8bcf

@@ -179,6 +180,8 @@ func Test_Checkpointing(t *testing.T) {

savedData[string(rootHash)] = data
}
// some buffer time of the checkpointer to run
time.Sleep(1 * time.Second)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this to address flakey tests? I'm not too familiar with how this works, but maybe we can expose a way to force the checkpointer to run and wait for it synchronously.

if len(events) > 0 {
err = e.events.Store(blockID, events)
// store events 1K in each batch
chunkSize := uint(1000)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if the transaction limit in Badger is metered by DB operation or by data size? If we have really large events will this still work?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems to be a limit based on the ratio of the table size https://discuss.dgraph.io/t/discussion-badgerdb-should-offer-arbitrarily-sized-atomic-transactions/8736 :-|
we might have to change the "chunkify" to act based on the event size.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Further down that discussion they point to https://github.com/dgraph-io/badger/blob/ef28ef36b5923f12ffe3a1702bdfa6b479db6637/batch.go#L37-L42

That might be a good fit for this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but considering the event byte size limit that we are going to put in place, I think we can come up with some limits for tx based on the counts.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue with have with the batch writer is we do look up for IDs I guess before writing, we might change it completely to use the batch writer and do upsert style of storage for events

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue with have with the batch writer is we do look up for IDs I guess before writing

I think to use the batch writer you anyway need to re-write that operation level function to call batch.Set rather than tx.Set. But you're right it would change the semantics.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jordanschalm do you there is a value in merging this PR or we should create an issue to properly address this issue by size ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good to merge this. It seems like it will only make the problem better, even if it doesn't fully handle all cases. But we should make an issue to implement a solution that uses BatchWriter or that guarantees we won't hit the limits implicitly with event/tx size/count limits (I prefer BatchWriter though).

@ramtinms
Copy link
Member Author

ramtinms commented Dec 2, 2020

what do you think @zhangchiqing

@ramtinms ramtinms merged commit 6544f8d into master Dec 3, 2020
@ramtinms ramtinms deleted the ramtin/improvements-to-result-storage branch December 3, 2020 17:52
huitseeker added a commit to huitseeker/flow-go that referenced this pull request Jun 16, 2021
The diff contains:
- a lot of changes that concern parts of the library we don't use (other curves a la BN, BLS24-X, BLS12-383 ...), integer protocols (ETRS), field extension machinery ...
- otherwise irrelevant changes, e.g. CI/CD
- some memory bug fixing

[Full Changeset](https://github.com/relic-toolkit/relic/compare/7a9bba7f..9206ae5)

**Fixed bugs:**

- Unexpected failure of ep2\_mul\[\_lwnaf\] above the prime group order [\onflow#64](relic-toolkit/relic#64)

**Closed issues:**

- Other way to construct towered extension fields [\onflow#203](relic-toolkit/relic#203)
- blake2.h:101:5: error: size of array element is not a multiple of its alignment [\onflow#202](relic-toolkit/relic#202)
- ECIES 160bit [\onflow#201](relic-toolkit/relic#201)
- Compilation with "ARITH gmp" fails [\onflow#200](relic-toolkit/relic#200)
- Support for armv8-a ? [\onflow#198](relic-toolkit/relic#198)
- Function name bn\_init conflicts with OpenSSL when used in tandem [\onflow#196](relic-toolkit/relic#196)
- 16-bit MSP430 [\onflow#193](relic-toolkit/relic#193)
- Modular exponentiation returns 1 if exponent is 0 and modulo is 1 [\onflow#185](relic-toolkit/relic#185)
- Compilation of RELIC with bls12-446 and bls12-455 fails [\onflow#182](relic-toolkit/relic#182)
- test\_bn fails with BLS12-381 preset [\onflow#181](relic-toolkit/relic#181)
- \[BUG\] undefined reference to `bench_init', `bench\_clean' [\onflow#180](relic-toolkit/relic#180)
- Tests FTBFS because of missing symbol in header [\onflow#179](relic-toolkit/relic#179)
- Builds are broken [\onflow#178](relic-toolkit/relic#178)
- compile error  inlining failed in call to always\_inline ‘\_mm\_alignr\_epi8’ on unbantu20.04 gcc9 [\onflow#177](relic-toolkit/relic#177)
- bn\_write\_str buffer overflow [\onflow#176](relic-toolkit/relic#176)
- ECDSA verify succeeds when it should fail [\onflow#175](relic-toolkit/relic#175)
- ec\_mul\_gen hangs with curve SECG\_K256 [\onflow#174](relic-toolkit/relic#174)
- Wrong square root computation [\onflow#173](relic-toolkit/relic#173)
- Out-of-bounds read via bn\_sqr\_basic [\onflow#172](relic-toolkit/relic#172)
- OSS-Fuzz integration [\onflow#171](relic-toolkit/relic#171)
- Building Relic with Curve NIST\_P256 throws FATAL ERROR in relic\_fp\_prime.c:120 [\onflow#170](relic-toolkit/relic#170)
- Compressing \(packing\) a point to binary array does not comply with X9.62 standard [\onflow#169](relic-toolkit/relic#169)
-  ‘ctx\_t’ {aka ‘struct \_ctx\_t’} has no member named ‘total’ [\onflow#168](relic-toolkit/relic#168)
- relic does not work with C++ [\onflow#167](relic-toolkit/relic#167)
- Memory leak in ep2\_curve\_init/clean with ALLOC=DYNAMIC [\onflow#166](relic-toolkit/relic#166)
- \*\_is\_valid\(\) functions produce false negative for not normalized points [\onflow#147](relic-toolkit/relic#147)
- Bench and Test doesnt build [\onflow#122](relic-toolkit/relic#122)

**Merged pull requests:**

- Add pairing delegation protocols [\onflow#199](relic-toolkit/relic#199) ([dfaranha](https://github.com/dfaranha))
- Fix support for Win64/MSVC targets. [\onflow#197](relic-toolkit/relic#197) ([dfaranha](https://github.com/dfaranha))
- Simplify generator getting for Gt. [\onflow#194](relic-toolkit/relic#194) ([luozejiaqun](https://github.com/luozejiaqun))
- cmake: Always use user defined CFLAGS, not only for release builds [\onflow#187](relic-toolkit/relic#187) ([xdustinface](https://github.com/xdustinface))
- Fix MinGW build [\onflow#186](relic-toolkit/relic#186) ([xdustinface](https://github.com/xdustinface))
- Remove debug printf in bn\_mxp\_slide [\onflow#184](relic-toolkit/relic#184) ([guidovranken](https://github.com/guidovranken))
- Remove ALLOC = STACK to simplify memory allocation. [\onflow#183](relic-toolkit/relic#183) ([dfaranha](https://github.com/dfaranha))
- Update relic\_alloc.h [\onflow#165](relic-toolkit/relic#165) ([aguycalled](https://github.com/aguycalled))
- Add correct support for FreeBSD and NetBSD [\onflow#164](relic-toolkit/relic#164) ([hoffmang9](https://github.com/hoffmang9))
huitseeker added a commit to huitseeker/flow-go that referenced this pull request Jul 12, 2021
The diff contains:
- a lot of changes that concern parts of the library we don't use (other curves a la BN, BLS24-X, BLS12-383 ...), integer protocols (ETRS), field extension machinery ...
- otherwise irrelevant changes, e.g. CI/CD
- some memory bug fixing

[Full Changeset](https://github.com/relic-toolkit/relic/compare/7a9bba7f..9206ae5)

**Fixed bugs:**

- Unexpected failure of ep2\_mul\[\_lwnaf\] above the prime group order [\onflow#64](relic-toolkit/relic#64)

**Closed issues:**

- Other way to construct towered extension fields [\onflow#203](relic-toolkit/relic#203)
- blake2.h:101:5: error: size of array element is not a multiple of its alignment [\onflow#202](relic-toolkit/relic#202)
- ECIES 160bit [\onflow#201](relic-toolkit/relic#201)
- Compilation with "ARITH gmp" fails [\onflow#200](relic-toolkit/relic#200)
- Support for armv8-a ? [\onflow#198](relic-toolkit/relic#198)
- Function name bn\_init conflicts with OpenSSL when used in tandem [\onflow#196](relic-toolkit/relic#196)
- 16-bit MSP430 [\onflow#193](relic-toolkit/relic#193)
- Modular exponentiation returns 1 if exponent is 0 and modulo is 1 [\onflow#185](relic-toolkit/relic#185)
- Compilation of RELIC with bls12-446 and bls12-455 fails [\onflow#182](relic-toolkit/relic#182)
- test\_bn fails with BLS12-381 preset [\onflow#181](relic-toolkit/relic#181)
- \[BUG\] undefined reference to `bench_init', `bench\_clean' [\onflow#180](relic-toolkit/relic#180)
- Tests FTBFS because of missing symbol in header [\onflow#179](relic-toolkit/relic#179)
- Builds are broken [\onflow#178](relic-toolkit/relic#178)
- compile error  inlining failed in call to always\_inline ‘\_mm\_alignr\_epi8’ on unbantu20.04 gcc9 [\onflow#177](relic-toolkit/relic#177)
- bn\_write\_str buffer overflow [\onflow#176](relic-toolkit/relic#176)
- ECDSA verify succeeds when it should fail [\onflow#175](relic-toolkit/relic#175)
- ec\_mul\_gen hangs with curve SECG\_K256 [\onflow#174](relic-toolkit/relic#174)
- Wrong square root computation [\onflow#173](relic-toolkit/relic#173)
- Out-of-bounds read via bn\_sqr\_basic [\onflow#172](relic-toolkit/relic#172)
- OSS-Fuzz integration [\onflow#171](relic-toolkit/relic#171)
- Building Relic with Curve NIST\_P256 throws FATAL ERROR in relic\_fp\_prime.c:120 [\onflow#170](relic-toolkit/relic#170)
- Compressing \(packing\) a point to binary array does not comply with X9.62 standard [\onflow#169](relic-toolkit/relic#169)
-  ‘ctx\_t’ {aka ‘struct \_ctx\_t’} has no member named ‘total’ [\onflow#168](relic-toolkit/relic#168)
- relic does not work with C++ [\onflow#167](relic-toolkit/relic#167)
- Memory leak in ep2\_curve\_init/clean with ALLOC=DYNAMIC [\onflow#166](relic-toolkit/relic#166)
- \*\_is\_valid\(\) functions produce false negative for not normalized points [\onflow#147](relic-toolkit/relic#147)
- Bench and Test doesnt build [\onflow#122](relic-toolkit/relic#122)

**Merged pull requests:**

- Add pairing delegation protocols [\onflow#199](relic-toolkit/relic#199) ([dfaranha](https://github.com/dfaranha))
- Fix support for Win64/MSVC targets. [\onflow#197](relic-toolkit/relic#197) ([dfaranha](https://github.com/dfaranha))
- Simplify generator getting for Gt. [\onflow#194](relic-toolkit/relic#194) ([luozejiaqun](https://github.com/luozejiaqun))
- cmake: Always use user defined CFLAGS, not only for release builds [\onflow#187](relic-toolkit/relic#187) ([xdustinface](https://github.com/xdustinface))
- Fix MinGW build [\onflow#186](relic-toolkit/relic#186) ([xdustinface](https://github.com/xdustinface))
- Remove debug printf in bn\_mxp\_slide [\onflow#184](relic-toolkit/relic#184) ([guidovranken](https://github.com/guidovranken))
- Remove ALLOC = STACK to simplify memory allocation. [\onflow#183](relic-toolkit/relic#183) ([dfaranha](https://github.com/dfaranha))
- Update relic\_alloc.h [\onflow#165](relic-toolkit/relic#165) ([aguycalled](https://github.com/aguycalled))
- Add correct support for FreeBSD and NetBSD [\onflow#164](relic-toolkit/relic#164) ([hoffmang9](https://github.com/hoffmang9))
huitseeker added a commit to huitseeker/flow-go that referenced this pull request Jul 12, 2021
The diff contains:
- a lot of changes that concern parts of the library we don't use (other curves a la BN, BLS24-X, BLS12-383 ...), integer protocols (ETRS), field extension machinery ...
- otherwise irrelevant changes, e.g. CI/CD
- some memory bug fixing

[Full Changeset](https://github.com/relic-toolkit/relic/compare/7a9bba7f..9206ae5)

**Fixed bugs:**

- Unexpected failure of ep2\_mul\[\_lwnaf\] above the prime group order [\onflow#64](relic-toolkit/relic#64)

**Closed issues:**

- Other way to construct towered extension fields [\onflow#203](relic-toolkit/relic#203)
- blake2.h:101:5: error: size of array element is not a multiple of its alignment [\onflow#202](relic-toolkit/relic#202)
- ECIES 160bit [\onflow#201](relic-toolkit/relic#201)
- Compilation with "ARITH gmp" fails [\onflow#200](relic-toolkit/relic#200)
- Support for armv8-a ? [\onflow#198](relic-toolkit/relic#198)
- Function name bn\_init conflicts with OpenSSL when used in tandem [\onflow#196](relic-toolkit/relic#196)
- 16-bit MSP430 [\onflow#193](relic-toolkit/relic#193)
- Modular exponentiation returns 1 if exponent is 0 and modulo is 1 [\onflow#185](relic-toolkit/relic#185)
- Compilation of RELIC with bls12-446 and bls12-455 fails [\onflow#182](relic-toolkit/relic#182)
- test\_bn fails with BLS12-381 preset [\onflow#181](relic-toolkit/relic#181)
- \[BUG\] undefined reference to `bench_init', `bench\_clean' [\onflow#180](relic-toolkit/relic#180)
- Tests FTBFS because of missing symbol in header [\onflow#179](relic-toolkit/relic#179)
- Builds are broken [\onflow#178](relic-toolkit/relic#178)
- compile error  inlining failed in call to always\_inline ‘\_mm\_alignr\_epi8’ on unbantu20.04 gcc9 [\onflow#177](relic-toolkit/relic#177)
- bn\_write\_str buffer overflow [\onflow#176](relic-toolkit/relic#176)
- ECDSA verify succeeds when it should fail [\onflow#175](relic-toolkit/relic#175)
- ec\_mul\_gen hangs with curve SECG\_K256 [\onflow#174](relic-toolkit/relic#174)
- Wrong square root computation [\onflow#173](relic-toolkit/relic#173)
- Out-of-bounds read via bn\_sqr\_basic [\onflow#172](relic-toolkit/relic#172)
- OSS-Fuzz integration [\onflow#171](relic-toolkit/relic#171)
- Building Relic with Curve NIST\_P256 throws FATAL ERROR in relic\_fp\_prime.c:120 [\onflow#170](relic-toolkit/relic#170)
- Compressing \(packing\) a point to binary array does not comply with X9.62 standard [\onflow#169](relic-toolkit/relic#169)
-  ‘ctx\_t’ {aka ‘struct \_ctx\_t’} has no member named ‘total’ [\onflow#168](relic-toolkit/relic#168)
- relic does not work with C++ [\onflow#167](relic-toolkit/relic#167)
- Memory leak in ep2\_curve\_init/clean with ALLOC=DYNAMIC [\onflow#166](relic-toolkit/relic#166)
- \*\_is\_valid\(\) functions produce false negative for not normalized points [\onflow#147](relic-toolkit/relic#147)
- Bench and Test doesnt build [\onflow#122](relic-toolkit/relic#122)

**Merged pull requests:**

- Add pairing delegation protocols [\onflow#199](relic-toolkit/relic#199) ([dfaranha](https://github.com/dfaranha))
- Fix support for Win64/MSVC targets. [\onflow#197](relic-toolkit/relic#197) ([dfaranha](https://github.com/dfaranha))
- Simplify generator getting for Gt. [\onflow#194](relic-toolkit/relic#194) ([luozejiaqun](https://github.com/luozejiaqun))
- cmake: Always use user defined CFLAGS, not only for release builds [\onflow#187](relic-toolkit/relic#187) ([xdustinface](https://github.com/xdustinface))
- Fix MinGW build [\onflow#186](relic-toolkit/relic#186) ([xdustinface](https://github.com/xdustinface))
- Remove debug printf in bn\_mxp\_slide [\onflow#184](relic-toolkit/relic#184) ([guidovranken](https://github.com/guidovranken))
- Remove ALLOC = STACK to simplify memory allocation. [\onflow#183](relic-toolkit/relic#183) ([dfaranha](https://github.com/dfaranha))
- Update relic\_alloc.h [\onflow#165](relic-toolkit/relic#165) ([aguycalled](https://github.com/aguycalled))
- Add correct support for FreeBSD and NetBSD [\onflow#164](relic-toolkit/relic#164) ([hoffmang9](https://github.com/hoffmang9))
huitseeker added a commit to huitseeker/flow-go that referenced this pull request Jul 13, 2021
The diff contains:
- a lot of changes that concern parts of the library we don't use (other curves a la BN, BLS24-X, BLS12-383 ...), integer protocols (ETRS), field extension machinery ...
- otherwise irrelevant changes, e.g. CI/CD
- some memory bug fixing

[Full Changeset](https://github.com/relic-toolkit/relic/compare/7a9bba7f..9206ae5)

**Fixed bugs:**

- Unexpected failure of ep2\_mul\[\_lwnaf\] above the prime group order [\onflow#64](relic-toolkit/relic#64)

**Closed issues:**

- Other way to construct towered extension fields [\onflow#203](relic-toolkit/relic#203)
- blake2.h:101:5: error: size of array element is not a multiple of its alignment [\onflow#202](relic-toolkit/relic#202)
- ECIES 160bit [\onflow#201](relic-toolkit/relic#201)
- Compilation with "ARITH gmp" fails [\onflow#200](relic-toolkit/relic#200)
- Support for armv8-a ? [\onflow#198](relic-toolkit/relic#198)
- Function name bn\_init conflicts with OpenSSL when used in tandem [\onflow#196](relic-toolkit/relic#196)
- 16-bit MSP430 [\onflow#193](relic-toolkit/relic#193)
- Modular exponentiation returns 1 if exponent is 0 and modulo is 1 [\onflow#185](relic-toolkit/relic#185)
- Compilation of RELIC with bls12-446 and bls12-455 fails [\onflow#182](relic-toolkit/relic#182)
- test\_bn fails with BLS12-381 preset [\onflow#181](relic-toolkit/relic#181)
- \[BUG\] undefined reference to `bench_init', `bench\_clean' [\onflow#180](relic-toolkit/relic#180)
- Tests FTBFS because of missing symbol in header [\onflow#179](relic-toolkit/relic#179)
- Builds are broken [\onflow#178](relic-toolkit/relic#178)
- compile error  inlining failed in call to always\_inline ‘\_mm\_alignr\_epi8’ on unbantu20.04 gcc9 [\onflow#177](relic-toolkit/relic#177)
- bn\_write\_str buffer overflow [\onflow#176](relic-toolkit/relic#176)
- ECDSA verify succeeds when it should fail [\onflow#175](relic-toolkit/relic#175)
- ec\_mul\_gen hangs with curve SECG\_K256 [\onflow#174](relic-toolkit/relic#174)
- Wrong square root computation [\onflow#173](relic-toolkit/relic#173)
- Out-of-bounds read via bn\_sqr\_basic [\onflow#172](relic-toolkit/relic#172)
- OSS-Fuzz integration [\onflow#171](relic-toolkit/relic#171)
- Building Relic with Curve NIST\_P256 throws FATAL ERROR in relic\_fp\_prime.c:120 [\onflow#170](relic-toolkit/relic#170)
- Compressing \(packing\) a point to binary array does not comply with X9.62 standard [\onflow#169](relic-toolkit/relic#169)
-  ‘ctx\_t’ {aka ‘struct \_ctx\_t’} has no member named ‘total’ [\onflow#168](relic-toolkit/relic#168)
- relic does not work with C++ [\onflow#167](relic-toolkit/relic#167)
- Memory leak in ep2\_curve\_init/clean with ALLOC=DYNAMIC [\onflow#166](relic-toolkit/relic#166)
- \*\_is\_valid\(\) functions produce false negative for not normalized points [\onflow#147](relic-toolkit/relic#147)
- Bench and Test doesnt build [\onflow#122](relic-toolkit/relic#122)

**Merged pull requests:**

- Add pairing delegation protocols [\onflow#199](relic-toolkit/relic#199) ([dfaranha](https://github.com/dfaranha))
- Fix support for Win64/MSVC targets. [\onflow#197](relic-toolkit/relic#197) ([dfaranha](https://github.com/dfaranha))
- Simplify generator getting for Gt. [\onflow#194](relic-toolkit/relic#194) ([luozejiaqun](https://github.com/luozejiaqun))
- cmake: Always use user defined CFLAGS, not only for release builds [\onflow#187](relic-toolkit/relic#187) ([xdustinface](https://github.com/xdustinface))
- Fix MinGW build [\onflow#186](relic-toolkit/relic#186) ([xdustinface](https://github.com/xdustinface))
- Remove debug printf in bn\_mxp\_slide [\onflow#184](relic-toolkit/relic#184) ([guidovranken](https://github.com/guidovranken))
- Remove ALLOC = STACK to simplify memory allocation. [\onflow#183](relic-toolkit/relic#183) ([dfaranha](https://github.com/dfaranha))
- Update relic\_alloc.h [\onflow#165](relic-toolkit/relic#165) ([aguycalled](https://github.com/aguycalled))
- Add correct support for FreeBSD and NetBSD [\onflow#164](relic-toolkit/relic#164) ([hoffmang9](https://github.com/hoffmang9))
huitseeker added a commit to huitseeker/flow-go that referenced this pull request Jul 13, 2021
The diff contains:
- a lot of changes that concern parts of the library we don't use (other curves a la BN, BLS24-X, BLS12-383 ...), integer protocols (ETRS), field extension machinery ...
- otherwise irrelevant changes, e.g. CI/CD
- some memory bug fixing

[Full Changeset](https://github.com/relic-toolkit/relic/compare/7a9bba7f..9206ae5)

**Fixed bugs:**

- Unexpected failure of ep2\_mul\[\_lwnaf\] above the prime group order [\onflow#64](relic-toolkit/relic#64)

**Closed issues:**

- Other way to construct towered extension fields [\onflow#203](relic-toolkit/relic#203)
- blake2.h:101:5: error: size of array element is not a multiple of its alignment [\onflow#202](relic-toolkit/relic#202)
- ECIES 160bit [\onflow#201](relic-toolkit/relic#201)
- Compilation with "ARITH gmp" fails [\onflow#200](relic-toolkit/relic#200)
- Support for armv8-a ? [\onflow#198](relic-toolkit/relic#198)
- Function name bn\_init conflicts with OpenSSL when used in tandem [\onflow#196](relic-toolkit/relic#196)
- 16-bit MSP430 [\onflow#193](relic-toolkit/relic#193)
- Modular exponentiation returns 1 if exponent is 0 and modulo is 1 [\onflow#185](relic-toolkit/relic#185)
- Compilation of RELIC with bls12-446 and bls12-455 fails [\onflow#182](relic-toolkit/relic#182)
- test\_bn fails with BLS12-381 preset [\onflow#181](relic-toolkit/relic#181)
- \[BUG\] undefined reference to `bench_init', `bench\_clean' [\onflow#180](relic-toolkit/relic#180)
- Tests FTBFS because of missing symbol in header [\onflow#179](relic-toolkit/relic#179)
- Builds are broken [\onflow#178](relic-toolkit/relic#178)
- compile error  inlining failed in call to always\_inline ‘\_mm\_alignr\_epi8’ on unbantu20.04 gcc9 [\onflow#177](relic-toolkit/relic#177)
- bn\_write\_str buffer overflow [\onflow#176](relic-toolkit/relic#176)
- ECDSA verify succeeds when it should fail [\onflow#175](relic-toolkit/relic#175)
- ec\_mul\_gen hangs with curve SECG\_K256 [\onflow#174](relic-toolkit/relic#174)
- Wrong square root computation [\onflow#173](relic-toolkit/relic#173)
- Out-of-bounds read via bn\_sqr\_basic [\onflow#172](relic-toolkit/relic#172)
- OSS-Fuzz integration [\onflow#171](relic-toolkit/relic#171)
- Building Relic with Curve NIST\_P256 throws FATAL ERROR in relic\_fp\_prime.c:120 [\onflow#170](relic-toolkit/relic#170)
- Compressing \(packing\) a point to binary array does not comply with X9.62 standard [\onflow#169](relic-toolkit/relic#169)
-  ‘ctx\_t’ {aka ‘struct \_ctx\_t’} has no member named ‘total’ [\onflow#168](relic-toolkit/relic#168)
- relic does not work with C++ [\onflow#167](relic-toolkit/relic#167)
- Memory leak in ep2\_curve\_init/clean with ALLOC=DYNAMIC [\onflow#166](relic-toolkit/relic#166)
- \*\_is\_valid\(\) functions produce false negative for not normalized points [\onflow#147](relic-toolkit/relic#147)
- Bench and Test doesnt build [\onflow#122](relic-toolkit/relic#122)

**Merged pull requests:**

- Add pairing delegation protocols [\onflow#199](relic-toolkit/relic#199) ([dfaranha](https://github.com/dfaranha))
- Fix support for Win64/MSVC targets. [\onflow#197](relic-toolkit/relic#197) ([dfaranha](https://github.com/dfaranha))
- Simplify generator getting for Gt. [\onflow#194](relic-toolkit/relic#194) ([luozejiaqun](https://github.com/luozejiaqun))
- cmake: Always use user defined CFLAGS, not only for release builds [\onflow#187](relic-toolkit/relic#187) ([xdustinface](https://github.com/xdustinface))
- Fix MinGW build [\onflow#186](relic-toolkit/relic#186) ([xdustinface](https://github.com/xdustinface))
- Remove debug printf in bn\_mxp\_slide [\onflow#184](relic-toolkit/relic#184) ([guidovranken](https://github.com/guidovranken))
- Remove ALLOC = STACK to simplify memory allocation. [\onflow#183](relic-toolkit/relic#183) ([dfaranha](https://github.com/dfaranha))
- Update relic\_alloc.h [\onflow#165](relic-toolkit/relic#165) ([aguycalled](https://github.com/aguycalled))
- Add correct support for FreeBSD and NetBSD [\onflow#164](relic-toolkit/relic#164) ([hoffmang9](https://github.com/hoffmang9))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants