Skip to content

Conversation

@jannotti
Copy link
Contributor

@jannotti jannotti commented Mar 13, 2022

Add a new hash function opcode. Since it's nearly the same as keecak, it's no surprise it's the same cost.

Matt-Ryley and others added 29 commits January 27, 2022 16:04
Added SHA3-256 hashing function as an OP code
Made required changes to pass the unit tests.
-- Changed testAccepts version from 1 to 6
-- Added sha3_256 to the Opgroups
From code review suggestion renamed opSHA3256 to opSHA3_256 in the eval.go and opcodes.go file
Spelling mistake rectified
Didnt mean to push them!
accidentally pushed all local changes!
…#3717)

## Summary

The `DeleteOldKeys` method was taking the lock for the duration of the keys deletion. This is not required, as the mutex really just need to be held to synchronize the list of participation keys. The underlying `OneTimeSignatureSecrets` already have a synchronization lock, which is taken as need.

## Test Plan

Unit test added.

The output of the test help to detect the timing issues addressed in this PR. Before this PR, calling Key() 10 times took 4.1 seconds. With this PR, it takes 255us.
## Summary

Tests for eval prefetcher checking that the prefetcher loads the same data (with some exceptions) that the evaluator requests.

Closes algorand/go-algorand-internal#1922.

## Test Plan

This is tests.
* fixed off-by-one error in the assembler's typeDig() and improved unit test

* e2e test for CSP

* added additional test and cleaned up unused variables

* broadened test and corrected erroneous assumption about csp inner app calls
## Summary

Move eval prefetcher to its own package for better isolation. Some other refactoring was necessary.

## Test Plan

This is refactoring.
## Summary

Complementing algorand/indexer#916 this merges the AccountsErrorResponse fields into the "data" object in ErrorResponse, so SDKs do not to have to distinguish between different error response types.

## Test Plan

Update existing tests checking the old AccountsErrorResponse fields.
…-bit aligned address (algorand#3740)

## Summary

prefetcher: ensure the groupTask.incompleteCount is allocated on a 64-bit aligned address.

This is required in order to avoid the following on a ARM32:
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xb541efb0]

goroutine 4220 [running]:
runtime/internal/atomic.goLoad64(0x8ae33be4, 0xb67e0fec, 0x8cf54500)
	runtime/internal/atomic/atomic_arm.go:131 +0x1c
github.com/algorand/go-algorand/ledger/internal.(*accountPrefetcher).prefetch(0x8cf54500, 0xb68023f0, 0x8cf532c0)
	github.com/algorand/go-algorand/ledger/internal/evalprefetcher.go:384 +0x1268
created by github.com/algorand/go-algorand/ledger/internal.prefetchAccounts
	github.com/algorand/go-algorand/ledger/internal/evalprefetcher.go:87 +0x128
```

## Test Plan

Test manually.
Three opcodes that all pertain to FIDO2 authorization.  They are slated for Teal7 here, but they can be delayed by changing fidoVersion.

Co-authored-by: Igor Durovic <igor.durovic@algorand.com>
Co-authored-by: algoidurovic <91566643+algoidurovic@users.noreply.github.com>
Co-authored-by: shiqi.zheng@algorand.com <shiqi.zheng@algorand.com>
## Solution 

ledger refactoring: test 6M assets/apps per account
resolves algorand/go-algorand-internal#1857


## Testing

This is a test
Summary
This PR replaces the usage of the LibGoal with the direct RestClient. The change could have performance implications when running against large sets of data.

Test Plan
This is a test.
* Fix typo in OpenAPI json and yml files

* Included output of make generate
## Summary

This PR improves the test in the following ways:
1. The checkPoint method is no longer timer-based; instead, it's using the WaitForBlock which moves the blocking operation to the node.
2. The generated accounts secret keys are now deterministic. This would allows repeated runs to have the same set of keys.
3. More testing was added for return variables across the test.

## Test Plan

This is a test.
Summary
The goal-partkey-information test randomly fails.
The changes in this PR improve the intermediate logs, which would be helpful in analyzing the source of the failure.

Test Plan
This is a test.
…rand#3759)

Summary
The ed25519 batch verification implementation in algorand#3031 provides a performance improvement for validating multiple signatures (such as multiple transaction signatures). Since each OneTimeSignature used by agreement votes is actually 3 ed25519 signatures, this hooks up the verifier to the batch verification implementation, yielding a ~12% performance improvement in the included benchmark on my computer.

Test Plan
Added benchmark, existing tests should pass.
Simplify handling of "active slots" to fix possible obo error. Unit tests added to confirm typing.
Copy link
Contributor

@jasonpaulos jasonpaulos left a comment

Choose a reason for hiding this comment

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

Looks correct to me

@jannotti jannotti merged commit 963bc33 into algorand:master Mar 14, 2022
@algojack algojack mentioned this pull request Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.