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

Changed tag format #1238

Merged
merged 5 commits into from
Oct 3, 2022
Merged

Conversation

AlgoStephenAkiki
Copy link
Contributor

@AlgoStephenAkiki AlgoStephenAkiki commented Sep 22, 2022

Resolves #1238

Changes tag format and adds numerical filtering

@AlgoStephenAkiki AlgoStephenAkiki force-pushed the 1223-filter-plugin-followup-features branch from 0b185dc to 6eb9068 Compare September 22, 2022 22:35
@AlgoStephenAkiki AlgoStephenAkiki force-pushed the 1223-filter-plugin-followup-features branch from 6eb9068 to 9dfcd13 Compare September 22, 2022 22:37
@codecov
Copy link

codecov bot commented Sep 22, 2022

Codecov Report

Merging #1238 (d6dd269) into conduit (756be9b) will decrease coverage by 1.93%.
The diff coverage is 25.96%.

@@             Coverage Diff             @@
##           conduit    #1238      +/-   ##
===========================================
- Coverage    62.09%   60.16%   -1.94%     
===========================================
  Files           70       73       +3     
  Lines         9387     9857     +470     
===========================================
+ Hits          5829     5930     +101     
- Misses        3059     3419     +360     
- Partials       499      508       +9     
Impacted Files Coverage Δ
processors/filterprocessor/gen/generate.go 0.00% <0.00%> (ø)
...filterprocessor/fields/generated_signed_txn_map.go 12.10% <12.10%> (ø)
processors/filterprocessor/fields/filter.go 80.48% <40.00%> (-13.46%) ⬇️
...ilterprocessor/expression/numerical_expressions.go 50.72% <50.72%> (ø)
...rocessors/filterprocessor/expression/expression.go 68.57% <68.62%> (-4.16%) ⬇️
processors/filterprocessor/fields/searcher.go 82.69% <80.00%> (-10.49%) ⬇️
processors/filterprocessor/filter_processor.go 76.38% <100.00%> (-2.40%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

"sort"
"strings"

"github.com/algorand/go-algorand/data/transactions"
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this work if you use the transaction object from the go SDK?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps. Is it easy to test by importing the sdk?

Copy link
Contributor

Choose a reason for hiding this comment

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

Indexer uses the SDK, so I think you could swap in the other type: https://github.com/algorand/go-algorand-sdk/blob/develop/types/transaction.go#L25

It looks like SignedTxnWithAD isn't available, but I'm not sure that one is especially useful so maybe this is OK?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AD contains information regarding the application ID for ASA's or apps (at least according to the comments) as well rewards applied to the sender/receiver. Is that used by customers?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good point about the IDs, that might be the only place it is available when things are being created.

Makefile Show resolved Hide resolved
Copy link
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

Looks good. Suggested minor code simplifications.

@AlgoStephenAkiki AlgoStephenAkiki marked this pull request as ready for review September 28, 2022 14:58
@AlgoStephenAkiki AlgoStephenAkiki self-assigned this Sep 28, 2022
Copy link
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

LGTM

@tzaffi
Copy link
Contributor

tzaffi commented Sep 28, 2022

Resolves #1238

Changes tag format and adds numerical filtering

Sorry, which issue is this actually resolving?

var exp Expression

switch targetKind {
case reflect.TypeOf(basics.MicroAlgos{}).Kind():
Copy link
Contributor

Choose a reason for hiding this comment

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

You could put this check in the generator. If the leaf type is MicroAlgos add the extra Raw reference:

	case "txn.fee":
-		return &input.SignedTxnWithAD.SignedTxn.Txn.Header.Fee, nil
+		return &input.SignedTxnWithAD.SignedTxn.Txn.Header.Fee.Raw, nil

Copy link
Contributor

@winder winder left a comment

Choose a reason for hiding this comment

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

LGTM

@AlgoStephenAkiki AlgoStephenAkiki merged commit 3bc8f52 into conduit Oct 3, 2022
@AlgoStephenAkiki AlgoStephenAkiki deleted the 1223-filter-plugin-followup-features branch October 3, 2022 15:33
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.

3 participants