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

Incentives: Bump to v40 consensus supporting development versions of Go SDK and Indexer. #179

Merged
merged 2 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,4 @@ See the [Plugin Development](./docs/PluginDevelopment.md) page for building a pl

# Contributing

Contributions are welcome! Please refer to our [CONTRIBUTING](https://github.com/algorand/go-algorand/blob/master/CONTRIBUTING.md) document for general contribution guidelines.

# Migrating from Indexer 2.x

Conduit can be used to populate data from an existing [Indexer 2.x](https://github.com/algorand/indexer/) deployment as part of upgrading to Indexer 3.x. The v3 API is 100% backwards compatible with the v2 API.

We will continue to maintain Indexer 2.x up through November 1. From that point onward, subsequent consensus upgrades will only be compatible with Indexer 3.x when paired with Conduit.

To migrate, follow the [Using Conduit to Populate an Indexer Database](./docs/tutorials/IndexerWriter.md) tutorial. When you get to the step about setting up postgres, substitute your existing database connection string. Conduit will read the database to initialize the next round.
Contributions are welcome! Please refer to our [CONTRIBUTING](https://github.com/algorand/go-algorand/blob/master/CONTRIBUTING.md) document for general contribution guidelines.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,21 @@ filters:
},
},
},
// Heartbeat transaction that should not be allowed through
sdk.SignedTxnInBlock{
SignedTxnWithAD: sdk.SignedTxnWithAD{
SignedTxn: sdk.SignedTxn{
Txn: sdk.Transaction{
Header: sdk.Header{
Sender: sampleAddr1,
},
HeartbeatTxnFields: &sdk.HeartbeatTxnFields{
HbAddress: sampleAddr2,
},
},
},
},
},
// The one transaction that will be allowed through
sdk.SignedTxnInBlock{
SignedTxnWithAD: sdk.SignedTxnWithAD{
Expand Down Expand Up @@ -974,6 +989,9 @@ filters:
- tag: txn.rcv
expression-type: equal
expression: "` + sampleAddr2.String() + `"
- tag: txn.snd
expression-type: equal
expression: "` + sampleAddr3.String() + `"
`

fpBuilder, err := processors.ProcessorConstructorByName(PluginName)
Expand Down Expand Up @@ -1019,11 +1037,25 @@ filters:
},
},
},
sdk.SignedTxnInBlock{
SignedTxnWithAD: sdk.SignedTxnWithAD{
SignedTxn: sdk.SignedTxn{
Txn: sdk.Transaction{
Header: sdk.Header{
Sender: sampleAddr3,
},
HeartbeatTxnFields: &sdk.HeartbeatTxnFields{
HbAddress: sampleAddr1,
},
},
},
},
},
)

output, err := fp.Process(bd)
require.NoError(t, err)
assert.Equal(t, output.Payset, []sdk.SignedTxnInBlock{bd.Payset[0], bd.Payset[1]})
assert.Equal(t, []sdk.SignedTxnInBlock{bd.Payset[0], bd.Payset[1], bd.Payset[3]}, output.Payset)
}

func TestFilterProcessor_SearchInner(t *testing.T) {
Expand Down
2 changes: 2 additions & 0 deletions conduit/plugins/processors/filterprocessor/gen/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ var ignoreTags = map[string]bool{
"txn.apsu": true,
"dt.lg": true,
"dt.sa": true,
// Filter out heartbeat fields that are not obvious how to filter upon
"txn.hb": true,

Choose a reason for hiding this comment

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

I have no idea what's going on here, so I'm guessing here. But is seems like the hb address is a worthwhile and understandable field. I guess the rest of the hb fields are not very interesting.

}

func noCast(t reflect.StructField) bool {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ go 1.23
toolchain go1.23.3

require (
github.com/algorand/go-algorand-sdk/v2 v2.2.1-0.20241114170414-874d2110dae4
github.com/algorand/go-algorand-sdk/v2 v2.2.1-0.20241220043854-72370807aa70
github.com/algorand/go-codec/codec v1.1.10
github.com/algorand/indexer/v3 v3.6.1-0.20241115001248-bff11e95ca04
github.com/algorand/indexer/v3 v3.6.1-0.20241220213055-c5c7b4ea0f4e
github.com/google/uuid v1.6.0
github.com/jackc/pgx/v4 v4.18.2
github.com/opensearch-project/opensearch-go/v2 v2.3.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v
github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk=
github.com/algorand/avm-abi v0.2.0 h1:bkjsG+BOEcxUcnGSALLosmltE0JZdg+ZisXKx0UDX2k=
github.com/algorand/avm-abi v0.2.0/go.mod h1:+CgwM46dithy850bpTeHh9MC99zpn2Snirb3QTl2O/g=
github.com/algorand/go-algorand-sdk/v2 v2.2.1-0.20241114170414-874d2110dae4 h1:qQXdtMWlP9ynxeDEhWpUWer3AM51482pnfe7ptTDXm0=
github.com/algorand/go-algorand-sdk/v2 v2.2.1-0.20241114170414-874d2110dae4/go.mod h1:BkHnK2PuCqzdGPNeWUo5yo6lRjyDZ9QoMN8GIjfijrA=
github.com/algorand/go-algorand-sdk/v2 v2.2.1-0.20241220043854-72370807aa70 h1:nCVMHFT4U9VEC9Znsz4JVNsSFuhIpvpZidfnMtIcYJg=
github.com/algorand/go-algorand-sdk/v2 v2.2.1-0.20241220043854-72370807aa70/go.mod h1:BkHnK2PuCqzdGPNeWUo5yo6lRjyDZ9QoMN8GIjfijrA=
github.com/algorand/go-codec/codec v1.1.10 h1:zmWYU1cp64jQVTOG8Tw8wa+k0VfwgXIPbnDfiVa+5QA=
github.com/algorand/go-codec/codec v1.1.10/go.mod h1:YkEx5nmr/zuCeaDYOIhlDg92Lxju8tj2d2NrYqP7g7k=
github.com/algorand/indexer/v3 v3.6.1-0.20241115001248-bff11e95ca04 h1:DJqpPmoyi5hmRz3HE7zse/a5xJXN2fpEjEDHXcGArdg=
github.com/algorand/indexer/v3 v3.6.1-0.20241115001248-bff11e95ca04/go.mod h1:+bZIDBTjDjOjj8odzd0dbuOyyspbIKUPXS4Pw+IOfTA=
github.com/algorand/indexer/v3 v3.6.1-0.20241220213055-c5c7b4ea0f4e h1:+c5PEl4VWD2GeTipvegStmJsE6zl073wTzWzOr+fXaM=
github.com/algorand/indexer/v3 v3.6.1-0.20241220213055-c5c7b4ea0f4e/go.mod h1:2PuGusmndLhvtsTnXbtYLiE75JI8Nfdz4YqrF8qtDqU=
github.com/algorand/oapi-codegen v1.12.0-algorand.0 h1:W9PvED+wAJc+9EeXPONnA+0zE9UhynEqoDs4OgAxKhk=
github.com/algorand/oapi-codegen v1.12.0-algorand.0/go.mod h1:tIWJ9K/qrLDVDt5A1p82UmxZIEGxv2X+uoujdhEAL48=
github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ=
Expand Down
Loading