Skip to content

Conversation

@jasonpaulos
Copy link
Contributor

@jasonpaulos jasonpaulos commented Oct 19, 2021

Summary

Add a unit test which fails if any new string types are referenced from bookkeeping.Block.

Closes #3093. See that issue for more context.

Test Plan

This is a test.

@jasonpaulos jasonpaulos marked this pull request as ready for review October 19, 2021 19:43
@codecov-commenter
Copy link

codecov-commenter commented Oct 19, 2021

Codecov Report

Merging #3101 (78ec836) into master (c2054e5) will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3101      +/-   ##
==========================================
- Coverage   43.68%   43.66%   -0.03%     
==========================================
  Files         390      390              
  Lines       86681    86681              
==========================================
- Hits        37868    37845      -23     
- Misses      42796    42817      +21     
- Partials     6017     6019       +2     
Impacted Files Coverage Δ
ledger/roundlru.go 90.56% <0.00%> (-5.67%) ⬇️
network/wsPeer.go 69.86% <0.00%> (-2.94%) ⬇️
catchup/service.go 69.59% <0.00%> (-1.51%) ⬇️
ledger/internal/eval.go 69.94% <0.00%> (-0.27%) ⬇️
ledger/acctupdates.go 64.75% <0.00%> (-0.10%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c2054e5...78ec836. Read the comment docs.

Copy link
Contributor

Choose a reason for hiding this comment

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

would be nicer to have this as Payset\[]SignedTxnWithAD\SignedTxn\Txn\AssetConfigTxnFields, but given that this is a deterministic list, it's quite de-motivating to make the extra effort.

tsachiherman
tsachiherman previously approved these changes Oct 20, 2021
Copy link
Contributor

@tsachiherman tsachiherman left a comment

Choose a reason for hiding this comment

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

looks great.

@jasonpaulos
Copy link
Contributor Author

I just realized this is missing EvalDelta.GlobalDelta, which is map[string]ValueDelta. Converting this to a draft while I debug.

@jasonpaulos jasonpaulos marked this pull request as draft October 20, 2021 16:35
@jasonpaulos jasonpaulos marked this pull request as ready for review October 20, 2021 16:58
@jasonpaulos
Copy link
Contributor Author

Found the issue, the seen set was being too aggressive, meaning some paths weren't properly checked. Fixed now.

@tolikzinovyev
Copy link
Contributor

Would be nice to do the same for AccountData!

@jannotti jannotti merged commit 385afd5 into algorand:master Oct 30, 2021
@jasonpaulos jasonpaulos deleted the no-string-fields branch November 1, 2021 15:30
cce pushed a commit to cce/go-algorand that referenced this pull request Nov 3, 2021
* Add unit test to check for string fields

* Fix seen set and add exceptions for state deltas

* Also check AccountData

* Minor rename

* Add license

* Accidentally pushed to origin, need new hash
@egieseke egieseke mentioned this pull request Nov 23, 2021
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.

Avoid using string fields for binary data

5 participants