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

Update download url trusted setup #3748

Merged
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
2 changes: 1 addition & 1 deletion ironfish-cli/src/commands/ceremony/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { S3Utils } from '../../utils'
const CONTRIBUTE_TIMEOUT_MS = 5 * 60 * 1000
const UPLOAD_TIMEOUT_MS = 5 * 60 * 1000
const PRESIGNED_EXPIRATION_SEC = 5 * 60
const START_DATE = 1681146000000 // Monday, April 10, 2023 10:00:00 AM GMT-07:00 (Pacific Daylight Time)
const START_DATE = 1680904800000 // Friday, April 07 2023 15:00:00 GMT-0700 (Pacific Daylight Time)

export default class CeremonyService extends IronfishCommand {
static hidden = true
Expand Down
15 changes: 4 additions & 11 deletions ironfish-cli/src/trusted-setup/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ class CeremonyServerClient {
this.id = options.id
this.socket = options.socket
this.connected = true
this.logger = options.logger.withTag(`client:${this.id.slice(0, 4)}..${this.id.slice(-4)}`)
this.logger = options.logger
.withTag(`client:${this.id.slice(0, 4)}..${this.id.slice(-4)}`)
.withTag(`ip:${this.socket.remoteAddress || 'unknown'}`)
}

send(message: CeremonyServerMessage): void {
Expand Down Expand Up @@ -437,19 +439,10 @@ export class CeremonyServer {
await fsAsync.rename(newParamsDownloadPath, path.join(this.tempDir, destFile))
await fsAsync.rm(oldParamsDownloadPath)

const downloadLink = S3Utils.getDownloadUrl(
this.s3Bucket,
destFile,
{
accelerated: true,
},
{ dualStack: true },
)

client.send({
method: 'contribution-verified',
hash,
downloadLink,
downloadLink: `${this.downloadPrefix}/${destFile}`,
contributionNumber: nextParamNumber,
})

Expand Down