@@ -244,6 +244,14 @@ func buildCollectionPrompt(x win, traits collectionTraits) string {
|
||||
if avoid == "" {
|
||||
avoid = "No additional task-specific avoid list."
|
||||
}
|
||||
beaconDirection := "No Beacon Hunt trait for this winning card."
|
||||
if strings.TrimSpace(x.BeaconPath) != "" {
|
||||
match := "did not match the boosted path"
|
||||
if strings.EqualFold(x.BeaconPath, x.BeaconBoostedPath) {
|
||||
match = "matched the boosted path"
|
||||
}
|
||||
beaconDirection = fmt.Sprintf("Winning Beacon path: %s; boosted path: %s; drand round: %d; the chosen path %s. Translate this subtly into lighting, motion, particles or accessory accents. Do not render the path name or round as text.", x.BeaconPath, x.BeaconBoostedPath, x.BeaconRound, match)
|
||||
}
|
||||
return fmt.Sprintf(`Create one original premium full-art collectible character illustration.
|
||||
|
||||
REFERENCE IMAGES — SEPARATE IDENTITY FROM STYLE:
|
||||
@@ -285,6 +293,9 @@ Follow Image 2 decisively for the rendering language. Recreate its level of styl
|
||||
FULL-ART ENERGY:
|
||||
The environment should visually merge with the character through thematic particles, light, fabric motion, mist, sparks, petals, snow, dust or other scene-appropriate elements. Create many small visual discoveries while keeping RIFT instantly readable.
|
||||
|
||||
BEACON HUNT WIN TRAIT:
|
||||
%s
|
||||
|
||||
TASK-SPECIFIC CREATIVE DIRECTION:
|
||||
%s
|
||||
|
||||
@@ -302,6 +313,7 @@ Deterministic creative fingerprint only, never render it as text: task=%s winner
|
||||
traits.Pose,
|
||||
traits.Mood,
|
||||
traits.Atmosphere,
|
||||
beaconDirection,
|
||||
taskDirection,
|
||||
avoid,
|
||||
shortHash(x.ID), shortHash(x.Winner), x.RangeBits, shortHash(x.Seed),
|
||||
|
||||
+36
-29
@@ -64,14 +64,17 @@ func envDuration(k string, d time.Duration) time.Duration {
|
||||
}
|
||||
|
||||
type win struct {
|
||||
ID, Seed, Winner, Signature, Guess string
|
||||
DisplayName string
|
||||
RangeBits int
|
||||
Completed time.Time
|
||||
PublicJWK json.RawMessage
|
||||
PromptInstructions string
|
||||
NegativePrompt string
|
||||
StyleReference string
|
||||
ID, Seed, Winner, Worker, Signature, Guess string
|
||||
DisplayName string
|
||||
RangeBits int
|
||||
Completed time.Time
|
||||
PublicJWK json.RawMessage
|
||||
PromptInstructions string
|
||||
NegativePrompt string
|
||||
StyleReference string
|
||||
BeaconPath string
|
||||
BeaconBoostedPath string
|
||||
BeaconRound uint64
|
||||
}
|
||||
|
||||
func (w *Worker) Run(ctx context.Context) {
|
||||
@@ -98,9 +101,9 @@ func (w *Worker) claim(ctx context.Context) (win, error) {
|
||||
var x win
|
||||
var completedMS int64
|
||||
var raw string
|
||||
err = tx.QueryRowContext(ctx, `SELECT t.id,t.public_seed,t.winner_client_id,t.winner_signature,t.winning_guess,t.display_name,t.range_bits,t.completed_at,c.public_jwk,t.nft_prompt_instructions,t.nft_negative_prompt,t.nft_style_reference
|
||||
FROM tasks t JOIN clients c ON c.id=t.winner_client_id
|
||||
WHERE t.artifact_status='pending' ORDER BY t.completed_at LIMIT 1`).Scan(&x.ID, &x.Seed, &x.Winner, &x.Signature, &x.Guess, &x.DisplayName, &x.RangeBits, &completedMS, &raw, &x.PromptInstructions, &x.NegativePrompt, &x.StyleReference)
|
||||
err = tx.QueryRowContext(ctx, `SELECT t.id,t.public_seed,t.winner_client_id,COALESCE(t.winner_worker_client_id,t.winner_client_id),t.winner_signature,t.winning_guess,t.display_name,t.range_bits,t.completed_at,c.public_jwk,t.nft_prompt_instructions,t.nft_negative_prompt,t.nft_style_reference,t.winner_beacon_path,t.winner_beacon_boosted_path,t.winner_beacon_round
|
||||
FROM tasks t JOIN clients c ON c.id=COALESCE(t.winner_worker_client_id,t.winner_client_id)
|
||||
WHERE t.artifact_status='pending' ORDER BY t.completed_at LIMIT 1`).Scan(&x.ID, &x.Seed, &x.Winner, &x.Worker, &x.Signature, &x.Guess, &x.DisplayName, &x.RangeBits, &completedMS, &raw, &x.PromptInstructions, &x.NegativePrompt, &x.StyleReference, &x.BeaconPath, &x.BeaconBoostedPath, &x.BeaconRound)
|
||||
if err != nil {
|
||||
return win{}, err
|
||||
}
|
||||
@@ -206,24 +209,28 @@ func (w *Worker) one(ctx context.Context) error {
|
||||
finalSum := sha256.Sum256(finalBytes)
|
||||
|
||||
manifest := map[string]any{
|
||||
"artifact_id": artifactID,
|
||||
"artifact_preset": preset,
|
||||
"task_id": x.ID,
|
||||
"task_display_name": x.DisplayName,
|
||||
"task_range_bits": x.RangeBits,
|
||||
"winner_client_id": x.Winner,
|
||||
"winner_public_jwk": json.RawMessage(x.PublicJWK),
|
||||
"winning_guess": x.Guess,
|
||||
"winner_guess_signature": x.Signature,
|
||||
"completed_at": x.Completed,
|
||||
"image_sha256": hex.EncodeToString(finalSum[:]),
|
||||
"raw_art_sha256": hex.EncodeToString(rawArtSum[:]),
|
||||
"prompt_sha256": hex.EncodeToString(promptSum[:]),
|
||||
"task_prompt_instructions": x.PromptInstructions,
|
||||
"task_style_reference": x.StyleReference,
|
||||
"provider": img.Provider,
|
||||
"provider_meta": img.Meta,
|
||||
"note": "winner_guess_signature authenticates the winning guess; image_sha256 binds the final programmatically laid-out collectible card into the server manifest",
|
||||
"artifact_id": artifactID,
|
||||
"artifact_preset": preset,
|
||||
"task_id": x.ID,
|
||||
"task_display_name": x.DisplayName,
|
||||
"task_range_bits": x.RangeBits,
|
||||
"winner_client_id": x.Winner,
|
||||
"winner_worker_client_id": x.Worker,
|
||||
"winning_beacon_path": x.BeaconPath,
|
||||
"winning_beacon_boosted_path": x.BeaconBoostedPath,
|
||||
"winning_beacon_round": x.BeaconRound,
|
||||
"winning_worker_public_jwk": json.RawMessage(x.PublicJWK),
|
||||
"winning_guess": x.Guess,
|
||||
"winner_guess_signature": x.Signature,
|
||||
"completed_at": x.Completed,
|
||||
"image_sha256": hex.EncodeToString(finalSum[:]),
|
||||
"raw_art_sha256": hex.EncodeToString(rawArtSum[:]),
|
||||
"prompt_sha256": hex.EncodeToString(promptSum[:]),
|
||||
"task_prompt_instructions": x.PromptInstructions,
|
||||
"task_style_reference": x.StyleReference,
|
||||
"provider": img.Provider,
|
||||
"provider_meta": img.Meta,
|
||||
"note": "winner_client_id is the reward owner; winner_worker_client_id and winning_worker_public_jwk authenticate the actual worker guess; image_sha256 binds the final card",
|
||||
}
|
||||
if preset == collectionPresetRaccoon {
|
||||
manifest["collection_character"] = "RIFT"
|
||||
|
||||
Reference in New Issue
Block a user