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

chore: devnet to testnet #224

Merged
merged 41 commits into from
Nov 27, 2024
Merged

chore: devnet to testnet #224

merged 41 commits into from
Nov 27, 2024

Conversation

dtfiedler
Copy link
Collaborator

@dtfiedler dtfiedler commented Nov 25, 2024

Includes:

  • responsible pruning for redelegations
  • fix for delegate rewards when delegated stake = 0
  • fixed primary names handlers
  • optimized epoch pruning
  • allow Force-Prune tag to prune state forcefully vs. optimsitically
  • modified GAR settings (operator minimums, delegate mins, withdrawal periods, etc.)

@codecov-commenter
Copy link

codecov-commenter commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 93.91892% with 9 lines in your changes missing coverage. Please review.

Project coverage is 95.74%. Comparing base (9873f71) to head (f91163e).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/primary_names.lua 81.81% 4 Missing ⚠️
src/arns.lua 86.66% 2 Missing ⚠️
src/gar.lua 96.61% 2 Missing ⚠️
src/vaults.lua 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #224      +/-   ##
==========================================
- Coverage   95.86%   95.74%   -0.12%     
==========================================
  Files          11       11              
  Lines        2780     2869      +89     
==========================================
+ Hits         2665     2747      +82     
- Misses        115      122       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

fedellen and others added 2 commits November 25, 2024 13:26
when not providing Years on Token-Cost of type 'lease' we see `]:6860:
attempt to perform arithmetic on a nil value (local 'years')`:

```sh
{"level":"debug","message":"Evaluating read interaction on contract","name":"ar-io-sdk","tags":[{"name":"Action","value":"Token-Cost"},{"name":"Intent","value":"Buy-Record"},{"name":"Name","value":"my-name"},{"name":"Timestamp","value":"1732562026000"}],"timestamp":"2024-11-25T19:19:02.641Z","version":"2.5.0-alpha.13"}
{"level":"debug","message":"Read interaction result","name":"ar-io-sdk","result":{"Assignments":[],"GasUsed":2691395618,"Messages":[{"Anchor":"00000000000000000000000000002902","Data":"[string \"aos\"]:6860: attempt to perform arithmetic on a nil value (local 'years')","Tags":[{"name":"Data-Protocol","value":"ao"},{"name":"Variant","value":"ao.TN.1"},{"name":"Type","value":"Message"},{"name":"Reference","value":"2902"},{"name":"Action","value":"Invalid-Token-Cost-Notice"},{"name":"X-Origin","value":""},{"name":"X-Reference","value":""},{"name":"Error","value":"[string \"aos\"]:6860: attempt to perform arithmetic on a nil value (local 'years')"}],"Target":"1234"}],"Output":{"data":"Pruning state at timestamp: 1732562026000\n{\"Type\":\"Message\",\"Timestamp\":\"1732562026000\",\"Variant\":\"ao.TN.1\",\"Intent\":\"Buy-Record\",\"Cast\":false,\"Cron\":false,\"From\":\"1234\",\"Action\":\"Token-Cost\",\"Pruned-Requests-Count\":0,\"_e\":1,\"Name\":\"my-name\",\"From-Formatted\":\"1234\",\"Epoch-Index\":153,\"Data-Protocol\":\"ao\",\"Message-Id\":\"1234\"}\n{\"Type\":\"Message\",\"Error\":\"[string \\\"aos\\\"]:6860: attempt to perform arithmetic on a nil value (local 'years')\",\"Timestamp\":\"1732562026000\",\"Variant\":\"ao.TN.1\",\"Intent\":\"Buy-Record\",\"Cast\":false,\"Cron\":false,\"From\":\"1234\",\"Action\":\"Token-Cost\",\"Pruned-Requests-Count\":0,\"_e\":1,\"Name\":\"my-name\",\"From-Formatted\":\"1234\",\"Epoch-Index\":153,\"Data-Protocol\":\"ao\",\"Message-Id\":\"1234\"}","print":true,"prompt":"\u001b[32mDevnet IO\u001b[90m@\u001b[34maos-2.0.1\u001b[90m[Inbox:\u001b[31m265\u001b[90m]\u001b[0m> "},"Spawns":[]},"timestamp":"2024-11-25T19:19:03.384Z","version":"2.5.0-alpha.13"}
{"error":{},"level":"debug","message":"Read attempt 3 failed","name":"ar-io-sdk","tags":[{"name":"Action","value":"Token-Cost"},{"name":"Intent","value":"Buy-Record"},{"name":"Name","value":"my-name"},{"name":"Timestamp","value":"1732562026000"}],"timestamp":"2024-11-25T19:19:03.384Z","version":"2.5.0-alpha.13"}
[string "aos"]:6860: attempt to perform arithmetic on a nil value (local 'years'): [string "aos"]:6860: attempt to perform arithmetic on a nil value (local 'years')
```
Ariel Melendez and others added 4 commits November 25, 2024 13:35
This one is a little different than the others because there's a very
structured way in which the epochs are created and pruned. There's no
need to reset the next prune timestamp after user actions here.

Note: I modified the deepCopy behavior to:
- do a very fast, basic deep copy if no exclusions are present
- if exclusions are present, activate the reindexing feature for numeric
Arrays (not dictionaries)
dtfiedler and others added 2 commits November 25, 2024 21:23
Moves the gar functions to helpers.mjs, and updates tests with new values

Includes PE-7186/PE-7187/PE-7188
Moves the gar functions to helpers.mjs, and updates tests with new
values

Includes PE-7186/PE-7187/PE-7188
…xisting owner (#230)

Allows a user to replace an existing primary name request with a new
one, so long as it is a different name
@dtfiedler dtfiedler marked this pull request as ready for review November 26, 2024 23:36
Comment on lines +306 to +307
{ name: 'Quantity', value: `${quantity}` }, // 2K IO
{ name: 'Address', value: gatewayAddress }, // our gateway address
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: aged comments

@dtfiedler dtfiedler merged commit 414641e into main Nov 27, 2024
42 checks passed
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.

4 participants