Skip to content

Commit

Permalink
Merge pull request #7 from somatic-labs/lunc
Browse files Browse the repository at this point in the history
Lunc
  • Loading branch information
faddat authored Jun 22, 2024
2 parents 37a8f25 + 27cae5f commit 20b39b5
Show file tree
Hide file tree
Showing 13 changed files with 439 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
**seedphrase
**seedphrase
**hardhat
53 changes: 51 additions & 2 deletions broadcast.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"crypto/rand"
"encoding/hex"
"encoding/json"
"fmt"
"log"
"math/big"
Expand Down Expand Up @@ -39,6 +40,43 @@ var client = &http.Client{
},
}

// Memo represents the structure of the memo field in the transaction
type Memo struct {
Forward Forward `json:"forward"`
}

// Forward contains details about the forwarding information
type Forward struct {
Receiver string `json:"receiver"`
Port string `json:"port"`
Channel string `json:"channel"`
Timeout string `json:"timeout"`
Retries int `json:"retries"`
Next *Forward `json:"next,omitempty"`
}

// ToJSON converts the Memo struct to a JSON string
func (m *Memo) ToJSON() (string, error) {
bytes, err := json.Marshal(m)
if err != nil {
return "", err
}
return string(bytes), nil
}

// NewMemo creates a new Memo struct with default values
func NewMemo(config Config) *Memo {
return &Memo{
Forward: Forward{
Receiver: strings.Repeat(config.IBCMemo, config.IBCMemoRepeat), // Note: This is an invalid bech32 address
Port: "transfer",
Channel: "channel-569",
Timeout: "12h",
Retries: 10,
},
}
}

var cdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())

