Skip to content

Instantly share code, notes, and snippets.

@harsh-98
harsh-98 / gist:5d8e63063879cce6d1a44105d2514124
Created April 8, 2019 08:09
Output of ` tiller.install_release(chart.get_helm_chart(), dry_run=True, namespace='default')`
>>> tiller.install_release(chart.get_helm_chart(), dry_run=True, namespace='default')
release {
name: "rafting-possum"
info {
status {
code: PENDING_INSTALL
notes: "1. Get the application URL by running these commands:\n export POD_NAME=$(kubectl get pods --namespace default -l \"app.kubernetes.io/name=mychart,app.kubernetes.io/instance=rafting-possum\" -o jsonpath=\"{.items[0].metadata.name}\")\n echo \"Visit http://127.0.0.1:8080 to use your application\"\n kubectl port-forward $POD_NAME 8080:80\n"
}
first_deployed {
seconds: 1554710849
@harsh-98
harsh-98 / cloudflare-generator.go
Created April 9, 2019 05:30
Jsonschema generator for cloudflare
package main
import (
"github.com/hashicorp/terraform/helper/schema"
tf "github.com/hashicorp/terraform/terraform"
cloudflare "github.com/terraform-providers/terraform-provider-cloudflare/cloudflare"
"encoding/json"
"fmt"
"os"
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <arpa/inet.h>
@harsh-98
harsh-98 / CONNECT.md
Last active May 1, 2020 13:06
Successfully connected with 16 relayers but got error with other 17.

Successfully connected to :

  • stakingfund
  • dos-ibc
  • freeflix-media-hub
  • vitwitchain
  • mallowchain
  • konstellation
  • newroadchain
  • retz80chain
@harsh-98
harsh-98 / README.md
Last active April 29, 2020 07:34
Packet with two packet_dst_channel , how is that possible?

Trying to transfer funds between melea-11 and pylonchain is failing with packet commitment failed.

$ rly tx xfer pylonchain melea-11 10pylon true $(rly ch addr melea-11) --debug

I[2020-04-29|12:52:38.393] ✔ [pylonchain]@{80008} - msg(0:transfer) hash(BA9A99164183355C9D6D3293FAEAF290729E1C38A8B0D8B820EABD49DBE1EDD1) 
I[2020-04-29|12:52:47.344] - [melea-11] -> sending transaction:         
I[2020-04-29|12:52:47.345] ✘ [melea-11]@{0} - msg(0:update_client,1:ics04/opaque) err(client: packet commitment verification failed) 
{"height":"0","txhash":"13D864A31A9D72132F08F5FDE51C84B6469C3DEE0FE946D309E54D16E148A6DC","codespace":"client","code":16,"raw_log":"couldn't verify counterparty packet commitment: key mismatch on operation #0: expected commitments/ports/transfer/channels/abixkfasxc/packets/144 but got commitments/ports/transfer/channels/abixkfasxc/packets/1404: packet commitment verification failed","gas_wanted":"200000","gas_used":"110315"}
@harsh-98
harsh-98 / README.md
Last active April 29, 2020 09:02
Other weird issue a tx is combination of two tx . How?

Other weird issue that , I found is below packet has two txs and the second tx in array has two is itself a combination of two tx

  • one( from pylon to my chain in pylon )
  • second ( from pyloon to everstake in evertake ).

How can be a tx combination of 2 txs. Because of this, i can not relay all the packets in my channel from pylonchain to setanchain(my chain). While relay the packets i got error at this line. https://github.com/iqlusioninc/relayer/blob/master/relayer/naive-strategy.go#L242

For getting that packet.

rly q txs pylonchain "send_packet.packet_src_channel=heyjusbiqh&send_packet.packet_sequence=11"

@harsh-98
harsh-98 / README.md
Last active May 5, 2020 07:57
Json connection details of all the chains participating in GOZ.

If no other details other than rpc-addr and chain-id is present that is because either the zone has restricted the access to only some IPs or the zone is down. You can use the detail for connecting and establishing channels with chains.

Note: I used the details from the constent_info to create this json. In future, this gist will be autoupdated.

@harsh-98
harsh-98 / README.md
Last active May 24, 2020 18:07
Start k chains

For running this script which uses REST endpoints of ava. I am using the default network id , which I took as 12.

go run main/* --public-ip=127.0.0.1 --snow-sample-size=1 --snow-quorum-size=1 --staking-tls-enabled=false --network-id=12 --api-admin-enabled=true

And then ./ava.sh. This script is using default network id so the funds are there in ewoqjP7PxY4yr3iLTpLisriqt94hdyDFNgchSxGGztUrTXtNN

Install jq for running the below script.

@harsh-98
harsh-98 / README.md
Last active June 9, 2020 00:10
Script for starting, managing, viewing any k instance of the witnet. Enjoy!

This is based on @bertux written systemd script and it can any k instance of the witnet. Docker is not required, and only thing you need to do is run script.

Before running the script you have to make the script executable by:

chmod +x witnet.sh

Usage:

./witnet.sh create -s 1 -e 5