Skip to content

Commit

Permalink
Put dates on Zulu time instead of localtime (iov-one#310)
Browse files Browse the repository at this point in the history
* Add a future genesis_time to galaxynet

* Put dates on Zulu time

* Make sure that travis doesn't wait for a future genesis_time

* Fix travis

* Don't be clever with jq

Travis' version is crippled.

Co-authored-by: Dave Puchyr <dave@slim.avaritia.com>
  • Loading branch information
davepuchyr and Dave Puchyr authored Aug 11, 2020
1 parent d68bde6 commit 2b4f7b9
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ script:
- export CHAIN_ID=$(jq -r .chain_id genesis.json)
- iovnsd init ${CHAIN_ID} --chain-id ${CHAIN_ID} > /dev/null 2> /dev/null
- sed --in-place 's/timeout_commit = "5s"/timeout_commit = "1s"/' ~/.iovnsd/config/config.toml
- mv genesis.json ~/.iovnsd/config
- jq '.genesis_time = "2020-04-15T10:00:00Z"' genesis.json > ~/.iovnsd/config/genesis.json
- iovnscli config chain-id ${CHAIN_ID}
- iovnscli config trust-node true
- iovnscli config keyring-backend test
Expand Down
2 changes: 1 addition & 1 deletion scripts/genesis/data/dump
Submodule dump updated from 18180e to 4d2f93
2 changes: 1 addition & 1 deletion scripts/genesis/data/galaxynet/config
Submodule config updated from 5c5d8a to 32bea4
2 changes: 1 addition & 1 deletion scripts/genesis/data/premium
Submodule premium updated from f36c11 to 3c810a
23 changes: 13 additions & 10 deletions scripts/genesis/lib/migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const createStarname = ( args = {} ) => {
"name": args.name || "",
"owner": args.address || "",
"resources": resources,
"valid_until": String( new Date( "2020-10-01T00:00:00" ).getTime() / 1000 ), // just after listing date
"valid_until": String( new Date( "2020-10-01T00:00:00Z" ).getTime() / 1000 ), // just after listing date
};

if ( args.iov1 ) template["//iov1"] = args.iov1;
Expand All @@ -133,7 +133,7 @@ export const createDomain = ( args = {} ) => {
"broker": null,
"name": args.domain,
"type": "closed",
"valid_until": String( args.valid_until || new Date( "2020-10-01T00:00:00" ).getTime() / 1000 ), // just after listing date
"valid_until": String( args.valid_until || new Date( "2020-10-01T00:00:00Z" ).getTime() / 1000 ), // just after listing date
};

if ( args.iov1 ) template["//iov1"] = args.iov1;
Expand Down Expand Up @@ -334,14 +334,14 @@ export const convertToCosmosSdk = ( dumped, iov2star, multisigs, premiums, reser
// reserve domains
const address = "star1v794jm5am4qpc52kvgmxxm2j50kgu9mjszcq96"; // https://internetofvalues.slack.com/archives/GPYCU2AJJ/p1596436694013900
const releases = [ // give 8 months to sell
new Date( "2020-09-16T10:00:00" ),
new Date( "2020-10-14T10:00:00" ),
new Date( "2020-11-18T10:00:00" ),
new Date( "2020-12-16T10:00:00" ),
new Date( "2021-01-20T10:00:00" ),
new Date( "2021-02-17T10:00:00" ),
new Date( "2021-03-17T10:00:00" ),
new Date( "2021-04-14T10:00:00" ),
new Date( "2020-09-16T10:00:00Z" ),
new Date( "2020-10-14T10:00:00Z" ),
new Date( "2020-11-18T10:00:00Z" ),
new Date( "2020-12-16T10:00:00Z" ),
new Date( "2021-01-20T10:00:00Z" ),
new Date( "2021-02-17T10:00:00Z" ),
new Date( "2021-03-17T10:00:00Z" ),
new Date( "2021-04-14T10:00:00Z" ),
];
reserveds.forEach( ( domain, i ) => {
if ( !domains.find( existing => existing.name == domain ) ) { // don't allow duplicates
Expand Down Expand Up @@ -603,6 +603,9 @@ export const patchGalaxynet = genesis => {

if ( resource ) resource.uri = "asset-testnet:iov"; // https://internetofvalues.slack.com/archives/CPNRVHG94/p1595965860011800
} );

// attempt a decentralized launch
genesis.genesis_time = new Date( "2020-08-13T12:00:00Z" ).toISOString();
}

/**
Expand Down

0 comments on commit 2b4f7b9

Please sign in to comment.