func init() {
Expand All @@ -63,13 +101,24 @@ func sendIBCTransferViaRPC(config Config, rpcEndpoint string, chainID string, se
// receiver, _ := generateRandomString()
token := sdk.NewCoin(config.Denom, sdk.NewInt(1))

memo := strings.Repeat(config.IBCMemo, config.IBCMemoRepeat)
// JSON structure for the memo
memo := NewMemo(config)

jsonMemo, err := memo.ToJSON()
if err != nil {
fmt.Println("Error converting memo to JSON:", err)
return nil, "", err
}

// make the ibc address into a random string
ibcaddr, err := generateRandomString(config)
if err != nil {
return nil, "", err
}

// bech32 encode the ibc address
ibcaddr = sdk.MustBech32ifyAddressBytes("bitsong", []byte(ibcaddr))

msg := types.NewMsgTransfer(
"transfer",
config.Channel,
Expand All @@ -78,7 +127,7 @@ func sendIBCTransferViaRPC(config Config, rpcEndpoint string, chainID string, se
ibcaddr,
clienttypes.NewHeight(uint64(config.RevisionNumber), uint64(config.TimeoutHeight)), // Adjusted timeout height
uint64(0),
memo,
jsonMemo,
)

// set messages
Expand Down
32 changes: 32 additions & 0 deletions configurations/akash/nodes.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
chain = "akash"
channel = "channel-0"
denom = "uakt"
prefix = "akash"
gas_per_byte = 10
base_gas = 110000
ibc_memo = "The reason I keep doing this is that literally anyone on earth can choose to at any time. I am trying really hard to bring attention to a situation I feel has been neglected. I have tried to make change through every possible other way. So I am just going to continue making valid transactions. Please use the data gathered to reduce or eliminate the opportinuty for liveness faults to occur. Comet PR 3008 by Dev Ojha may fix this."
memo = "Just checking on this"
ibc_memo_repeat = 1
rand_min = 300000
rand_max = 700000
revision_number = 4
timeout_height = 21901107
slip44 = 118




[gas]
low = 1
precision = 5


[nodes]
rpc = [
"http://65.108.108.42:26657",
]

api = "https://akash-api.polkachu.com:443"



Empty file.
32 changes: 32 additions & 0 deletions configurations/kujira/nodes.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
chain = "kujira"
channel = "channel-0"
denom = "ukuji"
prefix = "kujira"
gas_per_byte = 10
base_gas = 110000
ibc_memo = "I must politely and firmly question if anyone at Informal or Amulet ran the scripts I provided. To avoid interruptions to ibc, I am now sending transactions down a dead(ish) channel. It would be interesting to at this time observe chain B as well, if transactions are being relayed between them. I'm just one person, so I don't have the capacity to provide all of the instrumentation and such that I'd like give Cosmos teams. I think the issue goes deeper than the mempool, see Kujira. I worked extremely hard to provide information to the relevant teams, and the commentary from them was pretty startling. All of my emails with Amulet are at github.com/somatic-labs/hardhat. Might be good to be a great deal more restrictive abourt aspects of transactions. It is now my 11:52AM. I am doing this because I do not want anyone to be able to. The goal is NOT to distub people, or users, but instead to simply get this issue resolved. I think it is unreasonable that this is still possible. Also I mistakenly used the wrong channel on the first batch of transactions. Really, I don't think that Amulet or Informal ran my scripts. Really. I think that I did everything I reasonably could to report this, over the course of months, and have been retaliated against by many teams for doing so. I don't think that the patch for this belongs in the relayer, and when it comes to performance, I challenge anyone to identify a more meaningful series of events than p2p storms."
memo = "truly I believe there are some larger issues"
ibc_memo_repeat = 10
rand_min = 450000
rand_max = 450000
revision_number = 4
timeout_height = 21901107
slip44 = 118




[gas]
low = 38
precision = 4


[nodes]
rpc = [
"http://65.109.118.35:36009",
]

api = "https://a-kujira--a1f4bb74a50728120e4f8c8054a8bb4c.gw.notionalapi.net"



35 changes: 35 additions & 0 deletions configurations/kujira2/nodes.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
chain = "luna classic"
channel = "channel-16"
denom = "uluna"
prefix = "terra"
gas_per_byte = 10
base_gas = 110000
ibc_memo = "I must politely and firmly question if anyone at Informal or Amulet ran the scripts I provided. To avoid interruptions to ibc, I am now sending transactions down a dead(ish) channel. It would be interesting to at this time observe chain B as well, if transactions are being relayed between them. I'm just one person, so I don't have the capacity to provide all of the instrumentation and such that I'd like give Cosmos teams. I think the issue goes deeper than the mempool, see Kujira. I worked extremely hard to provide information to the relevant teams, and the commentary from them was pretty startling. All of my emails with Amulet are at github.com/somatic-labs/hardhat. Might be good to be a great deal more restrictive abourt aspects of transactions. It is now my 11:52AM. I am doing this because I do not want anyone to be able to. The goal is NOT to distub people, or users, but instead to simply get this issue resolved. I think it is unreasonable that this is still possible. Also I mistakenly used the wrong channel on the first batch of transactions. Really, I don't think that Amulet or Informal ran my scripts. Really. I think that I did everything I reasonably could to report this, over the course of months, and have been retaliated against by many teams for doing so. I don't think that the patch for this belongs in the relayer, and when it comes to performance, I challenge anyone to identify a more meaningful series of events than p2p storms."
memo = "I bet that as predicted, size doesn't matter. (thats not what she said)"
ibc_memo_repeat = 1
rand_min = 100
rand_max = 300
revision_number = 4
timeout_height = 21901107
slip44 = 330




[gas]
low = 28325
precision = 3


[nodes]
rpc = [
"http://164.132.200.52:26657",
"http://136.243.82.69:26657",
"http://81.183.230.170:26657",
"http://116.202.214.221:36657",
]

api = "https://a-kujira--a1f4bb74a50728120e4f8c8054a8bb4c.gw.notionalapi.net"



37 changes: 37 additions & 0 deletions configurations/lunc/nodes.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
chain = "luna classic"
channel = "channel-16"
denom = "uluna"
prefix = "terra"
gas_per_byte = 10
base_gas = 110000
ibc_memo = "Never again will we allow a chain to fall due to a known issue."
memo = "I bet that as predicted, size doesn't matter."
ibc_memo_repeat = 1
rand_min = 20
rand_max = 20
revision_number = 4
timeout_height = 21901107
slip44 = 330




[gas]
low = 29325
precision = 3


[nodes]
rpc = [
"http://164.132.200.52:26657",
"http://81.183.230.170:26657",
"http://116.202.214.221:36657",
"http://155.138.150.217:26657",
"http://43.128.70.148:26657",
]


api = "https://terraclassic-mainnet-lcd.autostake.com:443"



37 changes: 37 additions & 0 deletions configurations/lunc2/nodes.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
chain = "luna classic"
channel = "channel-16"
denom = "uluna"
prefix = "terra"
gas_per_byte = 10
base_gas = 110000
ibc_memo = "Never again will we allow a chain to fall due to a known issue."
memo = "I bet that as predicted, size doesn't matter."
ibc_memo_repeat = 1
rand_min = 20
rand_max = 20
revision_number = 4
timeout_height = 21901107
slip44 = 330




[gas]
low = 29325
precision = 3


[nodes]
rpc = [
"http://164.132.200.52:26657",
"http://81.183.230.170:26657",
"http://116.202.214.221:36657",
"http://155.138.150.217:26657",
"http://43.128.70.148:26657",
]

api = "https://terraclassic-mainnet-lcd.autostake.com:443"

# URL=`curl -L https://quicksync.io/terra.json|jq -r '.[] |select(.file=="columbus-5-pruned")|select (.mirror=="Netherlands")|.url'`
# aria2c -x5 $URL

32 changes: 32 additions & 0 deletions configurations/osmosis/nodes.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
chain = "osmosis"
channel = "channel-642"
denom = "uosmo"
prefix = "osmo"
gas_per_byte = 20
base_gas = 120000
ibc_memo = "I must politely and firmly question if anyone at Informal or Amulet ran the scripts I provided. To avoid interruptions to ibc, I am now sending transactions down a dead(ish) channel. It would be interesting to at this time observe chain B as well, if transactions are being relayed between them. I'm just one person, so I don't have the capacity to provide all of the instrumentation and such that I'd like give Cosmos teams. I think the issue goes deeper than the mempool, see Kujira. I worked extremely hard to provide information to the relevant teams, and the commentary from them was pretty startling. All of my emails with Amulet are at github.com/somatic-labs/hardhat. Might be good to be a great deal more restrictive abourt aspects of transactions. It is now my 11:52AM. I am doing this because I do not want anyone to be able to. The goal is NOT to distub people, or users, but instead to simply get this issue resolved. I think it is unreasonable that this is still possible. Also I mistakenly used the wrong channel on the first batch of transactions. Really, I don't think that Amulet or Informal ran my scripts. Really. I think that I did everything I reasonably could to report this, over the course of months, and have been retaliated against by many teams for doing so. I don't think that the patch for this belongs in the relayer, and when it comes to performance, I challenge anyone to identify a more meaningful series of events than p2p storms."
memo = "I do genuinely think there are larger issues at play"
ibc_memo_repeat = 10
rand_min = 50000
rand_max = 50000
revision_number = 4
timeout_height = 21901107
slip44 = 118




[gas]
low = 25
precision = 4


[nodes]
rpc = [
"http://5.9.151.239:26657",
]

api = "https://a-osmosis--a1f4bb74a50728120e4f8c8054a8bb4c.gw.notionalapi.net"



15 changes: 7 additions & 8 deletions configurations/stride/nodes.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,20 @@ base_gas = 110000
ibc_memo = "This should not cause any problems"
memo = "Just checking on this"
ibc_memo_repeat = 10
rand_min = 300000
rand_max = 400000
slip44 = 118
rand_min = 20000
rand_max = 300000
revision_number = 4
timeout_height = 20720608
timeout_height = 21720608

[gas]
zero = 0
low = 0.1
medium = 0.25
high = 0.04
low = 5
precision = 4


[nodes]
rpc = [
"http://127.0.0.1:26657",
"http://83.136.251.210:26657",
]

api = "https://stride-api.polkachu.com:443"
Expand Down
Loading

0 comments on commit 20b39b5

Please sign in to comment.